Ignore:
Timestamp:
Jun 19, 2009, 6:29:36 PM (16 years ago)
Author:
[email protected]
Message:

2009-06-19 Gavin Barraclough <[email protected]>

Reviewed by NOBODY (build fix take 2 - rename FIELD_OFFSET to something that doesn't conflict with winnt.h).

  • jit/JIT.cpp: (JSC::JIT::privateCompile): (JSC::JIT::privateCompileCTIMachineTrampolines): (JSC::JIT::emitGetVariableObjectRegister): (JSC::JIT::emitPutVariableObjectRegister):
  • jit/JIT.h:
  • jit/JITArithmetic.cpp: (JSC::JIT::emit_op_rshift): (JSC::JIT::emitSlow_op_jnless): (JSC::JIT::emitSlow_op_jnlesseq): (JSC::JIT::compileBinaryArithOp):
  • jit/JITCall.cpp: (JSC::JIT::compileOpCallInitializeCallFrame): (JSC::JIT::compileOpCall):
  • jit/JITInlineMethods.h: (JSC::JIT::restoreArgumentReference): (JSC::JIT::checkStructure):
  • jit/JITOpcodes.cpp: (JSC::JIT::emit_op_instanceof): (JSC::JIT::emit_op_get_scoped_var): (JSC::JIT::emit_op_put_scoped_var): (JSC::JIT::emit_op_construct_verify): (JSC::JIT::emit_op_resolve_global): (JSC::JIT::emit_op_jeq_null): (JSC::JIT::emit_op_jneq_null): (JSC::JIT::emit_op_to_jsnumber): (JSC::JIT::emit_op_catch): (JSC::JIT::emit_op_eq_null): (JSC::JIT::emit_op_neq_null): (JSC::JIT::emit_op_convert_this): (JSC::JIT::emit_op_profile_will_call): (JSC::JIT::emit_op_profile_did_call): (JSC::JIT::emitSlow_op_get_by_val):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_get_by_val): (JSC::JIT::emit_op_put_by_val): (JSC::JIT::emit_op_method_check): (JSC::JIT::compileGetByIdHotPath): (JSC::JIT::emit_op_put_by_id): (JSC::JIT::compilePutDirectOffset): (JSC::JIT::compileGetDirectOffset): (JSC::JIT::privateCompilePutByIdTransition): (JSC::JIT::privateCompilePatchGetArrayLength):
  • jit/JITStubs.cpp: (JSC::JITThunks::JITThunks):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JITOpcodes.cpp

    r44884 r44889  
    160160
    161161    // Check that baseVal is an object, that it 'ImplementsHasInstance' but that it does not 'OverridesHasInstance'.
    162     loadPtr(Address(regT0, FIELD_OFFSET(JSCell, m_structure)), regT0);
    163     addSlowCase(branch32(NotEqual, Address(regT0, FIELD_OFFSET(Structure, m_typeInfo.m_type)), Imm32(ObjectType)));
    164     addSlowCase(branchTest32(Zero, Address(regT0, FIELD_OFFSET(Structure, m_typeInfo.m_flags)), Imm32(ImplementsDefaultHasInstance)));
     162    loadPtr(Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), regT0);
     163    addSlowCase(branch32(NotEqual, Address(regT0, OBJECT_OFFSETOF(Structure, m_typeInfo.m_type)), Imm32(ObjectType)));
     164    addSlowCase(branchTest32(Zero, Address(regT0, OBJECT_OFFSETOF(Structure, m_typeInfo.m_flags)), Imm32(ImplementsDefaultHasInstance)));
    165165
    166166    // If value is not an Object, return false.
    167167    Jump valueIsImmediate = emitJumpIfNotJSCell(regT2);
    168     loadPtr(Address(regT2, FIELD_OFFSET(JSCell, m_structure)), regT0);
    169     Jump valueIsNotObject = branch32(NotEqual, Address(regT0, FIELD_OFFSET(Structure, m_typeInfo.m_type)), Imm32(ObjectType));
     168    loadPtr(Address(regT2, OBJECT_OFFSETOF(JSCell, m_structure)), regT0);
     169    Jump valueIsNotObject = branch32(NotEqual, Address(regT0, OBJECT_OFFSETOF(Structure, m_typeInfo.m_type)), Imm32(ObjectType));
    170170
    171171    // Check proto is object.
    172     loadPtr(Address(regT1, FIELD_OFFSET(JSCell, m_structure)), regT0);
    173     addSlowCase(branch32(NotEqual, Address(regT0, FIELD_OFFSET(Structure, m_typeInfo.m_type)), Imm32(ObjectType)));
     172    loadPtr(Address(regT1, OBJECT_OFFSETOF(JSCell, m_structure)), regT0);
     173    addSlowCase(branch32(NotEqual, Address(regT0, OBJECT_OFFSETOF(Structure, m_typeInfo.m_type)), Imm32(ObjectType)));
    174174
    175175    // Optimistically load the result true, and start looping.
     
    181181    // Load the prototype of the object in regT2.  If this is equal to regT1 - WIN!
    182182    // Otherwise, check if we've hit null - if we have then drop out of the loop, if not go again.
    183     loadPtr(Address(regT2, FIELD_OFFSET(JSCell, m_structure)), regT2);
    184     loadPtr(Address(regT2, FIELD_OFFSET(Structure, m_prototype)), regT2);
     183    loadPtr(Address(regT2, OBJECT_OFFSETOF(JSCell, m_structure)), regT2);
     184    loadPtr(Address(regT2, OBJECT_OFFSETOF(Structure, m_prototype)), regT2);
    185185    Jump isInstance = branchPtr(Equal, regT2, regT1);
    186186    branchPtr(NotEqual, regT2, ImmPtr(JSValue::encode(jsNull())), loop);
     
    252252    emitGetFromCallFrameHeaderPtr(RegisterFile::ScopeChain, regT0);
    253253    while (skip--)
    254         loadPtr(Address(regT0, FIELD_OFFSET(ScopeChainNode, next)), regT0);
    255 
    256     loadPtr(Address(regT0, FIELD_OFFSET(ScopeChainNode, object)), regT0);
     254        loadPtr(Address(regT0, OBJECT_OFFSETOF(ScopeChainNode, next)), regT0);
     255
     256    loadPtr(Address(regT0, OBJECT_OFFSETOF(ScopeChainNode, object)), regT0);
    257257    emitGetVariableObjectRegister(regT0, currentInstruction[2].u.operand, regT0);
    258258    emitPutVirtualRegister(currentInstruction[1].u.operand);
     
    266266    emitGetVirtualRegister(currentInstruction[3].u.operand, regT0);
    267267    while (skip--)
    268         loadPtr(Address(regT1, FIELD_OFFSET(ScopeChainNode, next)), regT1);
    269 
    270     loadPtr(Address(regT1, FIELD_OFFSET(ScopeChainNode, object)), regT1);
     268        loadPtr(Address(regT1, OBJECT_OFFSETOF(ScopeChainNode, next)), regT1);
     269
     270    loadPtr(Address(regT1, OBJECT_OFFSETOF(ScopeChainNode, object)), regT1);
    271271    emitPutVariableObjectRegister(regT0, regT1, currentInstruction[1].u.operand);
    272272}
     
    328328
    329329    emitJumpSlowCaseIfNotJSCell(regT0);
    330     loadPtr(Address(regT0, FIELD_OFFSET(JSCell, m_structure)), regT2);
    331     addSlowCase(branch32(NotEqual, Address(regT2, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type)), Imm32(ObjectType)));
     330    loadPtr(Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), regT2);
     331    addSlowCase(branch32(NotEqual, Address(regT2, OBJECT_OFFSETOF(Structure, m_typeInfo) + OBJECT_OFFSETOF(TypeInfo, m_type)), Imm32(ObjectType)));
    332332
    333333}
     
    408408    move(ImmPtr(globalObject), regT0);
    409409    loadPtr(structureAddress, regT1);
    410     Jump noMatch = branchPtr(NotEqual, regT1, Address(regT0, FIELD_OFFSET(JSCell, m_structure))); // Structures don't match
     410    Jump noMatch = branchPtr(NotEqual, regT1, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure))); // Structures don't match
    411411
    412412    // Load cached property
    413413    // Assume that the global object always uses external storage.
    414     loadPtr(Address(regT0, FIELD_OFFSET(JSGlobalObject, m_externalStorage)), regT0);
     414    loadPtr(Address(regT0, OBJECT_OFFSETOF(JSGlobalObject, m_externalStorage)), regT0);
    415415    load32(offsetAddr, regT1);
    416416    loadPtr(BaseIndex(regT0, regT1, ScalePtr), regT0);
     
    460460
    461461    // First, handle JSCell cases - check MasqueradesAsUndefined bit on the structure.
    462     loadPtr(Address(regT0, FIELD_OFFSET(JSCell, m_structure)), regT2);
    463     addJump(branchTest32(NonZero, Address(regT2, FIELD_OFFSET(Structure, m_typeInfo.m_flags)), Imm32(MasqueradesAsUndefined)), target + 2);
     462    loadPtr(Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), regT2);
     463    addJump(branchTest32(NonZero, Address(regT2, OBJECT_OFFSETOF(Structure, m_typeInfo.m_flags)), Imm32(MasqueradesAsUndefined)), target + 2);
    464464    Jump wasNotImmediate = jump();
    465465
     
    481481
    482482    // First, handle JSCell cases - check MasqueradesAsUndefined bit on the structure.
    483     loadPtr(Address(regT0, FIELD_OFFSET(JSCell, m_structure)), regT2);
    484     addJump(branchTest32(Zero, Address(regT2, FIELD_OFFSET(Structure, m_typeInfo.m_flags)), Imm32(MasqueradesAsUndefined)), target + 2);
     483    loadPtr(Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), regT2);
     484    addJump(branchTest32(Zero, Address(regT2, OBJECT_OFFSETOF(Structure, m_typeInfo.m_flags)), Imm32(MasqueradesAsUndefined)), target + 2);
    485485    Jump wasNotImmediate = jump();
    486486
     
    671671
    672672    emitJumpSlowCaseIfNotJSCell(regT0, srcVReg);
    673     loadPtr(Address(regT0, FIELD_OFFSET(JSCell, m_structure)), regT2);
    674     addSlowCase(branch32(NotEqual, Address(regT2, FIELD_OFFSET(Structure, m_typeInfo.m_type)), Imm32(NumberType)));
     673    loadPtr(Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), regT2);
     674    addSlowCase(branch32(NotEqual, Address(regT2, OBJECT_OFFSETOF(Structure, m_typeInfo.m_type)), Imm32(NumberType)));
    675675   
    676676    wasImmediate.link(this);
     
    690690{
    691691    killLastResultRegister(); // FIXME: Implicitly treat op_catch as a labeled statement, and remove this line of code.
    692     peek(callFrameRegister, FIELD_OFFSET(struct JITStackFrame, callFrame) / sizeof (void*));
     692    peek(callFrameRegister, OBJECT_OFFSETOF(struct JITStackFrame, callFrame) / sizeof (void*));
    693693    emitPutVirtualRegister(currentInstruction[1].u.operand);
    694694}
     
    782782    Jump isImmediate = emitJumpIfNotJSCell(regT0);
    783783
    784     loadPtr(Address(regT0, FIELD_OFFSET(JSCell, m_structure)), regT2);
    785     setTest32(NonZero, Address(regT2, FIELD_OFFSET(Structure, m_typeInfo.m_flags)), Imm32(MasqueradesAsUndefined), regT0);
     784    loadPtr(Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), regT2);
     785    setTest32(NonZero, Address(regT2, OBJECT_OFFSETOF(Structure, m_typeInfo.m_flags)), Imm32(MasqueradesAsUndefined), regT0);
    786786
    787787    Jump wasNotImmediate = jump();
     
    807807    Jump isImmediate = emitJumpIfNotJSCell(regT0);
    808808
    809     loadPtr(Address(regT0, FIELD_OFFSET(JSCell, m_structure)), regT2);
    810     setTest32(Zero, Address(regT2, FIELD_OFFSET(Structure, m_typeInfo.m_flags)), Imm32(MasqueradesAsUndefined), regT0);
     809    loadPtr(Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), regT2);
     810    setTest32(Zero, Address(regT2, OBJECT_OFFSETOF(Structure, m_typeInfo.m_flags)), Imm32(MasqueradesAsUndefined), regT0);
    811811
    812812    Jump wasNotImmediate = jump();
     
    867867
    868868    emitJumpSlowCaseIfNotJSCell(regT0);
    869     loadPtr(Address(regT0, FIELD_OFFSET(JSCell, m_structure)), regT1);
    870     addSlowCase(branchTest32(NonZero, Address(regT1, FIELD_OFFSET(Structure, m_typeInfo.m_flags)), Imm32(NeedsThisConversion)));
     869    loadPtr(Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), regT1);
     870    addSlowCase(branchTest32(NonZero, Address(regT1, OBJECT_OFFSETOF(Structure, m_typeInfo.m_flags)), Imm32(NeedsThisConversion)));
    871871
    872872}
     
    874874void JIT::emit_op_profile_will_call(Instruction* currentInstruction)
    875875{
    876     peek(regT1, FIELD_OFFSET(JITStackFrame, enabledProfilerReference) / sizeof (void*));
     876    peek(regT1, OBJECT_OFFSETOF(JITStackFrame, enabledProfilerReference) / sizeof (void*));
    877877    Jump noProfiler = branchTestPtr(Zero, Address(regT1));
    878878
     
    886886void JIT::emit_op_profile_did_call(Instruction* currentInstruction)
    887887{
    888     peek(regT1, FIELD_OFFSET(JITStackFrame, enabledProfilerReference) / sizeof (void*));
     888    peek(regT1, OBJECT_OFFSETOF(JITStackFrame, enabledProfilerReference) / sizeof (void*));
    889889    Jump noProfiler = branchTestPtr(Zero, Address(regT1));
    890890
     
    944944    // First, check if this is an access to the vector
    945945    linkSlowCase(iter);
    946     branch32(AboveOrEqual, regT1, Address(regT2, FIELD_OFFSET(ArrayStorage, m_vectorLength)), beginGetByValSlow);
     946    branch32(AboveOrEqual, regT1, Address(regT2, OBJECT_OFFSETOF(ArrayStorage, m_vectorLength)), beginGetByValSlow);
    947947
    948948    // okay, missed the fast region, but it is still in the vector.  Get the value.
    949     loadPtr(BaseIndex(regT2, regT1, ScalePtr, FIELD_OFFSET(ArrayStorage, m_vector[0])), regT2);
     949    loadPtr(BaseIndex(regT2, regT1, ScalePtr, OBJECT_OFFSETOF(ArrayStorage, m_vector[0])), regT2);
    950950    // Check whether the value loaded is zero; if so we need to return undefined.
    951951    branchTestPtr(Zero, regT2, beginGetByValSlow);
Note: See TracChangeset for help on using the changeset viewer.