Changeset 38461 in webkit


Ignore:
Timestamp:
Nov 16, 2008, 5:48:55 PM (17 years ago)
Author:
[email protected]
Message:

2008-11-16 Geoffrey Garen <[email protected]>

Reviewed by Sam Weinig.

A few more renames:

BytecodeInterpreter => Interpreter
WREC => JSC::WREC, removing JSC:: prefix in a lot of places
X86Assembler::copy => X86Assembler::executableCopy
AssemblerBuffer::copy => AssemblerBuffer::executableCopy
WRECFunction => WREC::RegExpFunction
OBJECT_OFFSET => FIELD_OFFSET


Also:

Nixed use of OBJECT_OFFSET outside of CTI.cpp by making CTI a friend in more places.

Nixed X86
and X86Assembler:: prefixes in a lot of places using typedefs
  • JavaScriptCore.exp:
  • VM/CTI.cpp: (JSC::): (JSC::CTI::emitGetVirtualRegister): (JSC::CTI::emitGetVirtualRegisters): (JSC::CTI::emitPutCTIArgFromVirtualRegister): (JSC::CTI::emitPutCTIArg): (JSC::CTI::emitGetCTIArg): (JSC::CTI::emitPutCTIParam): (JSC::CTI::emitGetCTIParam): (JSC::CTI::emitPutToCallFrameHeader): (JSC::CTI::emitGetFromCallFrameHeader): (JSC::CTI::emitPutVirtualRegister): (JSC::CTI::emitNakedCall): (JSC::CTI::emitNakedFastCall): (JSC::CTI::emitCTICall): (JSC::CTI::emitJumpSlowCaseIfNotJSCell): (JSC::CTI::emitJumpSlowCaseIfNotImmNum): (JSC::CTI::emitJumpSlowCaseIfNotImmNums): (JSC::CTI::emitFastArithDeTagImmediate): (JSC::CTI::emitFastArithDeTagImmediateJumpIfZero): (JSC::CTI::emitFastArithReTagImmediate): (JSC::CTI::emitFastArithPotentiallyReTagImmediate): (JSC::CTI::emitFastArithImmToInt): (JSC::CTI::emitFastArithIntToImmOrSlowCase): (JSC::CTI::emitFastArithIntToImmNoCheck): (JSC::CTI::emitArithIntToImmWithJump): (JSC::CTI::emitTagAsBoolImmediate): (JSC::CTI::compileOpCallInitializeCallFrame): (JSC::CTI::compileOpCall): (JSC::CTI::compileOpStrictEq): (JSC::CTI::emitSlowScriptCheck): (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate): (JSC::CTI::compileBinaryArithOp): (JSC::CTI::compileBinaryArithOpSlowCase): (JSC::CTI::privateCompileMainPass): (JSC::CTI::privateCompileSlowCases): (JSC::CTI::privateCompile): (JSC::CTI::privateCompileGetByIdSelf): (JSC::CTI::privateCompileGetByIdProto): (JSC::CTI::privateCompileGetByIdChain): (JSC::CTI::privateCompilePutByIdReplace): (JSC::CTI::privateCompilePutByIdTransition): (JSC::CTI::privateCompileCTIMachineTrampolines): (JSC::CTI::freeCTIMachineTrampolines): (JSC::CTI::patchGetByIdSelf): (JSC::CTI::patchPutByIdReplace): (JSC::CTI::privateCompilePatchGetArrayLength): (JSC::CTI::emitGetVariableObjectRegister): (JSC::CTI::emitPutVariableObjectRegister):
  • VM/CTI.h: (JSC::CallRecord::CallRecord): (JSC::JmpTable::JmpTable): (JSC::SlowCaseEntry::SlowCaseEntry): (JSC::CTI::JSRInfo::JSRInfo):
  • VM/CodeBlock.cpp: (JSC::CodeBlock::printStructures): (JSC::CodeBlock::derefStructures): (JSC::CodeBlock::refStructures):
  • VM/Machine.cpp: (JSC::jsLess): (JSC::jsLessEq): (JSC::Interpreter::resolve): (JSC::Interpreter::resolveSkip): (JSC::Interpreter::resolveGlobal): (JSC::Interpreter::resolveBase): (JSC::Interpreter::resolveBaseAndProperty): (JSC::Interpreter::resolveBaseAndFunc): (JSC::Interpreter::slideRegisterWindowForCall): (JSC::Interpreter::callEval): (JSC::Interpreter::Interpreter): (JSC::Interpreter::initialize): (JSC::Interpreter::~Interpreter): (JSC::Interpreter::dumpCallFrame): (JSC::Interpreter::dumpRegisters): (JSC::Interpreter::isOpcode): (JSC::Interpreter::unwindCallFrame): (JSC::Interpreter::throwException): (JSC::Interpreter::execute): (JSC::Interpreter::debug): (JSC::Interpreter::resetTimeoutCheck): (JSC::Interpreter::checkTimeout): (JSC::Interpreter::createExceptionScope): (JSC::Interpreter::tryCachePutByID): (JSC::Interpreter::uncachePutByID): (JSC::Interpreter::tryCacheGetByID): (JSC::Interpreter::uncacheGetByID): (JSC::Interpreter::privateExecute): (JSC::Interpreter::retrieveArguments): (JSC::Interpreter::retrieveCaller): (JSC::Interpreter::retrieveLastCaller): (JSC::Interpreter::findFunctionCallFrame): (JSC::Interpreter::tryCTICachePutByID): (JSC::Interpreter::tryCTICacheGetByID): (JSC::): (JSC::Interpreter::cti_op_convert_this): (JSC::Interpreter::cti_op_end): (JSC::Interpreter::cti_op_add): (JSC::Interpreter::cti_op_pre_inc): (JSC::Interpreter::cti_timeout_check): (JSC::Interpreter::cti_register_file_check): (JSC::Interpreter::cti_op_loop_if_less): (JSC::Interpreter::cti_op_loop_if_lesseq): (JSC::Interpreter::cti_op_new_object): (JSC::Interpreter::cti_op_put_by_id): (JSC::Interpreter::cti_op_put_by_id_second): (JSC::Interpreter::cti_op_put_by_id_generic): (JSC::Interpreter::cti_op_put_by_id_fail): (JSC::Interpreter::cti_op_get_by_id): (JSC::Interpreter::cti_op_get_by_id_second): (JSC::Interpreter::cti_op_get_by_id_generic): (JSC::Interpreter::cti_op_get_by_id_fail): (JSC::Interpreter::cti_op_instanceof): (JSC::Interpreter::cti_op_del_by_id): (JSC::Interpreter::cti_op_mul): (JSC::Interpreter::cti_op_new_func): (JSC::Interpreter::cti_op_call_JSFunction): (JSC::Interpreter::cti_op_call_arityCheck): (JSC::Interpreter::cti_vm_dontLazyLinkCall): (JSC::Interpreter::cti_vm_lazyLinkCall): (JSC::Interpreter::cti_op_push_activation): (JSC::Interpreter::cti_op_call_NotJSFunction): (JSC::Interpreter::cti_op_create_arguments): (JSC::Interpreter::cti_op_create_arguments_no_params): (JSC::Interpreter::cti_op_tear_off_activation): (JSC::Interpreter::cti_op_tear_off_arguments): (JSC::Interpreter::cti_op_profile_will_call): (JSC::Interpreter::cti_op_profile_did_call): (JSC::Interpreter::cti_op_ret_scopeChain): (JSC::Interpreter::cti_op_new_array): (JSC::Interpreter::cti_op_resolve): (JSC::Interpreter::cti_op_construct_JSConstruct): (JSC::Interpreter::cti_op_construct_NotJSConstruct): (JSC::Interpreter::cti_op_get_by_val): (JSC::Interpreter::cti_op_resolve_func): (JSC::Interpreter::cti_op_sub): (JSC::Interpreter::cti_op_put_by_val): (JSC::Interpreter::cti_op_put_by_val_array): (JSC::Interpreter::cti_op_lesseq): (JSC::Interpreter::cti_op_loop_if_true): (JSC::Interpreter::cti_op_negate): (JSC::Interpreter::cti_op_resolve_base): (JSC::Interpreter::cti_op_resolve_skip): (JSC::Interpreter::cti_op_resolve_global): (JSC::Interpreter::cti_op_div): (JSC::Interpreter::cti_op_pre_dec): (JSC::Interpreter::cti_op_jless): (JSC::Interpreter::cti_op_not): (JSC::Interpreter::cti_op_jtrue): (JSC::Interpreter::cti_op_post_inc): (JSC::Interpreter::cti_op_eq): (JSC::Interpreter::cti_op_lshift): (JSC::Interpreter::cti_op_bitand): (JSC::Interpreter::cti_op_rshift): (JSC::Interpreter::cti_op_bitnot): (JSC::Interpreter::cti_op_resolve_with_base): (JSC::Interpreter::cti_op_new_func_exp): (JSC::Interpreter::cti_op_mod): (JSC::Interpreter::cti_op_less): (JSC::Interpreter::cti_op_neq): (JSC::Interpreter::cti_op_post_dec): (JSC::Interpreter::cti_op_urshift): (JSC::Interpreter::cti_op_bitxor): (JSC::Interpreter::cti_op_new_regexp): (JSC::Interpreter::cti_op_bitor): (JSC::Interpreter::cti_op_call_eval): (JSC::Interpreter::cti_op_throw): (JSC::Interpreter::cti_op_get_pnames): (JSC::Interpreter::cti_op_next_pname): (JSC::Interpreter::cti_op_push_scope): (JSC::Interpreter::cti_op_pop_scope): (JSC::Interpreter::cti_op_typeof): (JSC::Interpreter::cti_op_is_undefined): (JSC::Interpreter::cti_op_is_boolean): (JSC::Interpreter::cti_op_is_number): (JSC::Interpreter::cti_op_is_string): (JSC::Interpreter::cti_op_is_object): (JSC::Interpreter::cti_op_is_function): (JSC::Interpreter::cti_op_stricteq): (JSC::Interpreter::cti_op_nstricteq): (JSC::Interpreter::cti_op_to_jsnumber): (JSC::Interpreter::cti_op_in): (JSC::Interpreter::cti_op_push_new_scope): (JSC::Interpreter::cti_op_jmp_scopes): (JSC::Interpreter::cti_op_put_by_index): (JSC::Interpreter::cti_op_switch_imm): (JSC::Interpreter::cti_op_switch_char): (JSC::Interpreter::cti_op_switch_string): (JSC::Interpreter::cti_op_del_by_val): (JSC::Interpreter::cti_op_put_getter): (JSC::Interpreter::cti_op_put_setter): (JSC::Interpreter::cti_op_new_error): (JSC::Interpreter::cti_op_debug): (JSC::Interpreter::cti_vm_throw):
  • VM/Machine.h:
  • VM/Register.h:
  • VM/SamplingTool.cpp: (JSC::SamplingTool::dump):
  • VM/SamplingTool.h: (JSC::SamplingTool::SamplingTool):
  • bytecompiler/CodeGenerator.cpp: (JSC::BytecodeGenerator::generate): (JSC::BytecodeGenerator::BytecodeGenerator):
  • jsc.cpp: (runWithScripts):
  • masm/X86Assembler.h: (JSC::AssemblerBuffer::executableCopy): (JSC::X86Assembler::executableCopy):
  • runtime/ExecState.h: (JSC::ExecState::interpreter):
  • runtime/JSCell.h:
  • runtime/JSFunction.h:
  • runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData):
  • runtime/JSGlobalData.h:
  • runtime/JSImmediate.h:
  • runtime/JSString.h:
  • runtime/JSValue.h:
  • runtime/JSVariableObject.h:
  • runtime/RegExp.cpp: (JSC::RegExp::RegExp): (JSC::RegExp::~RegExp): (JSC::RegExp::match):
  • runtime/RegExp.h:
  • wrec/CharacterClassConstructor.cpp:
  • wrec/CharacterClassConstructor.h:
  • wrec/WREC.cpp: (JSC::WREC::compileRegExp):
  • wrec/WREC.h: (JSC::WREC::Generator::Generator): (JSC::WREC::Parser::): (JSC::WREC::Parser::Parser): (JSC::WREC::Parser::parseAlternative):
Location:
trunk/JavaScriptCore
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r38457 r38461  
     12008-11-16  Geoffrey Garen  <[email protected]>
     2
     3        Reviewed by Sam Weinig.
     4
     5        A few more renames:
     6
     7        BytecodeInterpreter => Interpreter
     8        WREC => JSC::WREC, removing JSC:: prefix in a lot of places
     9        X86Assembler::copy => X86Assembler::executableCopy
     10        AssemblerBuffer::copy => AssemblerBuffer::executableCopy
     11        WRECFunction => WREC::RegExpFunction
     12        OBJECT_OFFSET => FIELD_OFFSET
     13       
     14        Also:
     15
     16        Nixed use of OBJECT_OFFSET outside of CTI.cpp by making CTI a friend in more places.
     17        Nixed X86:: and X86Assembler:: prefixes in a lot of places using typedefs
     18
     19        * JavaScriptCore.exp:
     20        * VM/CTI.cpp:
     21        (JSC::):
     22        (JSC::CTI::emitGetVirtualRegister):
     23        (JSC::CTI::emitGetVirtualRegisters):
     24        (JSC::CTI::emitPutCTIArgFromVirtualRegister):
     25        (JSC::CTI::emitPutCTIArg):
     26        (JSC::CTI::emitGetCTIArg):
     27        (JSC::CTI::emitPutCTIParam):
     28        (JSC::CTI::emitGetCTIParam):
     29        (JSC::CTI::emitPutToCallFrameHeader):
     30        (JSC::CTI::emitGetFromCallFrameHeader):
     31        (JSC::CTI::emitPutVirtualRegister):
     32        (JSC::CTI::emitNakedCall):
     33        (JSC::CTI::emitNakedFastCall):
     34        (JSC::CTI::emitCTICall):
     35        (JSC::CTI::emitJumpSlowCaseIfNotJSCell):
     36        (JSC::CTI::emitJumpSlowCaseIfNotImmNum):
     37        (JSC::CTI::emitJumpSlowCaseIfNotImmNums):
     38        (JSC::CTI::emitFastArithDeTagImmediate):
     39        (JSC::CTI::emitFastArithDeTagImmediateJumpIfZero):
     40        (JSC::CTI::emitFastArithReTagImmediate):
     41        (JSC::CTI::emitFastArithPotentiallyReTagImmediate):
     42        (JSC::CTI::emitFastArithImmToInt):
     43        (JSC::CTI::emitFastArithIntToImmOrSlowCase):
     44        (JSC::CTI::emitFastArithIntToImmNoCheck):
     45        (JSC::CTI::emitArithIntToImmWithJump):
     46        (JSC::CTI::emitTagAsBoolImmediate):
     47        (JSC::CTI::compileOpCallInitializeCallFrame):
     48        (JSC::CTI::compileOpCall):
     49        (JSC::CTI::compileOpStrictEq):
     50        (JSC::CTI::emitSlowScriptCheck):
     51        (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate):
     52        (JSC::CTI::compileBinaryArithOp):
     53        (JSC::CTI::compileBinaryArithOpSlowCase):
     54        (JSC::CTI::privateCompileMainPass):
     55        (JSC::CTI::privateCompileSlowCases):
     56        (JSC::CTI::privateCompile):
     57        (JSC::CTI::privateCompileGetByIdSelf):
     58        (JSC::CTI::privateCompileGetByIdProto):
     59        (JSC::CTI::privateCompileGetByIdChain):
     60        (JSC::CTI::privateCompilePutByIdReplace):
     61        (JSC::CTI::privateCompilePutByIdTransition):
     62        (JSC::CTI::privateCompileCTIMachineTrampolines):
     63        (JSC::CTI::freeCTIMachineTrampolines):
     64        (JSC::CTI::patchGetByIdSelf):
     65        (JSC::CTI::patchPutByIdReplace):
     66        (JSC::CTI::privateCompilePatchGetArrayLength):
     67        (JSC::CTI::emitGetVariableObjectRegister):
     68        (JSC::CTI::emitPutVariableObjectRegister):
     69        * VM/CTI.h:
     70        (JSC::CallRecord::CallRecord):
     71        (JSC::JmpTable::JmpTable):
     72        (JSC::SlowCaseEntry::SlowCaseEntry):
     73        (JSC::CTI::JSRInfo::JSRInfo):
     74        * VM/CodeBlock.cpp:
     75        (JSC::CodeBlock::printStructures):
     76        (JSC::CodeBlock::derefStructures):
     77        (JSC::CodeBlock::refStructures):
     78        * VM/Machine.cpp:
     79        (JSC::jsLess):
     80        (JSC::jsLessEq):
     81        (JSC::Interpreter::resolve):
     82        (JSC::Interpreter::resolveSkip):
     83        (JSC::Interpreter::resolveGlobal):
     84        (JSC::Interpreter::resolveBase):
     85        (JSC::Interpreter::resolveBaseAndProperty):
     86        (JSC::Interpreter::resolveBaseAndFunc):
     87        (JSC::Interpreter::slideRegisterWindowForCall):
     88        (JSC::Interpreter::callEval):
     89        (JSC::Interpreter::Interpreter):
     90        (JSC::Interpreter::initialize):
     91        (JSC::Interpreter::~Interpreter):
     92        (JSC::Interpreter::dumpCallFrame):
     93        (JSC::Interpreter::dumpRegisters):
     94        (JSC::Interpreter::isOpcode):
     95        (JSC::Interpreter::unwindCallFrame):
     96        (JSC::Interpreter::throwException):
     97        (JSC::Interpreter::execute):
     98        (JSC::Interpreter::debug):
     99        (JSC::Interpreter::resetTimeoutCheck):
     100        (JSC::Interpreter::checkTimeout):
     101        (JSC::Interpreter::createExceptionScope):
     102        (JSC::Interpreter::tryCachePutByID):
     103        (JSC::Interpreter::uncachePutByID):
     104        (JSC::Interpreter::tryCacheGetByID):
     105        (JSC::Interpreter::uncacheGetByID):
     106        (JSC::Interpreter::privateExecute):
     107        (JSC::Interpreter::retrieveArguments):
     108        (JSC::Interpreter::retrieveCaller):
     109        (JSC::Interpreter::retrieveLastCaller):
     110        (JSC::Interpreter::findFunctionCallFrame):
     111        (JSC::Interpreter::tryCTICachePutByID):
     112        (JSC::Interpreter::tryCTICacheGetByID):
     113        (JSC::):
     114        (JSC::Interpreter::cti_op_convert_this):
     115        (JSC::Interpreter::cti_op_end):
     116        (JSC::Interpreter::cti_op_add):
     117        (JSC::Interpreter::cti_op_pre_inc):
     118        (JSC::Interpreter::cti_timeout_check):
     119        (JSC::Interpreter::cti_register_file_check):
     120        (JSC::Interpreter::cti_op_loop_if_less):
     121        (JSC::Interpreter::cti_op_loop_if_lesseq):
     122        (JSC::Interpreter::cti_op_new_object):
     123        (JSC::Interpreter::cti_op_put_by_id):
     124        (JSC::Interpreter::cti_op_put_by_id_second):
     125        (JSC::Interpreter::cti_op_put_by_id_generic):
     126        (JSC::Interpreter::cti_op_put_by_id_fail):
     127        (JSC::Interpreter::cti_op_get_by_id):
     128        (JSC::Interpreter::cti_op_get_by_id_second):
     129        (JSC::Interpreter::cti_op_get_by_id_generic):
     130        (JSC::Interpreter::cti_op_get_by_id_fail):
     131        (JSC::Interpreter::cti_op_instanceof):
     132        (JSC::Interpreter::cti_op_del_by_id):
     133        (JSC::Interpreter::cti_op_mul):
     134        (JSC::Interpreter::cti_op_new_func):
     135        (JSC::Interpreter::cti_op_call_JSFunction):
     136        (JSC::Interpreter::cti_op_call_arityCheck):
     137        (JSC::Interpreter::cti_vm_dontLazyLinkCall):
     138        (JSC::Interpreter::cti_vm_lazyLinkCall):
     139        (JSC::Interpreter::cti_op_push_activation):
     140        (JSC::Interpreter::cti_op_call_NotJSFunction):
     141        (JSC::Interpreter::cti_op_create_arguments):
     142        (JSC::Interpreter::cti_op_create_arguments_no_params):
     143        (JSC::Interpreter::cti_op_tear_off_activation):
     144        (JSC::Interpreter::cti_op_tear_off_arguments):
     145        (JSC::Interpreter::cti_op_profile_will_call):
     146        (JSC::Interpreter::cti_op_profile_did_call):
     147        (JSC::Interpreter::cti_op_ret_scopeChain):
     148        (JSC::Interpreter::cti_op_new_array):
     149        (JSC::Interpreter::cti_op_resolve):
     150        (JSC::Interpreter::cti_op_construct_JSConstruct):
     151        (JSC::Interpreter::cti_op_construct_NotJSConstruct):
     152        (JSC::Interpreter::cti_op_get_by_val):
     153        (JSC::Interpreter::cti_op_resolve_func):
     154        (JSC::Interpreter::cti_op_sub):
     155        (JSC::Interpreter::cti_op_put_by_val):
     156        (JSC::Interpreter::cti_op_put_by_val_array):
     157        (JSC::Interpreter::cti_op_lesseq):
     158        (JSC::Interpreter::cti_op_loop_if_true):
     159        (JSC::Interpreter::cti_op_negate):
     160        (JSC::Interpreter::cti_op_resolve_base):
     161        (JSC::Interpreter::cti_op_resolve_skip):
     162        (JSC::Interpreter::cti_op_resolve_global):
     163        (JSC::Interpreter::cti_op_div):
     164        (JSC::Interpreter::cti_op_pre_dec):
     165        (JSC::Interpreter::cti_op_jless):
     166        (JSC::Interpreter::cti_op_not):
     167        (JSC::Interpreter::cti_op_jtrue):
     168        (JSC::Interpreter::cti_op_post_inc):
     169        (JSC::Interpreter::cti_op_eq):
     170        (JSC::Interpreter::cti_op_lshift):
     171        (JSC::Interpreter::cti_op_bitand):
     172        (JSC::Interpreter::cti_op_rshift):
     173        (JSC::Interpreter::cti_op_bitnot):
     174        (JSC::Interpreter::cti_op_resolve_with_base):
     175        (JSC::Interpreter::cti_op_new_func_exp):
     176        (JSC::Interpreter::cti_op_mod):
     177        (JSC::Interpreter::cti_op_less):
     178        (JSC::Interpreter::cti_op_neq):
     179        (JSC::Interpreter::cti_op_post_dec):
     180        (JSC::Interpreter::cti_op_urshift):
     181        (JSC::Interpreter::cti_op_bitxor):
     182        (JSC::Interpreter::cti_op_new_regexp):
     183        (JSC::Interpreter::cti_op_bitor):
     184        (JSC::Interpreter::cti_op_call_eval):
     185        (JSC::Interpreter::cti_op_throw):
     186        (JSC::Interpreter::cti_op_get_pnames):
     187        (JSC::Interpreter::cti_op_next_pname):
     188        (JSC::Interpreter::cti_op_push_scope):
     189        (JSC::Interpreter::cti_op_pop_scope):
     190        (JSC::Interpreter::cti_op_typeof):
     191        (JSC::Interpreter::cti_op_is_undefined):
     192        (JSC::Interpreter::cti_op_is_boolean):
     193        (JSC::Interpreter::cti_op_is_number):
     194        (JSC::Interpreter::cti_op_is_string):
     195        (JSC::Interpreter::cti_op_is_object):
     196        (JSC::Interpreter::cti_op_is_function):
     197        (JSC::Interpreter::cti_op_stricteq):
     198        (JSC::Interpreter::cti_op_nstricteq):
     199        (JSC::Interpreter::cti_op_to_jsnumber):
     200        (JSC::Interpreter::cti_op_in):
     201        (JSC::Interpreter::cti_op_push_new_scope):
     202        (JSC::Interpreter::cti_op_jmp_scopes):
     203        (JSC::Interpreter::cti_op_put_by_index):
     204        (JSC::Interpreter::cti_op_switch_imm):
     205        (JSC::Interpreter::cti_op_switch_char):
     206        (JSC::Interpreter::cti_op_switch_string):
     207        (JSC::Interpreter::cti_op_del_by_val):
     208        (JSC::Interpreter::cti_op_put_getter):
     209        (JSC::Interpreter::cti_op_put_setter):
     210        (JSC::Interpreter::cti_op_new_error):
     211        (JSC::Interpreter::cti_op_debug):
     212        (JSC::Interpreter::cti_vm_throw):
     213        * VM/Machine.h:
     214        * VM/Register.h:
     215        * VM/SamplingTool.cpp:
     216        (JSC::SamplingTool::dump):
     217        * VM/SamplingTool.h:
     218        (JSC::SamplingTool::SamplingTool):
     219        * bytecompiler/CodeGenerator.cpp:
     220        (JSC::BytecodeGenerator::generate):
     221        (JSC::BytecodeGenerator::BytecodeGenerator):
     222        * jsc.cpp:
     223        (runWithScripts):
     224        * masm/X86Assembler.h:
     225        (JSC::AssemblerBuffer::executableCopy):
     226        (JSC::X86Assembler::executableCopy):
     227        * runtime/ExecState.h:
     228        (JSC::ExecState::interpreter):
     229        * runtime/JSCell.h:
     230        * runtime/JSFunction.h:
     231        * runtime/JSGlobalData.cpp:
     232        (JSC::JSGlobalData::JSGlobalData):
     233        * runtime/JSGlobalData.h:
     234        * runtime/JSImmediate.h:
     235        * runtime/JSString.h:
     236        * runtime/JSValue.h:
     237        * runtime/JSVariableObject.h:
     238        * runtime/RegExp.cpp:
     239        (JSC::RegExp::RegExp):
     240        (JSC::RegExp::~RegExp):
     241        (JSC::RegExp::match):
     242        * runtime/RegExp.h:
     243        * wrec/CharacterClassConstructor.cpp:
     244        * wrec/CharacterClassConstructor.h:
     245        * wrec/WREC.cpp:
     246        (JSC::WREC::compileRegExp):
     247        * wrec/WREC.h:
     248        (JSC::WREC::Generator::Generator):
     249        (JSC::WREC::Parser::):
     250        (JSC::WREC::Parser::Parser):
     251        (JSC::WREC::Parser::parseAlternative):
     252
    12532008-11-16  Greg Bolsinga  <[email protected]>
    2254
  • trunk/JavaScriptCore/JavaScriptCore.exp

    r38444 r38461  
    300300__ZN3WTF8CollatorD1Ev
    301301__ZN3WTF8fastFreeEPv
     302__ZNK3JSC11Interpreter14retrieveCallerEPNS_9ExecStateEPNS_16InternalFunctionE
     303__ZNK3JSC11Interpreter18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERPNS_7JSValueE
    302304__ZNK3JSC12DateInstance7getTimeERdRi
    303305__ZNK3JSC12StringObject12toThisStringEPNS_9ExecStateE
     
    312314__ZNK3JSC17DebuggerCallFrame4typeEv
    313315__ZNK3JSC17DebuggerCallFrame8evaluateERKNS_7UStringERPNS_7JSValueE
    314 __ZNK3JSC19BytecodeInterpreter14retrieveCallerEPNS_9ExecStateEPNS_16InternalFunctionE
    315 __ZNK3JSC19BytecodeInterpreter18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERPNS_7JSValueE
    316316__ZNK3JSC6JSCell12toThisObjectEPNS_9ExecStateE
    317317__ZNK3JSC6JSCell12toThisStringEPNS_9ExecStateE
  • trunk/JavaScriptCore/VM/CTI.cpp

    r38440 r38461  
    4141#endif
    4242
     43// FIELD_OFFSET: A clone of the C++ "offsetof" macro that can be used with classes,
     44// at the expense of some type safety.
     45// The magic number 0x4000 here has no significance. We use it to avoid using NULL,
     46// because NULL can have unexpected compiler effects, particularly in cases of
     47// multiple inheritance.
     48#define FIELD_OFFSET(class, member) (reinterpret_cast<ptrdiff_t>(&(reinterpret_cast<class*>(0x4000)->member)) - 0x4000)
     49
    4350#define __ m_assembler.
    4451
     
    4653
    4754namespace JSC {
     55
     56typedef X86Assembler::JmpSrc JmpSrc;
    4857
    4958#if PLATFORM(MAC)
     
    120129    "movl %esp, 0(%esp)" "\n"
    121130#endif
    122     "call " SYMBOL_STRING(_ZN3JSC19BytecodeInterpreter12cti_vm_throwEPPv) "\n"
     131    "call " SYMBOL_STRING(_ZN3JSC11Interpreter12cti_vm_throwEPPv) "\n"
    123132#else
    124     "call " SYMBOL_STRING(_ZN3JSC19BytecodeInterpreter12cti_vm_throwEPvz) "\n"
     133    "call " SYMBOL_STRING(_ZN3JSC11Interpreter12cti_vm_throwEPvz) "\n"
    125134#endif
    126135    "addl $0x20, %esp" "\n"
     
    158167        __asm {
    159168            mov ecx, esp;
    160             call JSC::BytecodeInterpreter::cti_vm_throw;
     169            call JSC::Interpreter::cti_vm_throw;
    161170            add esp, 0x20;
    162171            pop ebx;
     
    182191
    183192// get arg puts an arg from the SF register array into a h/w register
    184 ALWAYS_INLINE void CTI::emitGetVirtualRegister(int src, X86Assembler::RegisterID dst, unsigned currentInstructionIndex)
     193ALWAYS_INLINE void CTI::emitGetVirtualRegister(int src, RegisterID dst, unsigned currentInstructionIndex)
    185194{
    186195    // TODO: we want to reuse values that are already in registers if we can - add a register allocator!
     
    213222}
    214223
    215 ALWAYS_INLINE void CTI::emitGetVirtualRegisters(int src1, X86Assembler::RegisterID dst1, int src2, X86Assembler::RegisterID dst2, unsigned i)
     224ALWAYS_INLINE void CTI::emitGetVirtualRegisters(int src1, RegisterID dst1, int src2, RegisterID dst2, unsigned i)
    216225{
    217226    if (src2 == m_lastResultBytecodeRegister) {
     
    225234
    226235// get arg puts an arg from the SF register array onto the stack, as an arg to a context threaded function.
    227 ALWAYS_INLINE void CTI::emitPutCTIArgFromVirtualRegister(unsigned src, unsigned offset, X86Assembler::RegisterID scratch)
     236ALWAYS_INLINE void CTI::emitPutCTIArgFromVirtualRegister(unsigned src, unsigned offset, RegisterID scratch)
    228237{
    229238    if (m_codeBlock->isConstantRegisterIndex(src)) {
     
    239248
    240249// puts an arg onto the stack, as an arg to a context threaded function.
    241 ALWAYS_INLINE void CTI::emitPutCTIArg(X86Assembler::RegisterID src, unsigned offset)
     250ALWAYS_INLINE void CTI::emitPutCTIArg(RegisterID src, unsigned offset)
    242251{
    243252    __ movl_rm(src, offset + sizeof(void*), X86::esp);
    244253}
    245254
    246 ALWAYS_INLINE void CTI::emitGetCTIArg(unsigned offset, X86Assembler::RegisterID dst)
     255ALWAYS_INLINE void CTI::emitGetCTIArg(unsigned offset, RegisterID dst)
    247256{
    248257    __ movl_mr(offset + sizeof(void*), X86::esp, dst);
     
    269278}
    270279
    271 ALWAYS_INLINE void CTI::emitPutCTIParam(X86Assembler::RegisterID from, unsigned name)
     280ALWAYS_INLINE void CTI::emitPutCTIParam(RegisterID from, unsigned name)
    272281{
    273282    __ movl_rm(from, name * sizeof(void*), X86::esp);
    274283}
    275284
    276 ALWAYS_INLINE void CTI::emitGetCTIParam(unsigned name, X86Assembler::RegisterID to)
     285ALWAYS_INLINE void CTI::emitGetCTIParam(unsigned name, RegisterID to)
    277286{
    278287    __ movl_mr(name * sizeof(void*), X86::esp, to);
     
    280289}
    281290
    282 ALWAYS_INLINE void CTI::emitPutToCallFrameHeader(X86Assembler::RegisterID from, RegisterFile::CallFrameHeaderEntry entry)
     291ALWAYS_INLINE void CTI::emitPutToCallFrameHeader(RegisterID from, RegisterFile::CallFrameHeaderEntry entry)
    283292{
    284293    __ movl_rm(from, entry * sizeof(Register), X86::edi);
    285294}
    286295
    287 ALWAYS_INLINE void CTI::emitGetFromCallFrameHeader(RegisterFile::CallFrameHeaderEntry entry, X86Assembler::RegisterID to)
     296ALWAYS_INLINE void CTI::emitGetFromCallFrameHeader(RegisterFile::CallFrameHeaderEntry entry, RegisterID to)
    288297{
    289298    __ movl_mr(entry * sizeof(Register), X86::edi, to);
     
    291300}
    292301
    293 ALWAYS_INLINE void CTI::emitPutVirtualRegister(unsigned dst, X86Assembler::RegisterID from)
     302ALWAYS_INLINE void CTI::emitPutVirtualRegister(unsigned dst, RegisterID from)
    294303{
    295304    __ movl_rm(from, dst * sizeof(Register), X86::edi);
     
    366375}
    367376
    368 ALWAYS_INLINE X86Assembler::JmpSrc CTI::emitNakedCall(unsigned bytecodeIndex, X86::RegisterID r)
    369 {
    370     X86Assembler::JmpSrc call = __ emitCall(r);
     377ALWAYS_INLINE JmpSrc CTI::emitNakedCall(unsigned bytecodeIndex, X86::RegisterID r)
     378{
     379    JmpSrc call = __ emitCall(r);
    371380    m_calls.append(CallRecord(call, bytecodeIndex));
    372381
     
    374383}
    375384
    376 ALWAYS_INLINE  X86Assembler::JmpSrc CTI::emitNakedCall(unsigned bytecodeIndex, void* function)
    377 {
    378     X86Assembler::JmpSrc call = __ emitCall();
     385ALWAYS_INLINE  JmpSrc CTI::emitNakedCall(unsigned bytecodeIndex, void* function)
     386{
     387    JmpSrc call = __ emitCall();
    379388    m_calls.append(CallRecord(call, reinterpret_cast<CTIHelper_v>(function), bytecodeIndex));
    380389    return call;
    381390}
    382391
    383 ALWAYS_INLINE  X86Assembler::JmpSrc CTI::emitNakedFastCall(unsigned bytecodeIndex, void* function)
    384 {
    385     X86Assembler::JmpSrc call = __ emitCall();
     392ALWAYS_INLINE  JmpSrc CTI::emitNakedFastCall(unsigned bytecodeIndex, void* function)
     393{
     394    JmpSrc call = __ emitCall();
    386395    m_calls.append(CallRecord(call, reinterpret_cast<CTIHelper_v>(function), bytecodeIndex));
    387396    return call;
    388397}
    389398
    390 ALWAYS_INLINE X86Assembler::JmpSrc CTI::emitCTICall(Instruction* vPC, unsigned bytecodeIndex, CTIHelper_j helper)
     399ALWAYS_INLINE JmpSrc CTI::emitCTICall(Instruction* vPC, unsigned bytecodeIndex, CTIHelper_j helper)
    391400{
    392401#if ENABLE(OPCODE_SAMPLING)
     
    397406    __ emitRestoreArgumentReference();
    398407    emitPutCTIParam(X86::edi, CTI_ARGS_callFrame);
    399     X86Assembler::JmpSrc call = __ emitCall();
     408    JmpSrc call = __ emitCall();
    400409    m_calls.append(CallRecord(call, helper, bytecodeIndex));
    401410#if ENABLE(OPCODE_SAMPLING)
     
    407416}
    408417
    409 ALWAYS_INLINE X86Assembler::JmpSrc CTI::emitCTICall(Instruction* vPC, unsigned bytecodeIndex, CTIHelper_o helper)
     418ALWAYS_INLINE JmpSrc CTI::emitCTICall(Instruction* vPC, unsigned bytecodeIndex, CTIHelper_o helper)
    410419{
    411420#if ENABLE(OPCODE_SAMPLING)
     
    416425    __ emitRestoreArgumentReference();
    417426    emitPutCTIParam(X86::edi, CTI_ARGS_callFrame);
    418     X86Assembler::JmpSrc call = __ emitCall();
     427    JmpSrc call = __ emitCall();
    419428    m_calls.append(CallRecord(call, helper, bytecodeIndex));
    420429#if ENABLE(OPCODE_SAMPLING)
     
    426435}
    427436
    428 ALWAYS_INLINE X86Assembler::JmpSrc CTI::emitCTICall(Instruction* vPC, unsigned bytecodeIndex, CTIHelper_p helper)
     437ALWAYS_INLINE JmpSrc CTI::emitCTICall(Instruction* vPC, unsigned bytecodeIndex, CTIHelper_p helper)
    429438{
    430439#if ENABLE(OPCODE_SAMPLING)
     
    435444    __ emitRestoreArgumentReference();
    436445    emitPutCTIParam(X86::edi, CTI_ARGS_callFrame);
    437     X86Assembler::JmpSrc call = __ emitCall();
     446    JmpSrc call = __ emitCall();
    438447    m_calls.append(CallRecord(call, helper, bytecodeIndex));
    439448#if ENABLE(OPCODE_SAMPLING)
     
    445454}
    446455
    447 ALWAYS_INLINE X86Assembler::JmpSrc CTI::emitCTICall(Instruction* vPC, unsigned bytecodeIndex, CTIHelper_b helper)
     456ALWAYS_INLINE JmpSrc CTI::emitCTICall(Instruction* vPC, unsigned bytecodeIndex, CTIHelper_b helper)
    448457{
    449458#if ENABLE(OPCODE_SAMPLING)
     
    454463    __ emitRestoreArgumentReference();
    455464    emitPutCTIParam(X86::edi, CTI_ARGS_callFrame);
    456     X86Assembler::JmpSrc call = __ emitCall();
     465    JmpSrc call = __ emitCall();
    457466    m_calls.append(CallRecord(call, helper, bytecodeIndex));
    458467#if ENABLE(OPCODE_SAMPLING)
     
    464473}
    465474
    466 ALWAYS_INLINE X86Assembler::JmpSrc CTI::emitCTICall(Instruction* vPC, unsigned bytecodeIndex, CTIHelper_v helper)
     475ALWAYS_INLINE JmpSrc CTI::emitCTICall(Instruction* vPC, unsigned bytecodeIndex, CTIHelper_v helper)
    467476{
    468477#if ENABLE(OPCODE_SAMPLING)
     
    473482    __ emitRestoreArgumentReference();
    474483    emitPutCTIParam(X86::edi, CTI_ARGS_callFrame);
    475     X86Assembler::JmpSrc call = __ emitCall();
     484    JmpSrc call = __ emitCall();
    476485    m_calls.append(CallRecord(call, helper, bytecodeIndex));
    477486#if ENABLE(OPCODE_SAMPLING)
     
    483492}
    484493
    485 ALWAYS_INLINE X86Assembler::JmpSrc CTI::emitCTICall(Instruction* vPC, unsigned bytecodeIndex, CTIHelper_s helper)
     494ALWAYS_INLINE JmpSrc CTI::emitCTICall(Instruction* vPC, unsigned bytecodeIndex, CTIHelper_s helper)
    486495{
    487496#if ENABLE(OPCODE_SAMPLING)
     
    492501    __ emitRestoreArgumentReference();
    493502    emitPutCTIParam(X86::edi, CTI_ARGS_callFrame);
    494     X86Assembler::JmpSrc call = __ emitCall();
     503    JmpSrc call = __ emitCall();
    495504    m_calls.append(CallRecord(call, helper, bytecodeIndex));
    496505#if ENABLE(OPCODE_SAMPLING)
     
    502511}
    503512
    504 ALWAYS_INLINE X86Assembler::JmpSrc CTI::emitCTICall(Instruction* vPC, unsigned bytecodeIndex, CTIHelper_2 helper)
     513ALWAYS_INLINE JmpSrc CTI::emitCTICall(Instruction* vPC, unsigned bytecodeIndex, CTIHelper_2 helper)
    505514{
    506515#if ENABLE(OPCODE_SAMPLING)
     
    511520    __ emitRestoreArgumentReference();
    512521    emitPutCTIParam(X86::edi, CTI_ARGS_callFrame);
    513     X86Assembler::JmpSrc call = __ emitCall();
     522    JmpSrc call = __ emitCall();
    514523    m_calls.append(CallRecord(call, helper, bytecodeIndex));
    515524#if ENABLE(OPCODE_SAMPLING)
     
    521530}
    522531
    523 ALWAYS_INLINE void CTI::emitJumpSlowCaseIfNotJSCell(X86Assembler::RegisterID reg, unsigned bytecodeIndex)
     532ALWAYS_INLINE void CTI::emitJumpSlowCaseIfNotJSCell(RegisterID reg, unsigned bytecodeIndex)
    524533{
    525534    __ testl_i32r(JSImmediate::TagMask, reg);
     
    527536}
    528537
    529 ALWAYS_INLINE void CTI::emitJumpSlowCaseIfNotJSCell(X86Assembler::RegisterID reg, unsigned bytecodeIndex, int vReg)
     538ALWAYS_INLINE void CTI::emitJumpSlowCaseIfNotJSCell(RegisterID reg, unsigned bytecodeIndex, int vReg)
    530539{
    531540    if (m_codeBlock->isKnownNotImmediate(vReg))
     
    544553}
    545554
    546 ALWAYS_INLINE void CTI::emitJumpSlowCaseIfNotImmNum(X86Assembler::RegisterID reg, unsigned bytecodeIndex)
     555ALWAYS_INLINE void CTI::emitJumpSlowCaseIfNotImmNum(RegisterID reg, unsigned bytecodeIndex)
    547556{
    548557    __ testl_i32r(JSImmediate::TagBitTypeInteger, reg);
     
    550559}
    551560
    552 ALWAYS_INLINE void CTI::emitJumpSlowCaseIfNotImmNums(X86Assembler::RegisterID reg1, X86Assembler::RegisterID reg2, unsigned bytecodeIndex)
     561ALWAYS_INLINE void CTI::emitJumpSlowCaseIfNotImmNums(RegisterID reg1, RegisterID reg2, unsigned bytecodeIndex)
    553562{
    554563    __ movl_rr(reg1, X86::ecx);
     
    563572}
    564573
    565 ALWAYS_INLINE void CTI::emitFastArithDeTagImmediate(X86Assembler::RegisterID reg)
     574ALWAYS_INLINE void CTI::emitFastArithDeTagImmediate(RegisterID reg)
    566575{
    567576    __ subl_i8r(JSImmediate::TagBitTypeInteger, reg);
    568577}
    569578
    570 ALWAYS_INLINE X86Assembler::JmpSrc CTI::emitFastArithDeTagImmediateJumpIfZero(X86Assembler::RegisterID reg)
     579ALWAYS_INLINE JmpSrc CTI::emitFastArithDeTagImmediateJumpIfZero(RegisterID reg)
    571580{
    572581    __ subl_i8r(JSImmediate::TagBitTypeInteger, reg);
     
    574583}
    575584
    576 ALWAYS_INLINE void CTI::emitFastArithReTagImmediate(X86Assembler::RegisterID reg)
     585ALWAYS_INLINE void CTI::emitFastArithReTagImmediate(RegisterID reg)
    577586{
    578587    __ addl_i8r(JSImmediate::TagBitTypeInteger, reg);
    579588}
    580589
    581 ALWAYS_INLINE void CTI::emitFastArithPotentiallyReTagImmediate(X86Assembler::RegisterID reg)
     590ALWAYS_INLINE void CTI::emitFastArithPotentiallyReTagImmediate(RegisterID reg)
    582591{
    583592    __ orl_i32r(JSImmediate::TagBitTypeInteger, reg);
    584593}
    585594
    586 ALWAYS_INLINE void CTI::emitFastArithImmToInt(X86Assembler::RegisterID reg)
     595ALWAYS_INLINE void CTI::emitFastArithImmToInt(RegisterID reg)
    587596{
    588597    __ sarl_i8r(1, reg);
    589598}
    590599
    591 ALWAYS_INLINE void CTI::emitFastArithIntToImmOrSlowCase(X86Assembler::RegisterID reg, unsigned bytecodeIndex)
     600ALWAYS_INLINE void CTI::emitFastArithIntToImmOrSlowCase(RegisterID reg, unsigned bytecodeIndex)
    592601{
    593602    __ addl_rr(reg, reg);
     
    596605}
    597606
    598 ALWAYS_INLINE void CTI::emitFastArithIntToImmNoCheck(X86Assembler::RegisterID reg)
     607ALWAYS_INLINE void CTI::emitFastArithIntToImmNoCheck(RegisterID reg)
    599608{
    600609    __ addl_rr(reg, reg);
     
    602611}
    603612
    604 ALWAYS_INLINE X86Assembler::JmpSrc CTI::emitArithIntToImmWithJump(X86Assembler::RegisterID reg)
     613ALWAYS_INLINE JmpSrc CTI::emitArithIntToImmWithJump(RegisterID reg)
    605614{
    606615    __ addl_rr(reg, reg);
    607     X86Assembler::JmpSrc jmp = __ emitUnlinkedJo();
     616    JmpSrc jmp = __ emitUnlinkedJo();
    608617    emitFastArithReTagImmediate(reg);
    609618    return jmp;
    610619}
    611620
    612 ALWAYS_INLINE void CTI::emitTagAsBoolImmediate(X86Assembler::RegisterID reg)
     621ALWAYS_INLINE void CTI::emitTagAsBoolImmediate(RegisterID reg)
    613622{
    614623    __ shl_i8r(JSImmediate::ExtendedPayloadShift, reg);
     
    633642        emitPutCTIArgFromVirtualRegister(instruction[i + 2].u.operand, 0, X86::ecx); \
    634643        emitPutCTIArgFromVirtualRegister(instruction[i + 3].u.operand, 4, X86::ecx); \
    635         emitCTICall(instruction + i, i, BytecodeInterpreter::cti_##name); \
     644        emitCTICall(instruction + i, i, Interpreter::cti_##name); \
    636645        emitPutVirtualRegister(instruction[i + 1].u.operand); \
    637646        i += 4; \
     
    642651    case name: { \
    643652        emitPutCTIArgFromVirtualRegister(instruction[i + 2].u.operand, 0, X86::ecx); \
    644         emitCTICall(instruction + i, i, BytecodeInterpreter::cti_##name); \
     653        emitCTICall(instruction + i, i, Interpreter::cti_##name); \
    645654        emitPutVirtualRegister(instruction[i + 1].u.operand); \
    646655        i += 3; \
     
    658667    __ movl_rm(X86::edx, RegisterFile::ArgumentCount * static_cast<int>(sizeof(Register)), X86::edi);
    659668
    660     __ movl_mr(OBJECT_OFFSET(JSFunction, m_scopeChain) + OBJECT_OFFSET(ScopeChain, m_node), X86::ecx, X86::edx); // newScopeChain
     669    __ movl_mr(FIELD_OFFSET(JSFunction, m_scopeChain) + FIELD_OFFSET(ScopeChain, m_node), X86::ecx, X86::edx); // newScopeChain
    661670
    662671    __ movl_i32m(asInteger(noValue()), RegisterFile::OptionalCalleeArguments * static_cast<int>(sizeof(Register)), X86::edi);
     
    713722
    714723    // Handle eval
    715     X86Assembler::JmpSrc wasEval;
     724    JmpSrc wasEval;
    716725    if (opcodeID == op_call_eval) {
    717726        emitGetVirtualRegister(callee, X86::ecx, i);
    718727        compileOpCallEvalSetupArgs(instruction);
    719728
    720         emitCTICall(instruction, i, BytecodeInterpreter::cti_op_call_eval);
     729        emitCTICall(instruction, i, Interpreter::cti_op_call_eval);
    721730        __ cmpl_i32r(asInteger(JSImmediate::impossibleValue()), X86::eax);
    722731        wasEval = __ emitUnlinkedJne();
     
    727736    emitGetVirtualRegister(callee, X86::ecx, i);
    728737    __ cmpl_i32r(asInteger(JSImmediate::impossibleValue()), X86::ecx);
    729     X86Assembler::JmpDst addressOfLinkedFunctionCheck = __ label();
     738    JmpDst addressOfLinkedFunctionCheck = __ label();
    730739    m_slowCases.append(SlowCaseEntry(__ emitUnlinkedJne(), i));
    731     ASSERT(X86Assembler::getDifferenceBetweenLabels(addressOfLinkedFunctionCheck, __ label()) == repatchOffsetOpCallCall);
     740    ASSERT(__ getDifferenceBetweenLabels(addressOfLinkedFunctionCheck, __ label()) == repatchOffsetOpCallCall);
    732741    m_callStructureStubCompilationInfo[callLinkInfoIndex].hotPathBegin = addressOfLinkedFunctionCheck;
    733742
     
    741750        emitPutCTIArg(X86::ecx, 0);
    742751        emitPutCTIArgFromVirtualRegister(proto, 12, X86::eax);
    743         emitCTICall(instruction, i, BytecodeInterpreter::cti_op_construct_JSConstruct);
     752        emitCTICall(instruction, i, Interpreter::cti_op_construct_JSConstruct);
    744753        emitPutVirtualRegister(thisRegister);
    745754        emitGetVirtualRegister(callee, X86::ecx, i);
     
    750759    __ movl_i32m(asInteger(noValue()), (registerOffset + RegisterFile::OptionalCalleeArguments) * static_cast<int>(sizeof(Register)), X86::edi);
    751760    __ movl_rm(X86::ecx, (registerOffset + RegisterFile::Callee) * static_cast<int>(sizeof(Register)), X86::edi);
    752     __ movl_mr(OBJECT_OFFSET(JSFunction, m_scopeChain) + OBJECT_OFFSET(ScopeChain, m_node), X86::ecx, X86::edx); // newScopeChain
     761    __ movl_mr(FIELD_OFFSET(JSFunction, m_scopeChain) + FIELD_OFFSET(ScopeChain, m_node), X86::ecx, X86::edx); // newScopeChain
    753762    __ movl_i32m(argCount, (registerOffset + RegisterFile::ArgumentCount) * static_cast<int>(sizeof(Register)), X86::edi);
    754763    __ movl_rm(X86::edi, (registerOffset + RegisterFile::CallerFrame) * static_cast<int>(sizeof(Register)), X86::edi);
     
    781790
    782791    __ testl_i32r(JSImmediate::TagMask, X86::eax);
    783     X86Assembler::JmpSrc firstNotImmediate = __ emitUnlinkedJe();
     792    JmpSrc firstNotImmediate = __ emitUnlinkedJe();
    784793    __ testl_i32r(JSImmediate::TagMask, X86::edx);
    785     X86Assembler::JmpSrc secondNotImmediate = __ emitUnlinkedJe();
     794    JmpSrc secondNotImmediate = __ emitUnlinkedJe();
    786795
    787796    __ cmpl_rr(X86::edx, X86::eax);
     
    793802    emitTagAsBoolImmediate(X86::eax);
    794803           
    795     X86Assembler::JmpSrc bothWereImmediates = __ emitUnlinkedJmp();
     804    JmpSrc bothWereImmediates = __ emitUnlinkedJmp();
    796805
    797806    __ link(firstNotImmediate, __ label());
     
    810819    __ movl_i32r(asInteger(jsBoolean(negated)), X86::eax);
    811820
    812     X86Assembler::JmpSrc firstWasNotImmediate = __ emitUnlinkedJmp();
     821    JmpSrc firstWasNotImmediate = __ emitUnlinkedJmp();
    813822
    814823    __ link(secondNotImmediate, __ label());
     
    828837{
    829838    __ subl_i8r(1, X86::esi);
    830     X86Assembler::JmpSrc skipTimeout = __ emitUnlinkedJne();
    831     emitCTICall(vPC, bytecodeIndex, BytecodeInterpreter::cti_timeout_check);
     839    JmpSrc skipTimeout = __ emitUnlinkedJne();
     840    emitCTICall(vPC, bytecodeIndex, Interpreter::cti_timeout_check);
    832841
    833842    emitGetCTIParam(CTI_ARGS_globalData, X86::ecx);
    834     __ movl_mr(OBJECT_OFFSET(JSGlobalData, interpreter), X86::ecx, X86::ecx);
    835     __ movl_mr(OBJECT_OFFSET(BytecodeInterpreter, m_ticksUntilNextTimeoutCheck), X86::ecx, X86::esi);
     843    __ movl_mr(FIELD_OFFSET(JSGlobalData, interpreter), X86::ecx, X86::ecx);
     844    __ movl_mr(FIELD_OFFSET(Interpreter, m_ticksUntilNextTimeoutCheck), X86::ecx, X86::esi);
    836845    __ link(skipTimeout, __ label());
    837846
     
    848857  control will fall through from the code planted.
    849858*/
    850 void CTI::putDoubleResultToJSNumberCellOrJSImmediate(X86::XMMRegisterID xmmSource, X86::RegisterID jsNumberCell, unsigned dst, X86Assembler::JmpSrc* wroteJSNumberCell,  X86::XMMRegisterID tempXmm, X86::RegisterID tempReg1, X86::RegisterID tempReg2)
     859void CTI::putDoubleResultToJSNumberCellOrJSImmediate(X86::XMMRegisterID xmmSource, X86::RegisterID jsNumberCell, unsigned dst, JmpSrc* wroteJSNumberCell,  X86::XMMRegisterID tempXmm, X86::RegisterID tempReg1, X86::RegisterID tempReg2)
    851860{
    852861    // convert (double -> JSImmediate -> double), and check if the value is unchanged - in which case the value is representable as a JSImmediate.
     
    857866    // Compare & branch if immediate.
    858867    __ ucomis_rr(tempXmm, xmmSource);
    859     X86Assembler::JmpSrc resultIsImm = __ emitUnlinkedJe();
    860     X86Assembler::JmpDst resultLookedLikeImmButActuallyIsnt = __ label();
     868    JmpSrc resultIsImm = __ emitUnlinkedJe();
     869    JmpDst resultLookedLikeImmButActuallyIsnt = __ label();
    861870   
    862871    // Store the result to the JSNumberCell and jump.
    863     __ movsd_rm(xmmSource, OBJECT_OFFSET(JSNumberCell, m_value), jsNumberCell);
     872    __ movsd_rm(xmmSource, FIELD_OFFSET(JSNumberCell, m_value), jsNumberCell);
    864873    if (jsNumberCell != X86::eax)
    865874        __ movl_rr(jsNumberCell, X86::eax);
     
    884893{
    885894    Structure* numberStructure = m_globalData->numberStructure.get();
    886     X86Assembler::JmpSrc wasJSNumberCell1;
    887     X86Assembler::JmpSrc wasJSNumberCell1b;
    888     X86Assembler::JmpSrc wasJSNumberCell2;
    889     X86Assembler::JmpSrc wasJSNumberCell2b;
     895    JmpSrc wasJSNumberCell1;
     896    JmpSrc wasJSNumberCell1b;
     897    JmpSrc wasJSNumberCell2;
     898    JmpSrc wasJSNumberCell2b;
    890899
    891900    emitGetVirtualRegisters(src1, X86::eax, src2, X86::edx, i);
     
    896905        // Check op2 is a number
    897906        __ testl_i32r(JSImmediate::TagBitTypeInteger, X86::edx);
    898         X86Assembler::JmpSrc op2imm = __ emitUnlinkedJne();
     907        JmpSrc op2imm = __ emitUnlinkedJne();
    899908        if (!types.second().definitelyIsNumber()) {
    900909            emitJumpSlowCaseIfNotJSCell(X86::edx, i, src2);
    901             __ cmpl_i32m(reinterpret_cast<unsigned>(numberStructure), OBJECT_OFFSET(JSCell, m_structure), X86::edx);
     910            __ cmpl_i32m(reinterpret_cast<unsigned>(numberStructure), FIELD_OFFSET(JSCell, m_structure), X86::edx);
    902911            m_slowCases.append(SlowCaseEntry(__ emitUnlinkedJne(), i));
    903912        }
     
    906915        //     Slow case if src1 is not a number type.
    907916        __ testl_i32r(JSImmediate::TagBitTypeInteger, X86::eax);
    908         X86Assembler::JmpSrc op1imm = __ emitUnlinkedJne();
     917        JmpSrc op1imm = __ emitUnlinkedJne();
    909918        if (!types.first().definitelyIsNumber()) {
    910919            emitJumpSlowCaseIfNotJSCell(X86::eax, i, src1);
    911             __ cmpl_i32m(reinterpret_cast<unsigned>(numberStructure), OBJECT_OFFSET(JSCell, m_structure), X86::eax);
     920            __ cmpl_i32m(reinterpret_cast<unsigned>(numberStructure), FIELD_OFFSET(JSCell, m_structure), X86::eax);
    912921            m_slowCases.append(SlowCaseEntry(__ emitUnlinkedJne(), i));
    913922        }
    914923
    915924        // (1a) if we get here, src1 is also a number cell
    916         __ movsd_mr(OBJECT_OFFSET(JSNumberCell, m_value), X86::eax, X86::xmm0);
    917         X86Assembler::JmpSrc loadedDouble = __ emitUnlinkedJmp();
     925        __ movsd_mr(FIELD_OFFSET(JSNumberCell, m_value), X86::eax, X86::xmm0);
     926        JmpSrc loadedDouble = __ emitUnlinkedJmp();
    918927        // (1b) if we get here, src1 is an immediate
    919928        __ link(op1imm, __ label());
     
    923932        __ link(loadedDouble, __ label());
    924933        if (opcodeID == op_add)
    925             __ addsd_mr(OBJECT_OFFSET(JSNumberCell, m_value), X86::edx, X86::xmm0);
     934            __ addsd_mr(FIELD_OFFSET(JSNumberCell, m_value), X86::edx, X86::xmm0);
    926935        else if (opcodeID == op_sub)
    927             __ subsd_mr(OBJECT_OFFSET(JSNumberCell, m_value), X86::edx, X86::xmm0);
     936            __ subsd_mr(FIELD_OFFSET(JSNumberCell, m_value), X86::edx, X86::xmm0);
    928937        else {
    929938            ASSERT(opcodeID == op_mul);
    930             __ mulsd_mr(OBJECT_OFFSET(JSNumberCell, m_value), X86::edx, X86::xmm0);
     939            __ mulsd_mr(FIELD_OFFSET(JSNumberCell, m_value), X86::edx, X86::xmm0);
    931940        }
    932941
     
    943952        // Check op1 is a number
    944953        __ testl_i32r(JSImmediate::TagBitTypeInteger, X86::eax);
    945         X86Assembler::JmpSrc op1imm = __ emitUnlinkedJne();
     954        JmpSrc op1imm = __ emitUnlinkedJne();
    946955        if (!types.first().definitelyIsNumber()) {
    947956            emitJumpSlowCaseIfNotJSCell(X86::eax, i, src1);
    948             __ cmpl_i32m(reinterpret_cast<unsigned>(numberStructure), OBJECT_OFFSET(JSCell, m_structure), X86::eax);
     957            __ cmpl_i32m(reinterpret_cast<unsigned>(numberStructure), FIELD_OFFSET(JSCell, m_structure), X86::eax);
    949958            m_slowCases.append(SlowCaseEntry(__ emitUnlinkedJne(), i));
    950959        }
     
    953962        //     Slow case if src2 is not a number type.
    954963        __ testl_i32r(JSImmediate::TagBitTypeInteger, X86::edx);
    955         X86Assembler::JmpSrc op2imm = __ emitUnlinkedJne();
     964        JmpSrc op2imm = __ emitUnlinkedJne();
    956965        if (!types.second().definitelyIsNumber()) {
    957966            emitJumpSlowCaseIfNotJSCell(X86::edx, i, src2);
    958             __ cmpl_i32m(reinterpret_cast<unsigned>(numberStructure), OBJECT_OFFSET(JSCell, m_structure), X86::edx);
     967            __ cmpl_i32m(reinterpret_cast<unsigned>(numberStructure), FIELD_OFFSET(JSCell, m_structure), X86::edx);
    959968            m_slowCases.append(SlowCaseEntry(__ emitUnlinkedJne(), i));
    960969        }
    961970
    962971        // (1a) if we get here, src2 is also a number cell
    963         __ movsd_mr(OBJECT_OFFSET(JSNumberCell, m_value), X86::edx, X86::xmm1);
    964         X86Assembler::JmpSrc loadedDouble = __ emitUnlinkedJmp();
     972        __ movsd_mr(FIELD_OFFSET(JSNumberCell, m_value), X86::edx, X86::xmm1);
     973        JmpSrc loadedDouble = __ emitUnlinkedJmp();
    965974        // (1b) if we get here, src2 is an immediate
    966975        __ link(op2imm, __ label());
     
    969978        // (1c)
    970979        __ link(loadedDouble, __ label());
    971         __ movsd_mr(OBJECT_OFFSET(JSNumberCell, m_value), X86::eax, X86::xmm0);
     980        __ movsd_mr(FIELD_OFFSET(JSNumberCell, m_value), X86::eax, X86::xmm0);
    972981        if (opcodeID == op_add)
    973982            __ addsd_rr(X86::xmm1, X86::xmm0);
     
    978987            __ mulsd_rr(X86::xmm1, X86::xmm0);
    979988        }
    980         __ movsd_rm(X86::xmm0, OBJECT_OFFSET(JSNumberCell, m_value), X86::eax);
     989        __ movsd_rm(X86::xmm0, FIELD_OFFSET(JSNumberCell, m_value), X86::eax);
    981990        emitPutVirtualRegister(dst);
    982991
     
    10031012        // convert eax & edx from JSImmediates to ints, and check if either are zero
    10041013        emitFastArithImmToInt(X86::edx);
    1005         X86Assembler::JmpSrc op1Zero = emitFastArithDeTagImmediateJumpIfZero(X86::eax);
     1014        JmpSrc op1Zero = emitFastArithDeTagImmediateJumpIfZero(X86::eax);
    10061015        __ testl_rr(X86::edx, X86::edx);
    1007         X86Assembler::JmpSrc op2NonZero = __ emitUnlinkedJne();
     1016        JmpSrc op2NonZero = __ emitUnlinkedJne();
    10081017        __ link(op1Zero, __ label());
    10091018        // if either input is zero, add the two together, and check if the result is < 0.
     
    10321041void CTI::compileBinaryArithOpSlowCase(Instruction* vPC, OpcodeID opcodeID, Vector<SlowCaseEntry>::iterator& iter, unsigned dst, unsigned src1, unsigned src2, OperandTypes types, unsigned i)
    10331042{
    1034     X86Assembler::JmpDst here = __ label();
     1043    JmpDst here = __ label();
    10351044    __ link(iter->from, here);
    10361045    if (types.second().isReusable() && isSSE2Present()) {
     
    10681077    emitPutCTIArgFromVirtualRegister(src2, 4, X86::ecx);
    10691078    if (opcodeID == op_add)
    1070         emitCTICall(vPC, i, BytecodeInterpreter::cti_op_add);
     1079        emitCTICall(vPC, i, Interpreter::cti_op_add);
    10711080    else if (opcodeID == op_sub)
    1072         emitCTICall(vPC, i, BytecodeInterpreter::cti_op_sub);
     1081        emitCTICall(vPC, i, Interpreter::cti_op_sub);
    10731082    else {
    10741083        ASSERT(opcodeID == op_mul);
    1075         emitCTICall(vPC, i, BytecodeInterpreter::cti_op_mul);
     1084        emitCTICall(vPC, i, Interpreter::cti_op_mul);
    10761085    }
    10771086    emitPutVirtualRegister(dst);
     
    11311140                    emitPutCTIArgFromVirtualRegister(instruction[i + 2].u.operand, 0, X86::ecx);
    11321141                    emitPutCTIArgFromVirtualRegister(instruction[i + 3].u.operand, 4, X86::ecx);
    1133                     emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_add);
     1142                    emitCTICall(instruction + i, i, Interpreter::cti_op_add);
    11341143                    emitPutVirtualRegister(instruction[i + 1].u.operand);
    11351144                }
     
    11411150        case op_end: {
    11421151            if (m_codeBlock->needsFullScopeChain)
    1143                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_end);
     1152                emitCTICall(instruction + i, i, Interpreter::cti_op_end);
    11441153            emitGetVirtualRegister(instruction[i + 1].u.operand, X86::eax, i);
    11451154            __ pushl_m(RegisterFile::ReturnPC * static_cast<int>(sizeof(Register)), X86::edi);
     
    12131222        }
    12141223        case op_new_object: {
    1215             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_new_object);
     1224            emitCTICall(instruction + i, i, Interpreter::cti_op_new_object);
    12161225            emitPutVirtualRegister(instruction[i + 1].u.operand);
    12171226            i += 2;
     
    12311240            emitJumpSlowCaseIfNotJSCell(X86::eax, i, baseVReg);
    12321241
    1233             X86Assembler::JmpDst hotPathBegin = __ label();
     1242            JmpDst hotPathBegin = __ label();
    12341243            m_propertyAccessCompilationInfo[propertyAccessInstructionIndex].hotPathBegin = hotPathBegin;
    12351244            ++propertyAccessInstructionIndex;
    12361245
    12371246            // It is important that the following instruction plants a 32bit immediate, in order that it can be patched over.
    1238             __ cmpl_i32m(repatchGetByIdDefaultStructure, OBJECT_OFFSET(JSCell, m_structure), X86::eax);
    1239             ASSERT(X86Assembler::getDifferenceBetweenLabels(hotPathBegin, __ label()) == repatchOffsetPutByIdStructure);
     1247            __ cmpl_i32m(repatchGetByIdDefaultStructure, FIELD_OFFSET(JSCell, m_structure), X86::eax);
     1248            ASSERT(__ getDifferenceBetweenLabels(hotPathBegin, __ label()) == repatchOffsetPutByIdStructure);
    12401249            m_slowCases.append(SlowCaseEntry(__ emitUnlinkedJne(), i));
    12411250
    12421251            // Plant a load from a bogus ofset in the object's property map; we will patch this later, if it is to be used.
    1243             __ movl_mr(OBJECT_OFFSET(JSObject, m_propertyStorage), X86::eax, X86::eax);
     1252            __ movl_mr(FIELD_OFFSET(JSObject, m_propertyStorage), X86::eax, X86::eax);
    12441253            __ movl_rm(X86::edx, repatchGetByIdDefaultOffset, X86::eax);
    1245             ASSERT(X86Assembler::getDifferenceBetweenLabels(hotPathBegin, __ label()) == repatchOffsetPutByIdPropertyMapOffset);
     1254            ASSERT(__ getDifferenceBetweenLabels(hotPathBegin, __ label()) == repatchOffsetPutByIdPropertyMapOffset);
    12461255
    12471256            i += 8;
     
    12611270            emitJumpSlowCaseIfNotJSCell(X86::eax, i, baseVReg);
    12621271
    1263             X86Assembler::JmpDst hotPathBegin = __ label();
     1272            JmpDst hotPathBegin = __ label();
    12641273            m_propertyAccessCompilationInfo[propertyAccessInstructionIndex].hotPathBegin = hotPathBegin;
    12651274            ++propertyAccessInstructionIndex;
    12661275
    1267             __ cmpl_i32m(repatchGetByIdDefaultStructure, OBJECT_OFFSET(JSCell, m_structure), X86::eax);
    1268             ASSERT(X86Assembler::getDifferenceBetweenLabels(hotPathBegin, __ label()) == repatchOffsetGetByIdStructure);
     1276            __ cmpl_i32m(repatchGetByIdDefaultStructure, FIELD_OFFSET(JSCell, m_structure), X86::eax);
     1277            ASSERT(__ getDifferenceBetweenLabels(hotPathBegin, __ label()) == repatchOffsetGetByIdStructure);
    12691278            m_slowCases.append(SlowCaseEntry(__ emitUnlinkedJne(), i));
    1270             ASSERT(X86Assembler::getDifferenceBetweenLabels(hotPathBegin, __ label()) == repatchOffsetGetByIdBranchToSlowCase);
    1271 
    1272             __ movl_mr(OBJECT_OFFSET(JSObject, m_propertyStorage), X86::eax, X86::eax);
     1279            ASSERT(__ getDifferenceBetweenLabels(hotPathBegin, __ label()) == repatchOffsetGetByIdBranchToSlowCase);
     1280
     1281            __ movl_mr(FIELD_OFFSET(JSObject, m_propertyStorage), X86::eax, X86::eax);
    12731282            __ movl_mr(repatchGetByIdDefaultOffset, X86::eax, X86::eax);
    1274             ASSERT(X86Assembler::getDifferenceBetweenLabels(hotPathBegin, __ label()) == repatchOffsetGetByIdPropertyMapOffset);
     1283            ASSERT(__ getDifferenceBetweenLabels(hotPathBegin, __ label()) == repatchOffsetGetByIdPropertyMapOffset);
    12751284            emitPutVirtualRegister(instruction[i + 1].u.operand);
    12761285
     
    12941303            // this works because NumberType and StringType are smaller
    12951304            __ movl_i32r(3 * ObjectType, X86::ecx);
    1296             __ movl_mr(OBJECT_OFFSET(JSCell, m_structure), X86::eax, X86::eax);
    1297             __ movl_mr(OBJECT_OFFSET(JSCell, m_structure), X86::edx, X86::edx);
    1298             __ subl_mr(OBJECT_OFFSET(Structure, m_typeInfo.m_type), X86::eax, X86::ecx);
    1299             __ subl_mr(OBJECT_OFFSET(Structure, m_typeInfo.m_type), X86::edx, X86::ecx);
     1305            __ movl_mr(FIELD_OFFSET(JSCell, m_structure), X86::eax, X86::eax);
     1306            __ movl_mr(FIELD_OFFSET(JSCell, m_structure), X86::edx, X86::edx);
     1307            __ subl_mr(FIELD_OFFSET(Structure, m_typeInfo.m_type), X86::eax, X86::ecx);
     1308            __ subl_mr(FIELD_OFFSET(Structure, m_typeInfo.m_type), X86::edx, X86::ecx);
    13001309            emitGetVirtualRegister(instruction[i + 3].u.operand, X86::edx, i); // reload baseVal
    1301             __ movl_mr(OBJECT_OFFSET(JSCell, m_structure), X86::edx, X86::edx);
    1302             __ cmpl_rm(X86::ecx, OBJECT_OFFSET(Structure, m_typeInfo.m_type), X86::edx);
     1310            __ movl_mr(FIELD_OFFSET(JSCell, m_structure), X86::edx, X86::edx);
     1311            __ cmpl_rm(X86::ecx, FIELD_OFFSET(Structure, m_typeInfo.m_type), X86::edx);
    13031312
    13041313            m_slowCases.append(SlowCaseEntry(__ emitUnlinkedJne(), i));
    13051314
    13061315            // check that baseVal's flags include ImplementsHasInstance but not OverridesHasInstance
    1307             __ movl_mr(OBJECT_OFFSET(Structure, m_typeInfo.m_flags), X86::edx, X86::ecx);
     1316            __ movl_mr(FIELD_OFFSET(Structure, m_typeInfo.m_flags), X86::edx, X86::ecx);
    13081317            __ andl_i32r(ImplementsHasInstance | OverridesHasInstance, X86::ecx);
    13091318            __ cmpl_i32r(ImplementsHasInstance, X86::ecx);
     
    13171326            __ movl_i32r(asInteger(jsBoolean(true)), X86::eax);
    13181327
    1319             X86Assembler::JmpDst loop = __ label();
     1328            JmpDst loop = __ label();
    13201329
    13211330            // load value's prototype
    1322             __ movl_mr(OBJECT_OFFSET(JSCell, m_structure), X86::ecx, X86::ecx);
    1323             __ movl_mr(OBJECT_OFFSET(Structure, m_prototype), X86::ecx, X86::ecx);
     1331            __ movl_mr(FIELD_OFFSET(JSCell, m_structure), X86::ecx, X86::ecx);
     1332            __ movl_mr(FIELD_OFFSET(Structure, m_prototype), X86::ecx, X86::ecx);
    13241333           
    13251334            __ cmpl_rr(X86::ecx, X86::edx);
    1326             X86Assembler::JmpSrc exit = __ emitUnlinkedJe();
     1335            JmpSrc exit = __ emitUnlinkedJe();
    13271336
    13281337            __ cmpl_i32r(asInteger(jsNull()), X86::ecx);
    1329             X86Assembler::JmpSrc goToLoop = __ emitUnlinkedJne();
     1338            JmpSrc goToLoop = __ emitUnlinkedJne();
    13301339            __ link(goToLoop, loop);
    13311340
     
    13431352            Identifier* ident = &(m_codeBlock->identifiers[instruction[i + 3].u.operand]);
    13441353            emitPutCTIArgConstant(reinterpret_cast<unsigned>(ident), 4);
    1345             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_del_by_id);
     1354            emitCTICall(instruction + i, i, Interpreter::cti_op_del_by_id);
    13461355            emitPutVirtualRegister(instruction[i + 1].u.operand);
    13471356            i += 4;
     
    13821391            FuncDeclNode* func = (m_codeBlock->functions[instruction[i + 2].u.operand]).get();
    13831392            emitPutCTIArgConstant(reinterpret_cast<unsigned>(func), 0);
    1384             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_new_func);
     1393            emitCTICall(instruction + i, i, Interpreter::cti_op_new_func);
    13851394            emitPutVirtualRegister(instruction[i + 1].u.operand);
    13861395            i += 3;
     
    14151424            emitGetVirtualRegister(RegisterFile::ScopeChain, X86::eax, i);
    14161425            while (skip--)
    1417                 __ movl_mr(OBJECT_OFFSET(ScopeChainNode, next), X86::eax, X86::eax);
    1418 
    1419             __ movl_mr(OBJECT_OFFSET(ScopeChainNode, object), X86::eax, X86::eax);
     1426                __ movl_mr(FIELD_OFFSET(ScopeChainNode, next), X86::eax, X86::eax);
     1427
     1428            __ movl_mr(FIELD_OFFSET(ScopeChainNode, object), X86::eax, X86::eax);
    14201429            emitGetVariableObjectRegister(X86::eax, instruction[i + 2].u.operand, X86::eax);
    14211430            emitPutVirtualRegister(instruction[i + 1].u.operand);
     
    14291438            emitGetVirtualRegister(instruction[i + 3].u.operand, X86::eax, i);
    14301439            while (skip--)
    1431                 __ movl_mr(OBJECT_OFFSET(ScopeChainNode, next), X86::edx, X86::edx);
    1432 
    1433             __ movl_mr(OBJECT_OFFSET(ScopeChainNode, object), X86::edx, X86::edx);
     1440                __ movl_mr(FIELD_OFFSET(ScopeChainNode, next), X86::edx, X86::edx);
     1441
     1442            __ movl_mr(FIELD_OFFSET(ScopeChainNode, object), X86::edx, X86::edx);
    14341443            emitPutVariableObjectRegister(X86::eax, X86::edx, instruction[i + 1].u.operand);
    14351444            i += 4;
     
    14381447        case op_tear_off_activation: {
    14391448            emitPutCTIArgFromVirtualRegister(instruction[i + 1].u.operand, 0, X86::ecx);
    1440             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_tear_off_activation);
     1449            emitCTICall(instruction + i, i, Interpreter::cti_op_tear_off_activation);
    14411450            i += 2;
    14421451            break;
    14431452        }
    14441453        case op_tear_off_arguments: {
    1445             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_tear_off_arguments);
     1454            emitCTICall(instruction + i, i, Interpreter::cti_op_tear_off_arguments);
    14461455            i += 1;
    14471456            break;
     
    14501459            // We could JIT generate the deref, only calling out to C when the refcount hits zero.
    14511460            if (m_codeBlock->needsFullScopeChain)
    1452                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_ret_scopeChain);
     1461                emitCTICall(instruction + i, i, Interpreter::cti_op_ret_scopeChain);
    14531462
    14541463            // Return the result in %eax.
     
    14721481            emitPutCTIArg(X86::edx, 0);
    14731482            emitPutCTIArgConstant(instruction[i + 3].u.operand, 4);
    1474             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_new_array);
     1483            emitCTICall(instruction + i, i, Interpreter::cti_op_new_array);
    14751484            emitPutVirtualRegister(instruction[i + 1].u.operand);
    14761485            i += 4;
     
    14801489            Identifier* ident = &(m_codeBlock->identifiers[instruction[i + 2].u.operand]);
    14811490            emitPutCTIArgConstant(reinterpret_cast<unsigned>(ident), 0);
    1482             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_resolve);
     1491            emitCTICall(instruction + i, i, Interpreter::cti_op_resolve);
    14831492            emitPutVirtualRegister(instruction[i + 1].u.operand);
    14841493            i += 3;
     
    14891498
    14901499            __ testl_i32r(JSImmediate::TagMask, X86::eax);
    1491             X86Assembler::JmpSrc isImmediate = __ emitUnlinkedJne();
    1492             __ movl_mr(OBJECT_OFFSET(JSCell, m_structure), X86::eax, X86::ecx);
    1493             __ cmpl_i32m(ObjectType, OBJECT_OFFSET(Structure, m_typeInfo) + OBJECT_OFFSET(TypeInfo, m_type), X86::ecx);
    1494             X86Assembler::JmpSrc isObject = __ emitUnlinkedJe();
     1500            JmpSrc isImmediate = __ emitUnlinkedJne();
     1501            __ movl_mr(FIELD_OFFSET(JSCell, m_structure), X86::eax, X86::ecx);
     1502            __ cmpl_i32m(ObjectType, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type), X86::ecx);
     1503            JmpSrc isObject = __ emitUnlinkedJe();
    14951504
    14961505            __ link(isImmediate, __ label());
     
    15121521
    15131522            // This is an array; get the m_storage pointer into ecx, then check if the index is below the fast cutoff
    1514             __ movl_mr(OBJECT_OFFSET(JSArray, m_storage), X86::eax, X86::ecx);
    1515             __ cmpl_rm(X86::edx, OBJECT_OFFSET(JSArray, m_fastAccessCutoff), X86::eax);
     1523            __ movl_mr(FIELD_OFFSET(JSArray, m_storage), X86::eax, X86::ecx);
     1524            __ cmpl_rm(X86::edx, FIELD_OFFSET(JSArray, m_fastAccessCutoff), X86::eax);
    15161525            m_slowCases.append(SlowCaseEntry(__ emitUnlinkedJbe(), i));
    15171526
    15181527            // Get the value from the vector
    1519             __ movl_mr(OBJECT_OFFSET(ArrayStorage, m_vector[0]), X86::ecx, X86::edx, sizeof(JSValue*), X86::eax);
     1528            __ movl_mr(FIELD_OFFSET(ArrayStorage, m_vector[0]), X86::ecx, X86::edx, sizeof(JSValue*), X86::eax);
    15201529            emitPutVirtualRegister(instruction[i + 1].u.operand);
    15211530            i += 4;
     
    15251534            Identifier* ident = &(m_codeBlock->identifiers[instruction[i + 3].u.operand]);
    15261535            emitPutCTIArgConstant(reinterpret_cast<unsigned>(ident), 0);
    1527             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_resolve_func);
     1536            emitCTICall(instruction + i, i, Interpreter::cti_op_resolve_func);
    15281537            emitPutVirtualRegister(instruction[i + 2].u.operand, X86::edx);
    15291538            emitPutVirtualRegister(instruction[i + 1].u.operand);
     
    15461555
    15471556            // This is an array; get the m_storage pointer into ecx, then check if the index is below the fast cutoff
    1548             __ movl_mr(OBJECT_OFFSET(JSArray, m_storage), X86::eax, X86::ecx);
    1549             __ cmpl_rm(X86::edx, OBJECT_OFFSET(JSArray, m_fastAccessCutoff), X86::eax);
    1550             X86Assembler::JmpSrc inFastVector = __ emitUnlinkedJa();
     1557            __ movl_mr(FIELD_OFFSET(JSArray, m_storage), X86::eax, X86::ecx);
     1558            __ cmpl_rm(X86::edx, FIELD_OFFSET(JSArray, m_fastAccessCutoff), X86::eax);
     1559            JmpSrc inFastVector = __ emitUnlinkedJa();
    15511560            // No; oh well, check if the access if within the vector - if so, we may still be okay.
    1552             __ cmpl_rm(X86::edx, OBJECT_OFFSET(ArrayStorage, m_vectorLength), X86::ecx);
     1561            __ cmpl_rm(X86::edx, FIELD_OFFSET(ArrayStorage, m_vectorLength), X86::ecx);
    15531562            m_slowCases.append(SlowCaseEntry(__ emitUnlinkedJbe(), i));
    15541563
    15551564            // This is a write to the slow part of the vector; first, we have to check if this would be the first write to this location.
    15561565            // FIXME: should be able to handle initial write to array; increment the the number of items in the array, and potentially update fast access cutoff.
    1557             __ cmpl_i8m(0, OBJECT_OFFSET(ArrayStorage, m_vector[0]), X86::ecx, X86::edx, sizeof(JSValue*));
     1566            __ cmpl_i8m(0, FIELD_OFFSET(ArrayStorage, m_vector[0]), X86::ecx, X86::edx, sizeof(JSValue*));
    15581567            m_slowCases.append(SlowCaseEntry(__ emitUnlinkedJe(), i));
    15591568
     
    15611570            __ link(inFastVector, __ label());
    15621571            emitGetVirtualRegister(instruction[i + 3].u.operand, X86::eax, i);
    1563             __ movl_rm(X86::eax, OBJECT_OFFSET(ArrayStorage, m_vector[0]), X86::ecx, X86::edx, sizeof(JSValue*));
     1572            __ movl_rm(X86::eax, FIELD_OFFSET(ArrayStorage, m_vector[0]), X86::ecx, X86::edx, sizeof(JSValue*));
    15641573            i += 4;
    15651574            break;
     
    15731582
    15741583            __ cmpl_i32r(asInteger(JSImmediate::zeroImmediate()), X86::eax);
    1575             X86Assembler::JmpSrc isZero = __ emitUnlinkedJe();
     1584            JmpSrc isZero = __ emitUnlinkedJe();
    15761585            __ testl_i32r(JSImmediate::TagBitTypeInteger, X86::eax);
    15771586            m_jmpTable.append(JmpTable(__ emitUnlinkedJne(), i + 2 + target));
     
    15891598            Identifier* ident = &(m_codeBlock->identifiers[instruction[i + 2].u.operand]);
    15901599            emitPutCTIArgConstant(reinterpret_cast<unsigned>(ident), 0);
    1591             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_resolve_base);
     1600            emitCTICall(instruction + i, i, Interpreter::cti_op_resolve_base);
    15921601            emitPutVirtualRegister(instruction[i + 1].u.operand);
    15931602            i += 3;
     
    15991608
    16001609            __ testl_i32r(JSImmediate::TagBitTypeInteger, X86::eax);
    1601             X86Assembler::JmpSrc notImmediate = __ emitUnlinkedJe();
     1610            JmpSrc notImmediate = __ emitUnlinkedJe();
    16021611
    16031612            __ cmpl_i32r(JSImmediate::TagBitTypeInteger, X86::eax);
    1604             X86Assembler::JmpSrc zeroImmediate = __ emitUnlinkedJe();
     1613            JmpSrc zeroImmediate = __ emitUnlinkedJe();
    16051614            emitFastArithImmToInt(X86::eax);
    16061615            __ negl_r(X86::eax); // This can't overflow as we only have a 31bit int at this point
    1607             X86Assembler::JmpSrc overflow = emitArithIntToImmWithJump(X86::eax);
    1608             emitPutVirtualRegister(instruction[i + 1].u.operand);
    1609             X86Assembler::JmpSrc immediateNegateSuccess = __ emitUnlinkedJmp();
     1616            JmpSrc overflow = emitArithIntToImmWithJump(X86::eax);
     1617            emitPutVirtualRegister(instruction[i + 1].u.operand);
     1618            JmpSrc immediateNegateSuccess = __ emitUnlinkedJmp();
    16101619
    16111620            if (!isSSE2Present()) {
     
    16141623                __ link(notImmediate, __ label());
    16151624                emitPutCTIArgFromVirtualRegister(instruction[i + 2].u.operand, 0, X86::ecx);
    1616                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_negate);
     1625                emitCTICall(instruction + i, i, Interpreter::cti_op_negate);
    16171626                emitPutVirtualRegister(instruction[i + 1].u.operand);
    16181627            } else {
     
    16251634                    emitJumpSlowCaseIfNotJSCell(X86::eax, i, srcVReg);
    16261635                    Structure* numberStructure = m_globalData->numberStructure.get();
    1627                     __ cmpl_i32m(reinterpret_cast<unsigned>(numberStructure), OBJECT_OFFSET(JSCell, m_structure), X86::eax);
     1636                    __ cmpl_i32m(reinterpret_cast<unsigned>(numberStructure), FIELD_OFFSET(JSCell, m_structure), X86::eax);
    16281637                    m_slowCases.append(SlowCaseEntry(__ emitUnlinkedJne(), i));
    16291638                }
    1630                 __ movsd_mr(OBJECT_OFFSET(JSNumberCell, m_value), X86::eax, X86::xmm0);
     1639                __ movsd_mr(FIELD_OFFSET(JSNumberCell, m_value), X86::eax, X86::xmm0);
    16311640                // We need 3 copies of the sign bit mask so we can assure alignment and pad for the 128bit load
    16321641                static double doubleSignBit[] = { -0.0, -0.0, -0.0 };
    16331642                __ xorpd_mr((void*)((((uintptr_t)doubleSignBit)+15)&~15), X86::xmm0);
    1634                 X86Assembler::JmpSrc wasCell;
     1643                JmpSrc wasCell;
    16351644                if (!resultType.isReusableNumber())
    16361645                    emitAllocateNumber(m_globalData, i);
     
    16481657            emitPutCTIArgConstant(reinterpret_cast<unsigned>(ident), 0);
    16491658            emitPutCTIArgConstant(instruction[i + 3].u.operand + m_codeBlock->needsFullScopeChain, 4);
    1650             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_resolve_skip);
     1659            emitCTICall(instruction + i, i, Interpreter::cti_op_resolve_skip);
    16511660            emitPutVirtualRegister(instruction[i + 1].u.operand);
    16521661            i += 4;
     
    16631672            __ movl_i32r(globalObject, X86::eax);
    16641673            __ movl_mr(structureAddress, X86::edx);
    1665             __ cmpl_rm(X86::edx, OBJECT_OFFSET(JSCell, m_structure), X86::eax);
    1666             X86Assembler::JmpSrc noMatch = __ emitUnlinkedJne(); // Structures don't match
     1674            __ cmpl_rm(X86::edx, FIELD_OFFSET(JSCell, m_structure), X86::eax);
     1675            JmpSrc noMatch = __ emitUnlinkedJne(); // Structures don't match
    16671676
    16681677            // Load cached property
    1669             __ movl_mr(OBJECT_OFFSET(JSGlobalObject, m_propertyStorage), X86::eax, X86::eax);
     1678            __ movl_mr(FIELD_OFFSET(JSGlobalObject, m_propertyStorage), X86::eax, X86::eax);
    16701679            __ movl_mr(offsetAddr, X86::edx);
    16711680            __ movl_mr(0, X86::eax, X86::edx, sizeof(JSValue*), X86::eax);
    16721681            emitPutVirtualRegister(instruction[i + 1].u.operand);
    1673             X86Assembler::JmpSrc end = __ emitUnlinkedJmp();
     1682            JmpSrc end = __ emitUnlinkedJmp();
    16741683
    16751684            // Slow case
     
    16781687            emitPutCTIArgConstant(reinterpret_cast<unsigned>(ident), 4);
    16791688            emitPutCTIArgConstant(reinterpret_cast<unsigned>(instruction + i), 8);
    1680             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_resolve_global);
     1689            emitCTICall(instruction + i, i, Interpreter::cti_op_resolve_global);
    16811690            emitPutVirtualRegister(instruction[i + 1].u.operand);
    16821691            __ link(end, __ label());
     
    17301739            m_jmpTable.append(JmpTable(__ emitUnlinkedJe(), i + 2 + target));
    17311740            __ testl_i32r(JSImmediate::TagBitTypeInteger, X86::eax);
    1732             X86Assembler::JmpSrc isNonZero = __ emitUnlinkedJne();
     1741            JmpSrc isNonZero = __ emitUnlinkedJne();
    17331742
    17341743            __ cmpl_i32r(asInteger(JSImmediate::falseImmediate()), X86::eax);
     
    17471756            emitGetVirtualRegister(src, X86::eax, i);
    17481757            __ testl_i32r(JSImmediate::TagMask, X86::eax);
    1749             X86Assembler::JmpSrc isImmediate = __ emitUnlinkedJnz();
    1750 
    1751             __ movl_mr(OBJECT_OFFSET(JSCell, m_structure), X86::eax, X86::ecx);
    1752             __ testl_i32m(MasqueradesAsUndefined, OBJECT_OFFSET(Structure, m_typeInfo.m_flags), X86::ecx);
     1758            JmpSrc isImmediate = __ emitUnlinkedJnz();
     1759
     1760            __ movl_mr(FIELD_OFFSET(JSCell, m_structure), X86::eax, X86::ecx);
     1761            __ testl_i32m(MasqueradesAsUndefined, FIELD_OFFSET(Structure, m_typeInfo.m_flags), X86::ecx);
    17531762            __ setnz_r(X86::eax);
    17541763
    1755             X86Assembler::JmpSrc wasNotImmediate = __ emitUnlinkedJmp();
     1764            JmpSrc wasNotImmediate = __ emitUnlinkedJmp();
    17561765
    17571766            __ link(isImmediate, __ label());
     
    17771786            emitGetVirtualRegister(src, X86::eax, i);
    17781787            __ testl_i32r(JSImmediate::TagMask, X86::eax);
    1779             X86Assembler::JmpSrc isImmediate = __ emitUnlinkedJnz();
    1780 
    1781             __ movl_mr(OBJECT_OFFSET(JSCell, m_structure), X86::eax, X86::ecx);
    1782             __ testl_i32m(MasqueradesAsUndefined, OBJECT_OFFSET(Structure, m_typeInfo.m_flags), X86::ecx);
     1788            JmpSrc isImmediate = __ emitUnlinkedJnz();
     1789
     1790            __ movl_mr(FIELD_OFFSET(JSCell, m_structure), X86::eax, X86::ecx);
     1791            __ testl_i32m(MasqueradesAsUndefined, FIELD_OFFSET(Structure, m_typeInfo.m_flags), X86::ecx);
    17831792            __ setz_r(X86::eax);
    17841793
    1785             X86Assembler::JmpSrc wasNotImmediate = __ emitUnlinkedJmp();
     1794            JmpSrc wasNotImmediate = __ emitUnlinkedJmp();
    17861795
    17871796            __ link(isImmediate, __ label());
     
    18241833            int target = instruction[i + 2].u.operand;
    18251834            __ movl_i32m(0, sizeof(Register) * retAddrDst, X86::edi);
    1826             X86Assembler::JmpDst addrPosition = __ label();
     1835            JmpDst addrPosition = __ label();
    18271836            m_jmpTable.append(JmpTable(__ emitUnlinkedJmp(), i + 2 + target));
    1828             X86Assembler::JmpDst sretTarget = __ label();
     1837            JmpDst sretTarget = __ label();
    18291838            m_jsrSites.append(JSRInfo(addrPosition, sretTarget));
    18301839            i += 3;
     
    19041913            Identifier* ident = &(m_codeBlock->identifiers[instruction[i + 3].u.operand]);
    19051914            emitPutCTIArgConstant(reinterpret_cast<unsigned>(ident), 0);
    1906             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_resolve_with_base);
     1915            emitCTICall(instruction + i, i, Interpreter::cti_op_resolve_with_base);
    19071916            emitPutVirtualRegister(instruction[i + 2].u.operand, X86::edx);
    19081917            emitPutVirtualRegister(instruction[i + 1].u.operand);
     
    19131922            FuncExprNode* func = (m_codeBlock->functionExpressions[instruction[i + 2].u.operand]).get();
    19141923            emitPutCTIArgConstant(reinterpret_cast<unsigned>(func), 0);
    1915             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_new_func_exp);
     1924            emitCTICall(instruction + i, i, Interpreter::cti_op_new_func_exp);
    19161925            emitPutVirtualRegister(instruction[i + 1].u.operand);
    19171926            i += 3;
     
    19371946
    19381947            __ cmpl_i32r(asInteger(JSImmediate::zeroImmediate()), X86::eax);
    1939             X86Assembler::JmpSrc isZero = __ emitUnlinkedJe();
     1948            JmpSrc isZero = __ emitUnlinkedJe();
    19401949            __ testl_i32r(JSImmediate::TagBitTypeInteger, X86::eax);
    19411950            m_jmpTable.append(JmpTable(__ emitUnlinkedJne(), i + 2 + target));
     
    19901999            RegExp* regExp = m_codeBlock->regexps[instruction[i + 2].u.operand].get();
    19912000            emitPutCTIArgConstant(reinterpret_cast<unsigned>(regExp), 0);
    1992             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_new_regexp);
     2001            emitCTICall(instruction + i, i, Interpreter::cti_op_new_regexp);
    19932002            emitPutVirtualRegister(instruction[i + 1].u.operand);
    19942003            i += 3;
     
    20052014        case op_throw: {
    20062015            emitPutCTIArgFromVirtualRegister(instruction[i + 1].u.operand, 0, X86::ecx);
    2007             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_throw);
     2016            emitCTICall(instruction + i, i, Interpreter::cti_op_throw);
    20082017            __ addl_i8r(0x20, X86::esp);
    20092018            __ popl_r(X86::ebx);
     
    20162025        case op_get_pnames: {
    20172026            emitPutCTIArgFromVirtualRegister(instruction[i + 2].u.operand, 0, X86::ecx);
    2018             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_get_pnames);
     2027            emitCTICall(instruction + i, i, Interpreter::cti_op_get_pnames);
    20192028            emitPutVirtualRegister(instruction[i + 1].u.operand);
    20202029            i += 3;
     
    20242033            emitPutCTIArgFromVirtualRegister(instruction[i + 2].u.operand, 0, X86::ecx);
    20252034            unsigned target = instruction[i + 3].u.operand;
    2026             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_next_pname);
     2035            emitCTICall(instruction + i, i, Interpreter::cti_op_next_pname);
    20272036            __ testl_rr(X86::eax, X86::eax);
    2028             X86Assembler::JmpSrc endOfIter = __ emitUnlinkedJe();
     2037            JmpSrc endOfIter = __ emitUnlinkedJe();
    20292038            emitPutVirtualRegister(instruction[i + 1].u.operand);
    20302039            m_jmpTable.append(JmpTable(__ emitUnlinkedJmp(), i + 3 + target));
     
    20352044        case op_push_scope: {
    20362045            emitPutCTIArgFromVirtualRegister(instruction[i + 1].u.operand, 0, X86::ecx);
    2037             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_push_scope);
     2046            emitCTICall(instruction + i, i, Interpreter::cti_op_push_scope);
    20382047            i += 2;
    20392048            break;
    20402049        }
    20412050        case op_pop_scope: {
    2042             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_pop_scope);
     2051            emitCTICall(instruction + i, i, Interpreter::cti_op_pop_scope);
    20432052            i += 1;
    20442053            break;
     
    20662075           
    20672076            __ testl_i32r(JSImmediate::TagBitTypeInteger, X86::eax);
    2068             X86Assembler::JmpSrc wasImmediate = __ emitUnlinkedJnz();
     2077            JmpSrc wasImmediate = __ emitUnlinkedJnz();
    20692078
    20702079            emitJumpSlowCaseIfNotJSCell(X86::eax, i, srcVReg);
    20712080
    2072             __ movl_mr(OBJECT_OFFSET(JSCell, m_structure), X86::eax, X86::ecx);
    2073             __ cmpl_i32m(NumberType, OBJECT_OFFSET(Structure, m_typeInfo.m_type), X86::ecx);
     2081            __ movl_mr(FIELD_OFFSET(JSCell, m_structure), X86::eax, X86::ecx);
     2082            __ cmpl_i32m(NumberType, FIELD_OFFSET(Structure, m_typeInfo.m_type), X86::ecx);
    20742083           
    20752084            m_slowCases.append(SlowCaseEntry(__ emitUnlinkedJne(), i));
     
    20842093            emitPutCTIArgFromVirtualRegister(instruction[i + 2].u.operand, 0, X86::ecx);
    20852094            emitPutCTIArgFromVirtualRegister(instruction[i + 3].u.operand, 4, X86::ecx);
    2086             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_in);
     2095            emitCTICall(instruction + i, i, Interpreter::cti_op_in);
    20872096            emitPutVirtualRegister(instruction[i + 1].u.operand);
    20882097            i += 4;
     
    20932102            emitPutCTIArgConstant(reinterpret_cast<unsigned>(ident), 0);
    20942103            emitPutCTIArgFromVirtualRegister(instruction[i + 3].u.operand, 4, X86::ecx);
    2095             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_push_new_scope);
     2104            emitCTICall(instruction + i, i, Interpreter::cti_op_push_new_scope);
    20962105            emitPutVirtualRegister(instruction[i + 1].u.operand);
    20972106            i += 4;
     
    21072116            unsigned count = instruction[i + 1].u.operand;
    21082117            emitPutCTIArgConstant(count, 0);
    2109             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_jmp_scopes);
     2118            emitCTICall(instruction + i, i, Interpreter::cti_op_jmp_scopes);
    21102119            unsigned target = instruction[i + 2].u.operand;
    21112120            m_jmpTable.append(JmpTable(__ emitUnlinkedJmp(), i + 2 + target));
     
    21172126            emitPutCTIArgConstant(instruction[i + 2].u.operand, 4);
    21182127            emitPutCTIArgFromVirtualRegister(instruction[i + 3].u.operand, 8, X86::ecx);
    2119             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_put_by_index);
     2128            emitCTICall(instruction + i, i, Interpreter::cti_op_put_by_index);
    21202129            i += 4;
    21212130            break;
     
    21332142            emitPutCTIArgFromVirtualRegister(scrutinee, 0, X86::ecx);
    21342143            emitPutCTIArgConstant(tableIndex, 4);
    2135             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_switch_imm);
     2144            emitCTICall(instruction + i, i, Interpreter::cti_op_switch_imm);
    21362145            __ jmp_r(X86::eax);
    21372146            i += 4;
     
    21502159            emitPutCTIArgFromVirtualRegister(scrutinee, 0, X86::ecx);
    21512160            emitPutCTIArgConstant(tableIndex, 4);
    2152             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_switch_char);
     2161            emitCTICall(instruction + i, i, Interpreter::cti_op_switch_char);
    21532162            __ jmp_r(X86::eax);
    21542163            i += 4;
     
    21662175            emitPutCTIArgFromVirtualRegister(scrutinee, 0, X86::ecx);
    21672176            emitPutCTIArgConstant(tableIndex, 4);
    2168             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_switch_string);
     2177            emitCTICall(instruction + i, i, Interpreter::cti_op_switch_string);
    21692178            __ jmp_r(X86::eax);
    21702179            i += 4;
     
    21742183            emitPutCTIArgFromVirtualRegister(instruction[i + 2].u.operand, 0, X86::ecx);
    21752184            emitPutCTIArgFromVirtualRegister(instruction[i + 3].u.operand, 4, X86::ecx);
    2176             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_del_by_val);
     2185            emitCTICall(instruction + i, i, Interpreter::cti_op_del_by_val);
    21772186            emitPutVirtualRegister(instruction[i + 1].u.operand);
    21782187            i += 4;
     
    21842193            emitPutCTIArgConstant(reinterpret_cast<unsigned>(ident), 4);
    21852194            emitPutCTIArgFromVirtualRegister(instruction[i + 3].u.operand, 8, X86::ecx);
    2186             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_put_getter);
     2195            emitCTICall(instruction + i, i, Interpreter::cti_op_put_getter);
    21872196            i += 4;
    21882197            break;
     
    21932202            emitPutCTIArgConstant(reinterpret_cast<unsigned>(ident), 4);
    21942203            emitPutCTIArgFromVirtualRegister(instruction[i + 3].u.operand, 8, X86::ecx);
    2195             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_put_setter);
     2204            emitCTICall(instruction + i, i, Interpreter::cti_op_put_setter);
    21962205            i += 4;
    21972206            break;
     
    22022211            emitPutCTIArgConstant(asInteger(message), 4);
    22032212            emitPutCTIArgConstant(m_codeBlock->lineNumberForVPC(&instruction[i]), 8);
    2204             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_new_error);
     2213            emitCTICall(instruction + i, i, Interpreter::cti_op_new_error);
    22052214            emitPutVirtualRegister(instruction[i + 1].u.operand);
    22062215            i += 4;
     
    22112220            emitPutCTIArgConstant(instruction[i + 2].u.operand, 4);
    22122221            emitPutCTIArgConstant(instruction[i + 3].u.operand, 8);
    2213             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_debug);
     2222            emitCTICall(instruction + i, i, Interpreter::cti_op_debug);
    22142223            i += 4;
    22152224            break;
     
    22212230            emitGetVirtualRegister(src1, X86::eax, i);
    22222231            __ testl_i32r(JSImmediate::TagMask, X86::eax);
    2223             X86Assembler::JmpSrc isImmediate = __ emitUnlinkedJnz();
    2224 
    2225             __ movl_mr(OBJECT_OFFSET(JSCell, m_structure), X86::eax, X86::ecx);
    2226             __ testl_i32m(MasqueradesAsUndefined, OBJECT_OFFSET(Structure, m_typeInfo.m_flags), X86::ecx);
     2232            JmpSrc isImmediate = __ emitUnlinkedJnz();
     2233
     2234            __ movl_mr(FIELD_OFFSET(JSCell, m_structure), X86::eax, X86::ecx);
     2235            __ testl_i32m(MasqueradesAsUndefined, FIELD_OFFSET(Structure, m_typeInfo.m_flags), X86::ecx);
    22272236            __ setnz_r(X86::eax);
    22282237
    2229             X86Assembler::JmpSrc wasNotImmediate = __ emitUnlinkedJmp();
     2238            JmpSrc wasNotImmediate = __ emitUnlinkedJmp();
    22302239
    22312240            __ link(isImmediate, __ label());
     
    22512260            emitGetVirtualRegister(src1, X86::eax, i);
    22522261            __ testl_i32r(JSImmediate::TagMask, X86::eax);
    2253             X86Assembler::JmpSrc isImmediate = __ emitUnlinkedJnz();
    2254 
    2255             __ movl_mr(OBJECT_OFFSET(JSCell, m_structure), X86::eax, X86::ecx);
    2256             __ testl_i32m(MasqueradesAsUndefined, OBJECT_OFFSET(Structure, m_typeInfo.m_flags), X86::ecx);
     2262            JmpSrc isImmediate = __ emitUnlinkedJnz();
     2263
     2264            __ movl_mr(FIELD_OFFSET(JSCell, m_structure), X86::eax, X86::ecx);
     2265            __ testl_i32m(MasqueradesAsUndefined, FIELD_OFFSET(Structure, m_typeInfo.m_flags), X86::ecx);
    22572266            __ setz_r(X86::eax);
    22582267
    2259             X86Assembler::JmpSrc wasNotImmediate = __ emitUnlinkedJmp();
     2268            JmpSrc wasNotImmediate = __ emitUnlinkedJmp();
    22602269
    22612270            __ link(isImmediate, __ label());
     
    22942303                emitInitRegister(j);
    22952304
    2296             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_push_activation);
     2305            emitCTICall(instruction + i, i, Interpreter::cti_op_push_activation);
    22972306            emitPutVirtualRegister(instruction[i + 1].u.operand);
    22982307
     
    23012310        }
    23022311        case op_create_arguments: {
    2303             emitCTICall(instruction + i, i, (m_codeBlock->numParameters == 1) ? BytecodeInterpreter::cti_op_create_arguments_no_params : BytecodeInterpreter::cti_op_create_arguments);
     2312            emitCTICall(instruction + i, i, (m_codeBlock->numParameters == 1) ? Interpreter::cti_op_create_arguments_no_params : Interpreter::cti_op_create_arguments);
    23042313            i += 1;
    23052314            break;
     
    23092318
    23102319            emitJumpSlowCaseIfNotJSCell(X86::eax, i);
    2311             __ movl_mr(OBJECT_OFFSET(JSCell, m_structure), X86::eax, X86::edx);
    2312             __ testl_i32m(NeedsThisConversion, OBJECT_OFFSET(Structure, m_typeInfo.m_flags), X86::edx);
     2320            __ movl_mr(FIELD_OFFSET(JSCell, m_structure), X86::eax, X86::edx);
     2321            __ testl_i32m(NeedsThisConversion, FIELD_OFFSET(Structure, m_typeInfo.m_flags), X86::edx);
    23132322            m_slowCases.append(SlowCaseEntry(__ emitUnlinkedJnz(), i));
    23142323
     
    23192328            emitGetCTIParam(CTI_ARGS_profilerReference, X86::eax);
    23202329            __ cmpl_i32m(0, X86::eax);
    2321             X86Assembler::JmpSrc noProfiler = __ emitUnlinkedJe();
     2330            JmpSrc noProfiler = __ emitUnlinkedJe();
    23222331            emitPutCTIArgFromVirtualRegister(instruction[i + 1].u.operand, 0, X86::eax);
    2323             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_profile_will_call);
     2332            emitCTICall(instruction + i, i, Interpreter::cti_op_profile_will_call);
    23242333            __ link(noProfiler, __ label());
    23252334
     
    23302339            emitGetCTIParam(CTI_ARGS_profilerReference, X86::eax);
    23312340            __ cmpl_i32m(0, X86::eax);
    2332             X86Assembler::JmpSrc noProfiler = __ emitUnlinkedJe();
     2341            JmpSrc noProfiler = __ emitUnlinkedJe();
    23332342            emitPutCTIArgFromVirtualRegister(instruction[i + 1].u.operand, 0, X86::eax);
    2334             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_profile_did_call);
     2343            emitCTICall(instruction + i, i, Interpreter::cti_op_profile_did_call);
    23352344            __ link(noProfiler, __ label());
    23362345
     
    23692378        emitPutCTIArgFromVirtualRegister(instruction[i + 2].u.operand, 0, X86::ecx); \
    23702379        emitPutCTIArgFromVirtualRegister(instruction[i + 3].u.operand, 4, X86::ecx); \
    2371         emitCTICall(instruction + i, i, BytecodeInterpreter::cti_##name); \
     2380        emitCTICall(instruction + i, i, Interpreter::cti_##name); \
    23722381        emitPutVirtualRegister(instruction[i + 1].u.operand); \
    23732382        i += 4; \
     
    23812390        emitPutCTIArgFromVirtualRegister(instruction[i + 2].u.operand, 0, X86::ecx); \
    23822391        emitPutCTIArgFromVirtualRegister(instruction[i + 3].u.operand, 4, X86::ecx); \
    2383         emitCTICall(instruction + i, i, BytecodeInterpreter::cti_##name); \
     2392        emitCTICall(instruction + i, i, Interpreter::cti_##name); \
    23842393        emitPutVirtualRegister(instruction[i + 1].u.operand); \
    23852394        i += 4; \
     
    24072416            __ link((++iter)->from, __ label());
    24082417            emitPutCTIArg(X86::eax, 0);
    2409             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_convert_this);
     2418            emitCTICall(instruction + i, i, Interpreter::cti_op_convert_this);
    24102419            emitPutVirtualRegister(instruction[i + 1].u.operand);
    24112420            i += 2;
     
    24172426            unsigned src2 = instruction[i + 3].u.operand;
    24182427            if (JSValue* value = getConstantImmediateNumericArg(src1)) {
    2419                 X86Assembler::JmpSrc notImm = iter->from;
     2428                JmpSrc notImm = iter->from;
    24202429                __ link((++iter)->from, __ label());
    24212430                __ subl_i32r(getDeTaggedConstantImmediate(value), X86::eax);
     
    24232432                emitPutCTIArgFromVirtualRegister(src1, 0, X86::ecx);
    24242433                emitPutCTIArg(X86::eax, 4);
    2425                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_add);
     2434                emitCTICall(instruction + i, i, Interpreter::cti_op_add);
    24262435                emitPutVirtualRegister(dst);
    24272436            } else if (JSValue* value = getConstantImmediateNumericArg(src2)) {
    2428                 X86Assembler::JmpSrc notImm = iter->from;
     2437                JmpSrc notImm = iter->from;
    24292438                __ link((++iter)->from, __ label());
    24302439                __ subl_i32r(getDeTaggedConstantImmediate(value), X86::eax);
     
    24322441                emitPutCTIArg(X86::eax, 0);
    24332442                emitPutCTIArgFromVirtualRegister(src2, 4, X86::ecx);
    2434                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_add);
     2443                emitCTICall(instruction + i, i, Interpreter::cti_op_add);
    24352444                emitPutVirtualRegister(dst);
    24362445            } else {
     
    24472456        case op_get_by_val: {
    24482457            // The slow case that handles accesses to arrays (below) may jump back up to here.
    2449             X86Assembler::JmpDst beginGetByValSlow = __ label();
    2450 
    2451             X86Assembler::JmpSrc notImm = iter->from;
     2458            JmpDst beginGetByValSlow = __ label();
     2459
     2460            JmpSrc notImm = iter->from;
    24522461            __ link((++iter)->from, __ label());
    24532462            __ link((++iter)->from, __ label());
     
    24562465            emitPutCTIArg(X86::eax, 0);
    24572466            emitPutCTIArg(X86::edx, 4);
    2458             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_get_by_val);
     2467            emitCTICall(instruction + i, i, Interpreter::cti_op_get_by_val);
    24592468            emitPutVirtualRegister(instruction[i + 1].u.operand);
    24602469            __ link(__ emitUnlinkedJmp(), m_labels[i + 4]);
     
    24632472            // First, check if this is an access to the vector
    24642473            __ link((++iter)->from, __ label());
    2465             __ cmpl_rm(X86::edx, OBJECT_OFFSET(ArrayStorage, m_vectorLength), X86::ecx);
     2474            __ cmpl_rm(X86::edx, FIELD_OFFSET(ArrayStorage, m_vectorLength), X86::ecx);
    24662475            __ link(__ emitUnlinkedJbe(), beginGetByValSlow);
    24672476
    24682477            // okay, missed the fast region, but it is still in the vector.  Get the value.
    2469             __ movl_mr(OBJECT_OFFSET(ArrayStorage, m_vector[0]), X86::ecx, X86::edx, sizeof(JSValue*), X86::ecx);
     2478            __ movl_mr(FIELD_OFFSET(ArrayStorage, m_vector[0]), X86::ecx, X86::edx, sizeof(JSValue*), X86::ecx);
    24702479            // Check whether the value loaded is zero; if so we need to return undefined.
    24712480            __ testl_rr(X86::ecx, X86::ecx);
     
    24932502
    24942503            emitPutCTIArgFromVirtualRegister(instruction[i + 2].u.operand, 0, X86::ecx);
    2495             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_negate);
     2504            emitCTICall(instruction + i, i, Interpreter::cti_op_negate);
    24962505            emitPutVirtualRegister(instruction[i + 1].u.operand);
    24972506            i += 4;
     
    25032512            emitPutCTIArg(X86::eax, 0);
    25042513            emitPutCTIArg(X86::ecx, 4);
    2505             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_rshift);
     2514            emitCTICall(instruction + i, i, Interpreter::cti_op_rshift);
    25062515            emitPutVirtualRegister(instruction[i + 1].u.operand);
    25072516            i += 4;
     
    25092518        }
    25102519        case op_lshift: {
    2511             X86Assembler::JmpSrc notImm1 = iter->from;
    2512             X86Assembler::JmpSrc notImm2 = (++iter)->from;
     2520            JmpSrc notImm1 = iter->from;
     2521            JmpSrc notImm2 = (++iter)->from;
    25132522            __ link((++iter)->from, __ label());
    25142523            emitGetVirtualRegisters(instruction[i + 2].u.operand, X86::eax, instruction[i + 3].u.operand, X86::ecx, i);
     
    25172526            emitPutCTIArg(X86::eax, 0);
    25182527            emitPutCTIArg(X86::ecx, 4);
    2519             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_lshift);
     2528            emitCTICall(instruction + i, i, Interpreter::cti_op_lshift);
    25202529            emitPutVirtualRegister(instruction[i + 1].u.operand);
    25212530            i += 4;
     
    25312540                emitPutCTIArg(X86::edx, 0);
    25322541                emitPutCTIArgFromVirtualRegister(instruction[i + 2].u.operand, 4, X86::ecx);
    2533                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_loop_if_less);
     2542                emitCTICall(instruction + i, i, Interpreter::cti_op_loop_if_less);
    25342543                __ testl_rr(X86::eax, X86::eax);
    25352544                __ link(__ emitUnlinkedJne(), m_labels[i + 3 + target]);
     
    25392548                emitPutCTIArg(X86::eax, 0);
    25402549                emitPutCTIArg(X86::edx, 4);
    2541                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_loop_if_less);
     2550                emitCTICall(instruction + i, i, Interpreter::cti_op_loop_if_less);
    25422551                __ testl_rr(X86::eax, X86::eax);
    25432552                __ link(__ emitUnlinkedJne(), m_labels[i + 3 + target]);
     
    25552564            emitPutCTIArg(X86::eax, 0);
    25562565            emitPutCTIArg(X86::edx, 8);
    2557             X86Assembler::JmpSrc call = emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_put_by_id);
     2566            JmpSrc call = emitCTICall(instruction + i, i, Interpreter::cti_op_put_by_id);
    25582567
    25592568            // Track the location of the call; this will be used to recover repatch information.
     
    25772586
    25782587#ifndef NDEBUG
    2579             X86Assembler::JmpDst coldPathBegin = __ label();
     2588            JmpDst coldPathBegin = __ label();
    25802589#endif       
    25812590            emitPutCTIArg(X86::eax, 0);
    25822591            Identifier* ident = &(m_codeBlock->identifiers[instruction[i + 3].u.operand]);
    25832592            emitPutCTIArgConstant(reinterpret_cast<unsigned>(ident), 4);
    2584             X86Assembler::JmpSrc call = emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_get_by_id);
    2585             ASSERT(X86Assembler::getDifferenceBetweenLabels(coldPathBegin, call) == repatchOffsetGetByIdSlowCaseCall);
     2593            JmpSrc call = emitCTICall(instruction + i, i, Interpreter::cti_op_get_by_id);
     2594            ASSERT(__ getDifferenceBetweenLabels(coldPathBegin, call) == repatchOffsetGetByIdSlowCaseCall);
    25862595            emitPutVirtualRegister(instruction[i + 1].u.operand);
    25872596
     
    26032612                emitPutCTIArg(X86::edx, 0);
    26042613                emitPutCTIArgFromVirtualRegister(instruction[i + 2].u.operand, 4, X86::ecx);
    2605                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_loop_if_lesseq);
     2614                emitCTICall(instruction + i, i, Interpreter::cti_op_loop_if_lesseq);
    26062615                __ testl_rr(X86::eax, X86::eax);
    26072616                __ link(__ emitUnlinkedJne(), m_labels[i + 3 + target]);
     
    26112620                emitPutCTIArg(X86::eax, 0);
    26122621                emitPutCTIArg(X86::edx, 4);
    2613                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_loop_if_lesseq);
     2622                emitCTICall(instruction + i, i, Interpreter::cti_op_loop_if_lesseq);
    26142623                __ testl_rr(X86::eax, X86::eax);
    26152624                __ link(__ emitUnlinkedJne(), m_labels[i + 3 + target]);
     
    26202629        case op_pre_inc: {
    26212630            unsigned srcDst = instruction[i + 1].u.operand;
    2622             X86Assembler::JmpSrc notImm = iter->from;
     2631            JmpSrc notImm = iter->from;
    26232632            __ link((++iter)->from, __ label());
    26242633            __ subl_i8r(getDeTaggedConstantImmediate(JSImmediate::oneImmediate()), X86::eax);
    26252634            __ link(notImm, __ label());
    26262635            emitPutCTIArg(X86::eax, 0);
    2627             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_pre_inc);
     2636            emitCTICall(instruction + i, i, Interpreter::cti_op_pre_inc);
    26282637            emitPutVirtualRegister(srcDst);
    26292638            i += 2;
     
    26322641        case op_put_by_val: {
    26332642            // Normal slow cases - either is not an immediate imm, or is an array.
    2634             X86Assembler::JmpSrc notImm = iter->from;
     2643            JmpSrc notImm = iter->from;
    26352644            __ link((++iter)->from, __ label());
    26362645            __ link((++iter)->from, __ label());
     
    26412650            emitPutCTIArg(X86::edx, 4);
    26422651            emitPutCTIArg(X86::ecx, 8);
    2643             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_put_by_val);
     2652            emitCTICall(instruction + i, i, Interpreter::cti_op_put_by_val);
    26442653            __ link(__ emitUnlinkedJmp(), m_labels[i + 4]);
    26452654
     
    26512660            emitPutCTIArg(X86::edx, 4);
    26522661            emitPutCTIArg(X86::ecx, 8);
    2653             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_put_by_val_array);
     2662            emitCTICall(instruction + i, i, Interpreter::cti_op_put_by_val_array);
    26542663
    26552664            i += 4;
     
    26612670            __ link(iter->from, __ label());
    26622671            emitPutCTIArg(X86::eax, 0);
    2663             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_jtrue);
     2672            emitCTICall(instruction + i, i, Interpreter::cti_op_jtrue);
    26642673            __ testl_rr(X86::eax, X86::eax);
    26652674            unsigned target = instruction[i + 2].u.operand;
     
    26702679        case op_pre_dec: {
    26712680            unsigned srcDst = instruction[i + 1].u.operand;
    2672             X86Assembler::JmpSrc notImm = iter->from;
     2681            JmpSrc notImm = iter->from;
    26732682            __ link((++iter)->from, __ label());
    26742683            __ addl_i8r(getDeTaggedConstantImmediate(JSImmediate::oneImmediate()), X86::eax);
    26752684            __ link(notImm, __ label());
    26762685            emitPutCTIArg(X86::eax, 0);
    2677             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_pre_dec);
     2686            emitCTICall(instruction + i, i, Interpreter::cti_op_pre_dec);
    26782687            emitPutVirtualRegister(srcDst);
    26792688            i += 2;
     
    26872696                emitPutCTIArg(X86::edx, 0);
    26882697                emitPutCTIArgFromVirtualRegister(instruction[i + 2].u.operand, 4, X86::ecx);
    2689                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_jless);
     2698                emitCTICall(instruction + i, i, Interpreter::cti_op_jless);
    26902699                __ testl_rr(X86::eax, X86::eax);
    26912700                __ link(__ emitUnlinkedJe(), m_labels[i + 3 + target]);
     
    26952704                emitPutCTIArg(X86::eax, 0);
    26962705                emitPutCTIArg(X86::edx, 4);
    2697                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_jless);
     2706                emitCTICall(instruction + i, i, Interpreter::cti_op_jless);
    26982707                __ testl_rr(X86::eax, X86::eax);
    26992708                __ link(__ emitUnlinkedJe(), m_labels[i + 3 + target]);
     
    27062715            __ xorl_i8r(JSImmediate::FullTagTypeBool, X86::eax);
    27072716            emitPutCTIArg(X86::eax, 0);
    2708             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_not);
     2717            emitCTICall(instruction + i, i, Interpreter::cti_op_not);
    27092718            emitPutVirtualRegister(instruction[i + 1].u.operand);
    27102719            i += 3;
     
    27142723            __ link(iter->from, __ label());
    27152724            emitPutCTIArg(X86::eax, 0);
    2716             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_jtrue);
     2725            emitCTICall(instruction + i, i, Interpreter::cti_op_jtrue);
    27172726            __ testl_rr(X86::eax, X86::eax);
    27182727            unsigned target = instruction[i + 2].u.operand;
     
    27262735            __ link((++iter)->from, __ label());
    27272736            emitPutCTIArg(X86::eax, 0);
    2728             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_post_inc);
     2737            emitCTICall(instruction + i, i, Interpreter::cti_op_post_inc);
    27292738            emitPutVirtualRegister(srcDst, X86::edx);
    27302739            emitPutVirtualRegister(instruction[i + 1].u.operand);
     
    27352744            __ link(iter->from, __ label());
    27362745            emitPutCTIArg(X86::eax, 0);
    2737             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_bitnot);
     2746            emitCTICall(instruction + i, i, Interpreter::cti_op_bitnot);
    27382747            emitPutVirtualRegister(instruction[i + 1].u.operand);
    27392748            i += 3;
     
    27482757                emitPutCTIArgFromVirtualRegister(src1, 0, X86::ecx);
    27492758                emitPutCTIArg(X86::eax, 4);
    2750                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_bitand);
     2759                emitCTICall(instruction + i, i, Interpreter::cti_op_bitand);
    27512760                emitPutVirtualRegister(dst);
    27522761            } else if (getConstantImmediateNumericArg(src2)) {
     
    27542763                emitPutCTIArg(X86::eax, 0);
    27552764                emitPutCTIArgFromVirtualRegister(src2, 4, X86::ecx);
    2756                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_bitand);
     2765                emitCTICall(instruction + i, i, Interpreter::cti_op_bitand);
    27572766                emitPutVirtualRegister(dst);
    27582767            } else {
     
    27602769                emitPutCTIArgFromVirtualRegister(src1, 0, X86::ecx);
    27612770                emitPutCTIArg(X86::edx, 4);
    2762                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_bitand);
     2771                emitCTICall(instruction + i, i, Interpreter::cti_op_bitand);
    27632772                emitPutVirtualRegister(dst);
    27642773            }
     
    27692778            __ link(iter->from, __ label());
    27702779            emitPutCTIArg(X86::eax, 0);
    2771             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_jtrue);
     2780            emitCTICall(instruction + i, i, Interpreter::cti_op_jtrue);
    27722781            __ testl_rr(X86::eax, X86::eax);
    27732782            unsigned target = instruction[i + 2].u.operand;
     
    27812790            __ link((++iter)->from, __ label());
    27822791            emitPutCTIArg(X86::eax, 0);
    2783             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_post_dec);
     2792            emitCTICall(instruction + i, i, Interpreter::cti_op_post_dec);
    27842793            emitPutVirtualRegister(srcDst, X86::edx);
    27852794            emitPutVirtualRegister(instruction[i + 1].u.operand);
     
    27912800            emitPutCTIArg(X86::eax, 0);
    27922801            emitPutCTIArg(X86::edx, 4);
    2793             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_bitxor);
     2802            emitCTICall(instruction + i, i, Interpreter::cti_op_bitxor);
    27942803            emitPutVirtualRegister(instruction[i + 1].u.operand);
    27952804            i += 5;
     
    28002809            emitPutCTIArg(X86::eax, 0);
    28012810            emitPutCTIArg(X86::edx, 4);
    2802             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_bitor);
     2811            emitCTICall(instruction + i, i, Interpreter::cti_op_bitor);
    28032812            emitPutVirtualRegister(instruction[i + 1].u.operand);
    28042813            i += 5;
     
    28092818            emitPutCTIArg(X86::eax, 0);
    28102819            emitPutCTIArg(X86::edx, 4);
    2811             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_eq);
     2820            emitCTICall(instruction + i, i, Interpreter::cti_op_eq);
    28122821            emitPutVirtualRegister(instruction[i + 1].u.operand);
    28132822            i += 4;
     
    28182827            emitPutCTIArg(X86::eax, 0);
    28192828            emitPutCTIArg(X86::edx, 4);
    2820             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_neq);
     2829            emitCTICall(instruction + i, i, Interpreter::cti_op_neq);
    28212830            emitPutVirtualRegister(instruction[i + 1].u.operand);
    28222831            i += 4;
     
    28322841            emitPutCTIArgFromVirtualRegister(instruction[i + 3].u.operand, 4, X86::ecx);
    28332842            emitPutCTIArgFromVirtualRegister(instruction[i + 4].u.operand, 8, X86::ecx);
    2834             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_instanceof);
     2843            emitCTICall(instruction + i, i, Interpreter::cti_op_instanceof);
    28352844            emitPutVirtualRegister(instruction[i + 1].u.operand);
    28362845            i += 5;
     
    28382847        }
    28392848        case op_mod: {
    2840             X86Assembler::JmpSrc notImm1 = iter->from;
    2841             X86Assembler::JmpSrc notImm2 = (++iter)->from;
     2849            JmpSrc notImm1 = iter->from;
     2850            JmpSrc notImm2 = (++iter)->from;
    28422851            __ link((++iter)->from, __ label());
    28432852            emitFastArithReTagImmediate(X86::eax);
     
    28472856            emitPutCTIArg(X86::eax, 0);
    28482857            emitPutCTIArg(X86::ecx, 4);
    2849             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_mod);
     2858            emitCTICall(instruction + i, i, Interpreter::cti_op_mod);
    28502859            emitPutVirtualRegister(instruction[i + 1].u.operand);
    28512860            i += 4;
     
    28652874                emitPutCTIArgFromVirtualRegister(src1, 0, X86::ecx);
    28662875                emitPutCTIArgFromVirtualRegister(src2, 4, X86::ecx);
    2867                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_mul);
     2876                emitCTICall(instruction + i, i, Interpreter::cti_op_mul);
    28682877                emitPutVirtualRegister(dst);
    28692878            } else if (src2Value && ((value = JSImmediate::intValue(src2Value)) > 0)) {
     
    28732882                emitPutCTIArgFromVirtualRegister(src1, 0, X86::ecx);
    28742883                emitPutCTIArgFromVirtualRegister(src2, 4, X86::ecx);
    2875                 emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_mul);
     2884                emitCTICall(instruction + i, i, Interpreter::cti_op_mul);
    28762885                emitPutVirtualRegister(dst);
    28772886            } else
     
    28992908            // Fast check for JS function.
    29002909            __ testl_i32r(JSImmediate::TagMask, X86::ecx);
    2901             X86Assembler::JmpSrc callLinkFailNotObject = __ emitUnlinkedJne();
     2910            JmpSrc callLinkFailNotObject = __ emitUnlinkedJne();
    29022911            __ cmpl_i32m(reinterpret_cast<unsigned>(m_interpreter->m_jsFunctionVptr), X86::ecx);
    2903             X86Assembler::JmpSrc callLinkFailNotJSFunction = __ emitUnlinkedJne();
     2912            JmpSrc callLinkFailNotJSFunction = __ emitUnlinkedJne();
    29042913
    29052914            // First, in the case of a construct, allocate the new object.
    29062915            if (opcodeID == op_construct) {
    2907                 emitCTICall(instruction, i, BytecodeInterpreter::cti_op_construct_JSConstruct);
     2916                emitCTICall(instruction, i, Interpreter::cti_op_construct_JSConstruct);
    29082917                emitPutVirtualRegister(registerOffset - RegisterFile::CallFrameHeaderSize - argCount);
    29092918                emitGetVirtualRegister(callee, X86::ecx, i);
     
    29192928                emitNakedCall(i, m_interpreter->m_ctiVirtualCallPreLink);
    29202929
    2921             X86Assembler::JmpSrc storeResultForFirstRun = __ emitUnlinkedJmp();
     2930            JmpSrc storeResultForFirstRun = __ emitUnlinkedJmp();
    29222931
    29232932            // This is the address for the cold path *after* the first run (which tries to link the call).
     
    29322941            // Check for JSFunctions.
    29332942            __ testl_i32r(JSImmediate::TagMask, X86::ecx);
    2934             X86Assembler::JmpSrc isNotObject = __ emitUnlinkedJne();
     2943            JmpSrc isNotObject = __ emitUnlinkedJne();
    29352944            __ cmpl_i32m(reinterpret_cast<unsigned>(m_interpreter->m_jsFunctionVptr), X86::ecx);
    2936             X86Assembler::JmpSrc isJSFunction = __ emitUnlinkedJe();
     2945            JmpSrc isJSFunction = __ emitUnlinkedJe();
    29372946
    29382947            // This handles host functions
    2939             X86Assembler::JmpDst notJSFunctionlabel = __ label();
     2948            JmpDst notJSFunctionlabel = __ label();
    29402949            __ link(isNotObject, notJSFunctionlabel);
    29412950            __ link(callLinkFailNotObject, notJSFunctionlabel);
    29422951            __ link(callLinkFailNotJSFunction, notJSFunctionlabel);
    2943             emitCTICall(instruction + i, i, ((opcodeID == op_construct) ? BytecodeInterpreter::cti_op_construct_NotJSConstruct : BytecodeInterpreter::cti_op_call_NotJSFunction));
    2944             X86Assembler::JmpSrc wasNotJSFunction = __ emitUnlinkedJmp();
     2952            emitCTICall(instruction + i, i, ((opcodeID == op_construct) ? Interpreter::cti_op_construct_NotJSConstruct : Interpreter::cti_op_call_NotJSFunction));
     2953            JmpSrc wasNotJSFunction = __ emitUnlinkedJmp();
    29452954
    29462955            // Next, handle JSFunctions...
     
    29492958            // First, in the case of a construct, allocate the new object.
    29502959            if (opcodeID == op_construct) {
    2951                 emitCTICall(instruction, i, BytecodeInterpreter::cti_op_construct_JSConstruct);
     2960                emitCTICall(instruction, i, Interpreter::cti_op_construct_JSConstruct);
    29522961                emitPutVirtualRegister(registerOffset - RegisterFile::CallFrameHeaderSize - argCount);
    29532962                emitGetVirtualRegister(callee, X86::ecx, i);
     
    29622971
    29632972            // Put the return value in dst. In the interpreter, op_ret does this.
    2964             X86Assembler::JmpDst storeResult = __ label();
     2973            JmpDst storeResult = __ label();
    29652974            __ link(wasNotJSFunction, storeResult);
    29662975            __ link(storeResultForFirstRun, storeResult);
     
    29812990
    29822991            emitPutCTIArg(X86::eax, 0);
    2983             emitCTICall(instruction + i, i, BytecodeInterpreter::cti_op_to_jsnumber);
     2992            emitCTICall(instruction + i, i, Interpreter::cti_op_to_jsnumber);
    29842993
    29852994            emitPutVirtualRegister(instruction[i + 1].u.operand);
     
    30163025    emitPutToCallFrameHeader(X86::ecx, RegisterFile::ReturnPC);
    30173026
    3018     X86Assembler::JmpSrc slowRegisterFileCheck;
    3019     X86Assembler::JmpDst afterRegisterFileCheck;
     3027    JmpSrc slowRegisterFileCheck;
     3028    JmpDst afterRegisterFileCheck;
    30203029    if (m_codeBlock->codeType == FunctionCode) {
    30213030        // In the case of a fast linked call, we do not set this up in the caller.
     
    30243033        emitGetCTIParam(CTI_ARGS_registerFile, X86::eax);
    30253034        __ leal_mr(m_codeBlock->numCalleeRegisters * sizeof(Register), X86::edi, X86::edx);
    3026         __ cmpl_mr(OBJECT_OFFSET(RegisterFile, m_end), X86::eax, X86::edx);
     3035        __ cmpl_mr(FIELD_OFFSET(RegisterFile, m_end), X86::eax, X86::edx);
    30273036        slowRegisterFileCheck = __ emitUnlinkedJg();
    30283037        afterRegisterFileCheck = __ label();
     
    30353044    if (m_codeBlock->codeType == FunctionCode) {
    30363045        __ link(slowRegisterFileCheck, __ label());
    3037         emitCTICall(m_codeBlock->instructions.begin(), 0, BytecodeInterpreter::cti_register_file_check);
    3038         X86Assembler::JmpSrc backToBody = __ emitUnlinkedJmp();
     3046        emitCTICall(m_codeBlock->instructions.begin(), 0, Interpreter::cti_register_file_check);
     3047        JmpSrc backToBody = __ emitUnlinkedJmp();
    30393048        __ link(backToBody, afterRegisterFileCheck);
    30403049    }
     
    30423051    ASSERT(m_jmpTable.isEmpty());
    30433052
    3044     void* code = __ copy();
     3053    void* code = __ executableCopy();
    30453054    ASSERT(code);
    30463055
     
    30783087    for (Vector<CallRecord>::iterator iter = m_calls.begin(); iter != m_calls.end(); ++iter) {
    30793088        if (iter->to)
    3080             X86Assembler::link(code, iter->from, iter->to);
     3089            __ link(code, iter->from, iter->to);
    30813090        m_codeBlock->ctiReturnAddressVPCMap.add(__ getRelocatedAddress(code, iter->from), iter->bytecodeIndex);
    30823091    }
     
    30843093    // Link absolute addresses for jsr
    30853094    for (Vector<JSRInfo>::iterator iter = m_jsrSites.begin(); iter != m_jsrSites.end(); ++iter)
    3086         X86Assembler::linkAbsoluteAddress(code, iter->addrPosition, iter->target);
     3095        __ linkAbsoluteAddress(code, iter->addrPosition, iter->target);
    30873096
    30883097    for (unsigned i = 0; i < m_codeBlock->propertyAccessInstructions.size(); ++i) {
    30893098        StructureStubInfo& info = m_codeBlock->propertyAccessInstructions[i];
    3090         info.callReturnLocation = X86Assembler::getRelocatedAddress(code, m_propertyAccessCompilationInfo[i].callReturnLocation);
    3091         info.hotPathBegin = X86Assembler::getRelocatedAddress(code, m_propertyAccessCompilationInfo[i].hotPathBegin);
     3099        info.callReturnLocation = __ getRelocatedAddress(code, m_propertyAccessCompilationInfo[i].callReturnLocation);
     3100        info.hotPathBegin = __ getRelocatedAddress(code, m_propertyAccessCompilationInfo[i].hotPathBegin);
    30923101    }
    30933102    for (unsigned i = 0; i < m_codeBlock->callLinkInfos.size(); ++i) {
    30943103        CallLinkInfo& info = m_codeBlock->callLinkInfos[i];
    3095         info.callReturnLocation = X86Assembler::getRelocatedAddress(code, m_callStructureStubCompilationInfo[i].callReturnLocation);
    3096         info.hotPathBegin = X86Assembler::getRelocatedAddress(code, m_callStructureStubCompilationInfo[i].hotPathBegin);
    3097         info.hotPathOther = X86Assembler::getRelocatedAddress(code, m_callStructureStubCompilationInfo[i].hotPathOther);
    3098         info.coldPathOther = X86Assembler::getRelocatedAddress(code, m_callStructureStubCompilationInfo[i].coldPathOther);
     3104        info.callReturnLocation = __ getRelocatedAddress(code, m_callStructureStubCompilationInfo[i].callReturnLocation);
     3105        info.hotPathBegin = __ getRelocatedAddress(code, m_callStructureStubCompilationInfo[i].hotPathBegin);
     3106        info.hotPathOther = __ getRelocatedAddress(code, m_callStructureStubCompilationInfo[i].hotPathOther);
     3107        info.coldPathOther = __ getRelocatedAddress(code, m_callStructureStubCompilationInfo[i].coldPathOther);
    30993108    }
    31003109
     
    31063115    // Check eax is an object of the right Structure.
    31073116    __ testl_i32r(JSImmediate::TagMask, X86::eax);
    3108     X86Assembler::JmpSrc failureCases1 = __ emitUnlinkedJne();
    3109     __ cmpl_i32m(reinterpret_cast<uint32_t>(structure), OBJECT_OFFSET(JSCell, m_structure), X86::eax);
    3110     X86Assembler::JmpSrc failureCases2 = __ emitUnlinkedJne();
     3117    JmpSrc failureCases1 = __ emitUnlinkedJne();
     3118    __ cmpl_i32m(reinterpret_cast<uint32_t>(structure), FIELD_OFFSET(JSCell, m_structure), X86::eax);
     3119    JmpSrc failureCases2 = __ emitUnlinkedJne();
    31113120
    31123121    // Checks out okay! - getDirectOffset
    3113     __ movl_mr(OBJECT_OFFSET(JSObject, m_propertyStorage), X86::eax, X86::eax);
     3122    __ movl_mr(FIELD_OFFSET(JSObject, m_propertyStorage), X86::eax, X86::eax);
    31143123    __ movl_mr(cachedOffset * sizeof(JSValue*), X86::eax, X86::eax);
    31153124    __ ret();
    31163125
    3117     void* code = __ copy();
     3126    void* code = __ executableCopy();
    31183127    ASSERT(code);
    31193128
    3120     X86Assembler::link(code, failureCases1, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_get_by_id_fail));
    3121     X86Assembler::link(code, failureCases2, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_get_by_id_fail));
     3129    __ link(code, failureCases1, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_fail));
     3130    __ link(code, failureCases2, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_fail));
    31223131   
    31233132    m_codeBlock->getStubInfo(returnAddress).stubRoutine = code;
     
    31323141
    31333142    // We don't want to repatch more than once - in future go to cti_op_put_by_id_generic.
    3134     ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_get_by_id_fail));
     3143    ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_fail));
    31353144
    31363145    // The prototype object definitely exists (if this stub exists the CodeBlock is referencing a Structure that is
     
    31423151    // check eax is an object of the right Structure.
    31433152    __ testl_i32r(JSImmediate::TagMask, X86::eax);
    3144     X86Assembler::JmpSrc failureCases1 = __ emitUnlinkedJne();
    3145     __ cmpl_i32m(reinterpret_cast<uint32_t>(structure), OBJECT_OFFSET(JSCell, m_structure), X86::eax);
    3146     X86Assembler::JmpSrc failureCases2 = __ emitUnlinkedJne();
     3153    JmpSrc failureCases1 = __ emitUnlinkedJne();
     3154    __ cmpl_i32m(reinterpret_cast<uint32_t>(structure), FIELD_OFFSET(JSCell, m_structure), X86::eax);
     3155    JmpSrc failureCases2 = __ emitUnlinkedJne();
    31473156
    31483157    // Check the prototype object's Structure had not changed.
    31493158    Structure** prototypeStructureAddress = &(protoObject->m_structure);
    31503159    __ cmpl_i32m(reinterpret_cast<uint32_t>(prototypeStructure), static_cast<void*>(prototypeStructureAddress));
    3151     X86Assembler::JmpSrc failureCases3 = __ emitUnlinkedJne();
     3160    JmpSrc failureCases3 = __ emitUnlinkedJne();
    31523161
    31533162    // Checks out okay! - getDirectOffset
    31543163    __ movl_mr(cachedOffset * sizeof(JSValue*), X86::edx, X86::eax);
    31553164
    3156     X86Assembler::JmpSrc success = __ emitUnlinkedJmp();
    3157 
    3158     void* code = __ copy();
     3165    JmpSrc success = __ emitUnlinkedJmp();
     3166
     3167    void* code = __ executableCopy();
    31593168    ASSERT(code);
    31603169
    31613170    // Use the repatch information to link the failure cases back to the original slow case routine.
    31623171    void* slowCaseBegin = reinterpret_cast<char*>(info.callReturnLocation) - repatchOffsetGetByIdSlowCaseCall;
    3163     X86Assembler::link(code, failureCases1, slowCaseBegin);
    3164     X86Assembler::link(code, failureCases2, slowCaseBegin);
    3165     X86Assembler::link(code, failureCases3, slowCaseBegin);
     3172    __ link(code, failureCases1, slowCaseBegin);
     3173    __ link(code, failureCases2, slowCaseBegin);
     3174    __ link(code, failureCases3, slowCaseBegin);
    31663175
    31673176    // On success return back to the hot patch code, at a point it will perform the store to dest for us.
    31683177    intptr_t successDest = (intptr_t)(info.hotPathBegin) + repatchOffsetGetByIdPropertyMapOffset;
    3169     X86Assembler::link(code, success, reinterpret_cast<void*>(successDest));
     3178    __ link(code, success, reinterpret_cast<void*>(successDest));
    31703179
    31713180    // Track the stub we have created so that it will be deleted later.
     
    31753184    // FIXME: should revert this repatching, on failure.
    31763185    intptr_t jmpLocation = reinterpret_cast<intptr_t>(info.hotPathBegin) + repatchOffsetGetByIdBranchToSlowCase;
    3177     X86Assembler::repatchBranchOffset(jmpLocation, code);
     3186    __ repatchBranchOffset(jmpLocation, code);
    31783187#else
    31793188    // The prototype object definitely exists (if this stub exists the CodeBlock is referencing a Structure that is
     
    31853194    // check eax is an object of the right Structure.
    31863195    __ testl_i32r(JSImmediate::TagMask, X86::eax);
    3187     X86Assembler::JmpSrc failureCases1 = __ emitUnlinkedJne();
    3188     __ cmpl_i32m(reinterpret_cast<uint32_t>(structure), OBJECT_OFFSET(JSCell, m_structure), X86::eax);
    3189     X86Assembler::JmpSrc failureCases2 = __ emitUnlinkedJne();
     3196    JmpSrc failureCases1 = __ emitUnlinkedJne();
     3197    __ cmpl_i32m(reinterpret_cast<uint32_t>(structure), FIELD_OFFSET(JSCell, m_structure), X86::eax);
     3198    JmpSrc failureCases2 = __ emitUnlinkedJne();
    31903199
    31913200    // Check the prototype object's Structure had not changed.
    31923201    Structure** prototypeStructureAddress = &(protoObject->m_structure);
    31933202    __ cmpl_i32m(reinterpret_cast<uint32_t>(prototypeStructure), static_cast<void*>(prototypeStructureAddress));
    3194     X86Assembler::JmpSrc failureCases3 = __ emitUnlinkedJne();
     3203    JmpSrc failureCases3 = __ emitUnlinkedJne();
    31953204
    31963205    // Checks out okay! - getDirectOffset
     
    31993208    __ ret();
    32003209
    3201     void* code = __ copy();
     3210    void* code = __ executableCopy();
    32023211    ASSERT(code);
    32033212
    3204     X86Assembler::link(code, failureCases1, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_get_by_id_fail));
    3205     X86Assembler::link(code, failureCases2, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_get_by_id_fail));
    3206     X86Assembler::link(code, failureCases3, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_get_by_id_fail));
     3213    __ link(code, failureCases1, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_fail));
     3214    __ link(code, failureCases2, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_fail));
     3215    __ link(code, failureCases3, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_fail));
    32073216
    32083217    m_codeBlock->getStubInfo(returnAddress).stubRoutine = code;
     
    32163225    ASSERT(count);
    32173226   
    3218     Vector<X86Assembler::JmpSrc> bucketsOfFail;
     3227    Vector<JmpSrc> bucketsOfFail;
    32193228
    32203229    // Check eax is an object of the right Structure.
    32213230    __ testl_i32r(JSImmediate::TagMask, X86::eax);
    32223231    bucketsOfFail.append(__ emitUnlinkedJne());
    3223     __ cmpl_i32m(reinterpret_cast<uint32_t>(structure), OBJECT_OFFSET(JSCell, m_structure), X86::eax);
     3232    __ cmpl_i32m(reinterpret_cast<uint32_t>(structure), FIELD_OFFSET(JSCell, m_structure), X86::eax);
    32243233    bucketsOfFail.append(__ emitUnlinkedJne());
    32253234
     
    32453254    bucketsOfFail.append(__ emitUnlinkedJmp());
    32463255
    3247     void* code = __ copy();
     3256    void* code = __ executableCopy();
    32483257    ASSERT(code);
    32493258
    32503259    for (unsigned i = 0; i < bucketsOfFail.size(); ++i)
    3251         X86Assembler::link(code, bucketsOfFail[i], reinterpret_cast<void*>(BytecodeInterpreter::cti_op_get_by_id_fail));
     3260        __ link(code, bucketsOfFail[i], reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_fail));
    32523261
    32533262    m_codeBlock->getStubInfo(returnAddress).stubRoutine = code;
     
    32603269    // check eax is an object of the right Structure.
    32613270    __ testl_i32r(JSImmediate::TagMask, X86::eax);
    3262     X86Assembler::JmpSrc failureCases1 = __ emitUnlinkedJne();
    3263     __ cmpl_i32m(reinterpret_cast<uint32_t>(structure), OBJECT_OFFSET(JSCell, m_structure), X86::eax);
    3264     X86Assembler::JmpSrc failureCases2 = __ emitUnlinkedJne();
     3271    JmpSrc failureCases1 = __ emitUnlinkedJne();
     3272    __ cmpl_i32m(reinterpret_cast<uint32_t>(structure), FIELD_OFFSET(JSCell, m_structure), X86::eax);
     3273    JmpSrc failureCases2 = __ emitUnlinkedJne();
    32653274
    32663275    // checks out okay! - putDirectOffset
    3267     __ movl_mr(OBJECT_OFFSET(JSObject, m_propertyStorage), X86::eax, X86::eax);
     3276    __ movl_mr(FIELD_OFFSET(JSObject, m_propertyStorage), X86::eax, X86::eax);
    32683277    __ movl_rm(X86::edx, cachedOffset * sizeof(JSValue*), X86::eax);
    32693278    __ ret();
    32703279
    3271     void* code = __ copy();
     3280    void* code = __ executableCopy();
    32723281    ASSERT(code);
    32733282   
    3274     X86Assembler::link(code, failureCases1, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_put_by_id_fail));
    3275     X86Assembler::link(code, failureCases2, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_put_by_id_fail));
     3283    __ link(code, failureCases1, reinterpret_cast<void*>(Interpreter::cti_op_put_by_id_fail));
     3284    __ link(code, failureCases2, reinterpret_cast<void*>(Interpreter::cti_op_put_by_id_fail));
    32763285
    32773286    m_codeBlock->getStubInfo(returnAddress).stubRoutine = code;
     
    32973306void CTI::privateCompilePutByIdTransition(Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, void* returnAddress)
    32983307{
    3299     Vector<X86Assembler::JmpSrc, 16> failureCases;
     3308    Vector<JmpSrc, 16> failureCases;
    33003309    // check eax is an object of the right Structure.
    33013310    __ testl_i32r(JSImmediate::TagMask, X86::eax);
    33023311    failureCases.append(__ emitUnlinkedJne());
    3303     __ cmpl_i32m(reinterpret_cast<uint32_t>(oldStructure), OBJECT_OFFSET(JSCell, m_structure), X86::eax);
     3312    __ cmpl_i32m(reinterpret_cast<uint32_t>(oldStructure), FIELD_OFFSET(JSCell, m_structure), X86::eax);
    33043313    failureCases.append(__ emitUnlinkedJne());
    3305     Vector<X86Assembler::JmpSrc> successCases;
     3314    Vector<JmpSrc> successCases;
    33063315
    33073316    //  ecx = baseObject
    3308     __ movl_mr(OBJECT_OFFSET(JSCell, m_structure), X86::eax, X86::ecx);
     3317    __ movl_mr(FIELD_OFFSET(JSCell, m_structure), X86::eax, X86::ecx);
    33093318    // proto(ecx) = baseObject->structure()->prototype()
    3310     __ cmpl_i32m(ObjectType, OBJECT_OFFSET(Structure, m_typeInfo) + OBJECT_OFFSET(TypeInfo, m_type), X86::ecx);
     3319    __ cmpl_i32m(ObjectType, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type), X86::ecx);
    33113320    failureCases.append(__ emitUnlinkedJne());
    3312     __ movl_mr(OBJECT_OFFSET(Structure, m_prototype), X86::ecx, X86::ecx);
     3321    __ movl_mr(FIELD_OFFSET(Structure, m_prototype), X86::ecx, X86::ecx);
    33133322   
    33143323    // ecx = baseObject->m_structure
     
    33193328
    33203329        // Check the structure id
    3321         __ cmpl_i32m(reinterpret_cast<uint32_t>(it->get()), OBJECT_OFFSET(JSCell, m_structure), X86::ecx);
     3330        __ cmpl_i32m(reinterpret_cast<uint32_t>(it->get()), FIELD_OFFSET(JSCell, m_structure), X86::ecx);
    33223331        failureCases.append(__ emitUnlinkedJne());
    33233332       
    3324         __ movl_mr(OBJECT_OFFSET(JSCell, m_structure), X86::ecx, X86::ecx);
    3325         __ cmpl_i32m(ObjectType, OBJECT_OFFSET(Structure, m_typeInfo) + OBJECT_OFFSET(TypeInfo, m_type), X86::ecx);
     3333        __ movl_mr(FIELD_OFFSET(JSCell, m_structure), X86::ecx, X86::ecx);
     3334        __ cmpl_i32m(ObjectType, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type), X86::ecx);
    33263335        failureCases.append(__ emitUnlinkedJne());
    3327         __ movl_mr(OBJECT_OFFSET(Structure, m_prototype), X86::ecx, X86::ecx);
     3336        __ movl_mr(FIELD_OFFSET(Structure, m_prototype), X86::ecx, X86::ecx);
    33283337    }
    33293338
     
    33323341        __ link(successCases[i], __ label());
    33333342
    3334     X86Assembler::JmpSrc callTarget;
     3343    JmpSrc callTarget;
    33353344
    33363345    // emit a call only if storage realloc is needed
     
    33493358    __ subl_i8m(1, reinterpret_cast<void*>(oldStructure));
    33503359    __ addl_i8m(1, reinterpret_cast<void*>(newStructure));
    3351     __ movl_i32m(reinterpret_cast<uint32_t>(newStructure), OBJECT_OFFSET(JSCell, m_structure), X86::eax);
     3360    __ movl_i32m(reinterpret_cast<uint32_t>(newStructure), FIELD_OFFSET(JSCell, m_structure), X86::eax);
    33523361
    33533362    // write the value
    3354     __ movl_mr(OBJECT_OFFSET(JSObject, m_propertyStorage), X86::eax, X86::eax);
     3363    __ movl_mr(FIELD_OFFSET(JSObject, m_propertyStorage), X86::eax, X86::eax);
    33553364    __ movl_rm(X86::edx, cachedOffset * sizeof(JSValue*), X86::eax);
    33563365
    33573366    __ ret();
    33583367   
    3359     X86Assembler::JmpSrc failureJump;
     3368    JmpSrc failureJump;
    33603369    if (failureCases.size()) {
    33613370        for (unsigned i = 0; i < failureCases.size(); ++i)
     
    33653374    }
    33663375
    3367     void* code = __ copy();
     3376    void* code = __ executableCopy();
    33683377    ASSERT(code);
    33693378
    33703379    if (failureCases.size())
    3371         X86Assembler::link(code, failureJump, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_put_by_id_fail));
     3380        __ link(code, failureJump, reinterpret_cast<void*>(Interpreter::cti_op_put_by_id_fail));
    33723381
    33733382    if (transitionWillNeedStorageRealloc(oldStructure, newStructure))
    3374         X86Assembler::link(code, callTarget, reinterpret_cast<void*>(resizePropertyStorage));
     3383        __ link(code, callTarget, reinterpret_cast<void*>(resizePropertyStorage));
    33753384   
    33763385    m_codeBlock->getStubInfo(returnAddress).stubRoutine = code;
     
    34103419    // Check eax is an array
    34113420    __ testl_i32r(JSImmediate::TagMask, X86::eax);
    3412     X86Assembler::JmpSrc array_failureCases1 = __ emitUnlinkedJne();
     3421    JmpSrc array_failureCases1 = __ emitUnlinkedJne();
    34133422    __ cmpl_i32m(reinterpret_cast<unsigned>(m_interpreter->m_jsArrayVptr), X86::eax);
    3414     X86Assembler::JmpSrc array_failureCases2 = __ emitUnlinkedJne();
     3423    JmpSrc array_failureCases2 = __ emitUnlinkedJne();
    34153424
    34163425    // Checks out okay! - get the length from the storage
    3417     __ movl_mr(OBJECT_OFFSET(JSArray, m_storage), X86::eax, X86::eax);
    3418     __ movl_mr(OBJECT_OFFSET(ArrayStorage, m_length), X86::eax, X86::eax);
     3426    __ movl_mr(FIELD_OFFSET(JSArray, m_storage), X86::eax, X86::eax);
     3427    __ movl_mr(FIELD_OFFSET(ArrayStorage, m_length), X86::eax, X86::eax);
    34193428
    34203429    __ addl_rr(X86::eax, X86::eax);
    3421     X86Assembler::JmpSrc array_failureCases3 = __ emitUnlinkedJo();
     3430    JmpSrc array_failureCases3 = __ emitUnlinkedJo();
    34223431    __ addl_i8r(1, X86::eax);
    34233432   
     
    34263435    // (2) The second function provides fast property access for string length
    34273436   
    3428     X86Assembler::JmpDst stringLengthBegin = __ align(16);
     3437    JmpDst stringLengthBegin = __ align(16);
    34293438
    34303439    // Check eax is a string
    34313440    __ testl_i32r(JSImmediate::TagMask, X86::eax);
    3432     X86Assembler::JmpSrc string_failureCases1 = __ emitUnlinkedJne();
     3441    JmpSrc string_failureCases1 = __ emitUnlinkedJne();
    34333442    __ cmpl_i32m(reinterpret_cast<unsigned>(m_interpreter->m_jsStringVptr), X86::eax);
    3434     X86Assembler::JmpSrc string_failureCases2 = __ emitUnlinkedJne();
     3443    JmpSrc string_failureCases2 = __ emitUnlinkedJne();
    34353444
    34363445    // Checks out okay! - get the length from the Ustring.
    3437     __ movl_mr(OBJECT_OFFSET(JSString, m_value) + OBJECT_OFFSET(UString, m_rep), X86::eax, X86::eax);
    3438     __ movl_mr(OBJECT_OFFSET(UString::Rep, len), X86::eax, X86::eax);
     3446    __ movl_mr(FIELD_OFFSET(JSString, m_value) + FIELD_OFFSET(UString, m_rep), X86::eax, X86::eax);
     3447    __ movl_mr(FIELD_OFFSET(UString::Rep, len), X86::eax, X86::eax);
    34393448
    34403449    __ addl_rr(X86::eax, X86::eax);
    3441     X86Assembler::JmpSrc string_failureCases3 = __ emitUnlinkedJo();
     3450    JmpSrc string_failureCases3 = __ emitUnlinkedJo();
    34423451    __ addl_i8r(1, X86::eax);
    34433452   
     
    34463455    // (3) Trampolines for the slow cases of op_call / op_call_eval / op_construct.
    34473456   
    3448     X86Assembler::JmpDst virtualCallPreLinkBegin = __ align(16);
     3457    JmpDst virtualCallPreLinkBegin = __ align(16);
    34493458
    34503459    // Load the callee CodeBlock* into eax
    3451     __ movl_mr(OBJECT_OFFSET(JSFunction, m_body), X86::ecx, X86::eax);
    3452     __ movl_mr(OBJECT_OFFSET(FunctionBodyNode, m_code), X86::eax, X86::eax);
     3460    __ movl_mr(FIELD_OFFSET(JSFunction, m_body), X86::ecx, X86::eax);
     3461    __ movl_mr(FIELD_OFFSET(FunctionBodyNode, m_code), X86::eax, X86::eax);
    34533462    __ testl_rr(X86::eax, X86::eax);
    3454     X86Assembler::JmpSrc hasCodeBlock1 = __ emitUnlinkedJne();
     3463    JmpSrc hasCodeBlock1 = __ emitUnlinkedJne();
    34553464    __ popl_r(X86::ebx);
    34563465    __ emitRestoreArgumentReference();
    34573466    emitPutCTIParam(X86::edi, CTI_ARGS_callFrame);
    3458     X86Assembler::JmpSrc callJSFunction1 = __ emitCall();
     3467    JmpSrc callJSFunction1 = __ emitCall();
    34593468    emitGetCTIArg(0, X86::ecx);
    34603469    emitGetCTIArg(8, X86::edx);
     
    34633472
    34643473    // Check argCount matches callee arity.
    3465     __ cmpl_rm(X86::edx, OBJECT_OFFSET(CodeBlock, numParameters), X86::eax);
    3466     X86Assembler::JmpSrc arityCheckOkay1 = __ emitUnlinkedJe();
     3474    __ cmpl_rm(X86::edx, FIELD_OFFSET(CodeBlock, numParameters), X86::eax);
     3475    JmpSrc arityCheckOkay1 = __ emitUnlinkedJe();
    34673476    __ popl_r(X86::ebx);
    34683477    emitPutCTIArg(X86::ebx, 4);
     
    34703479    __ emitRestoreArgumentReference();
    34713480    emitPutCTIParam(X86::edi, CTI_ARGS_callFrame);
    3472     X86Assembler::JmpSrc callArityCheck1 = __ emitCall();
     3481    JmpSrc callArityCheck1 = __ emitCall();
    34733482    __ movl_rr(X86::edx, X86::edi);
    34743483    emitGetCTIArg(0, X86::ecx);
     
    34833492    __ emitRestoreArgumentReference();
    34843493    emitPutCTIParam(X86::edi, CTI_ARGS_callFrame);
    3485     X86Assembler::JmpSrc callDontLazyLinkCall = __ emitCall();
     3494    JmpSrc callDontLazyLinkCall = __ emitCall();
    34863495    __ pushl_r(X86::ebx);
    34873496
    34883497    __ jmp_r(X86::eax);
    34893498
    3490     X86Assembler::JmpDst virtualCallLinkBegin = __ align(16);
     3499    JmpDst virtualCallLinkBegin = __ align(16);
    34913500
    34923501    // Load the callee CodeBlock* into eax
    3493     __ movl_mr(OBJECT_OFFSET(JSFunction, m_body), X86::ecx, X86::eax);
    3494     __ movl_mr(OBJECT_OFFSET(FunctionBodyNode, m_code), X86::eax, X86::eax);
     3502    __ movl_mr(FIELD_OFFSET(JSFunction, m_body), X86::ecx, X86::eax);
     3503    __ movl_mr(FIELD_OFFSET(FunctionBodyNode, m_code), X86::eax, X86::eax);
    34953504    __ testl_rr(X86::eax, X86::eax);
    3496     X86Assembler::JmpSrc hasCodeBlock2 = __ emitUnlinkedJne();
     3505    JmpSrc hasCodeBlock2 = __ emitUnlinkedJne();
    34973506    __ popl_r(X86::ebx);
    34983507    __ emitRestoreArgumentReference();
    34993508    emitPutCTIParam(X86::edi, CTI_ARGS_callFrame);
    3500     X86Assembler::JmpSrc callJSFunction2 = __ emitCall();
     3509    JmpSrc callJSFunction2 = __ emitCall();
    35013510    emitGetCTIArg(0, X86::ecx);
    35023511    emitGetCTIArg(8, X86::edx);
     
    35053514
    35063515    // Check argCount matches callee arity.
    3507     __ cmpl_rm(X86::edx, OBJECT_OFFSET(CodeBlock, numParameters), X86::eax);
    3508     X86Assembler::JmpSrc arityCheckOkay2 = __ emitUnlinkedJe();
     3516    __ cmpl_rm(X86::edx, FIELD_OFFSET(CodeBlock, numParameters), X86::eax);
     3517    JmpSrc arityCheckOkay2 = __ emitUnlinkedJe();
    35093518    __ popl_r(X86::ebx);
    35103519    emitPutCTIArg(X86::ebx, 4);
     
    35123521    __ emitRestoreArgumentReference();
    35133522    emitPutCTIParam(X86::edi, CTI_ARGS_callFrame);
    3514     X86Assembler::JmpSrc callArityCheck2 = __ emitCall();
     3523    JmpSrc callArityCheck2 = __ emitCall();
    35153524    __ movl_rr(X86::edx, X86::edi);
    35163525    emitGetCTIArg(0, X86::ecx);
     
    35253534    __ emitRestoreArgumentReference();
    35263535    emitPutCTIParam(X86::edi, CTI_ARGS_callFrame);
    3527     X86Assembler::JmpSrc callLazyLinkCall = __ emitCall();
     3536    JmpSrc callLazyLinkCall = __ emitCall();
    35283537    __ pushl_r(X86::ebx);
    35293538
    35303539    __ jmp_r(X86::eax);
    35313540
    3532     X86Assembler::JmpDst virtualCallBegin = __ align(16);
     3541    JmpDst virtualCallBegin = __ align(16);
    35333542
    35343543    // Load the callee CodeBlock* into eax
    3535     __ movl_mr(OBJECT_OFFSET(JSFunction, m_body), X86::ecx, X86::eax);
    3536     __ movl_mr(OBJECT_OFFSET(FunctionBodyNode, m_code), X86::eax, X86::eax);
     3544    __ movl_mr(FIELD_OFFSET(JSFunction, m_body), X86::ecx, X86::eax);
     3545    __ movl_mr(FIELD_OFFSET(FunctionBodyNode, m_code), X86::eax, X86::eax);
    35373546    __ testl_rr(X86::eax, X86::eax);
    3538     X86Assembler::JmpSrc hasCodeBlock3 = __ emitUnlinkedJne();
     3547    JmpSrc hasCodeBlock3 = __ emitUnlinkedJne();
    35393548    __ popl_r(X86::ebx);
    35403549    __ emitRestoreArgumentReference();
    35413550    emitPutCTIParam(X86::edi, CTI_ARGS_callFrame);
    3542     X86Assembler::JmpSrc callJSFunction3 = __ emitCall();
     3551    JmpSrc callJSFunction3 = __ emitCall();
    35433552    emitGetCTIArg(0, X86::ecx);
    35443553    emitGetCTIArg(8, X86::edx);
     
    35473556
    35483557    // Check argCount matches callee arity.
    3549     __ cmpl_rm(X86::edx, OBJECT_OFFSET(CodeBlock, numParameters), X86::eax);
    3550     X86Assembler::JmpSrc arityCheckOkay3 = __ emitUnlinkedJe();
     3558    __ cmpl_rm(X86::edx, FIELD_OFFSET(CodeBlock, numParameters), X86::eax);
     3559    JmpSrc arityCheckOkay3 = __ emitUnlinkedJe();
    35513560    __ popl_r(X86::ebx);
    35523561    emitPutCTIArg(X86::ebx, 4);
     
    35543563    __ emitRestoreArgumentReference();
    35553564    emitPutCTIParam(X86::edi, CTI_ARGS_callFrame);
    3556     X86Assembler::JmpSrc callArityCheck3 = __ emitCall();
     3565    JmpSrc callArityCheck3 = __ emitCall();
    35573566    __ movl_rr(X86::edx, X86::edi);
    35583567    emitGetCTIArg(0, X86::ecx);
     
    35643573
    35653574    // load ctiCode from the new codeBlock.
    3566     __ movl_mr(OBJECT_OFFSET(CodeBlock, ctiCode), X86::eax, X86::eax);
     3575    __ movl_mr(FIELD_OFFSET(CodeBlock, ctiCode), X86::eax, X86::eax);
    35673576
    35683577    __ jmp_r(X86::eax);
     
    35703579    // All trampolines constructed! copy the code, link up calls, and set the pointers on the Machine object.
    35713580
    3572     void* code = __ copy();
     3581    void* code = __ executableCopy();
    35733582    ASSERT(code);
    35743583
    3575     X86Assembler::link(code, array_failureCases1, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_get_by_id_fail));
    3576     X86Assembler::link(code, array_failureCases2, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_get_by_id_fail));
    3577     X86Assembler::link(code, array_failureCases3, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_get_by_id_fail));
    3578     X86Assembler::link(code, string_failureCases1, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_get_by_id_fail));
    3579     X86Assembler::link(code, string_failureCases2, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_get_by_id_fail));
    3580     X86Assembler::link(code, string_failureCases3, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_get_by_id_fail));
    3581     X86Assembler::link(code, callArityCheck1, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_call_arityCheck));
    3582     X86Assembler::link(code, callArityCheck2, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_call_arityCheck));
    3583     X86Assembler::link(code, callArityCheck3, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_call_arityCheck));
    3584     X86Assembler::link(code, callJSFunction1, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_call_JSFunction));
    3585     X86Assembler::link(code, callJSFunction2, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_call_JSFunction));
    3586     X86Assembler::link(code, callJSFunction3, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_call_JSFunction));
    3587     X86Assembler::link(code, callDontLazyLinkCall, reinterpret_cast<void*>(BytecodeInterpreter::cti_vm_dontLazyLinkCall));
    3588     X86Assembler::link(code, callLazyLinkCall, reinterpret_cast<void*>(BytecodeInterpreter::cti_vm_lazyLinkCall));
     3584    __ link(code, array_failureCases1, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_fail));
     3585    __ link(code, array_failureCases2, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_fail));
     3586    __ link(code, array_failureCases3, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_fail));
     3587    __ link(code, string_failureCases1, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_fail));
     3588    __ link(code, string_failureCases2, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_fail));
     3589    __ link(code, string_failureCases3, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_fail));
     3590    __ link(code, callArityCheck1, reinterpret_cast<void*>(Interpreter::cti_op_call_arityCheck));
     3591    __ link(code, callArityCheck2, reinterpret_cast<void*>(Interpreter::cti_op_call_arityCheck));
     3592    __ link(code, callArityCheck3, reinterpret_cast<void*>(Interpreter::cti_op_call_arityCheck));
     3593    __ link(code, callJSFunction1, reinterpret_cast<void*>(Interpreter::cti_op_call_JSFunction));
     3594    __ link(code, callJSFunction2, reinterpret_cast<void*>(Interpreter::cti_op_call_JSFunction));
     3595    __ link(code, callJSFunction3, reinterpret_cast<void*>(Interpreter::cti_op_call_JSFunction));
     3596    __ link(code, callDontLazyLinkCall, reinterpret_cast<void*>(Interpreter::cti_vm_dontLazyLinkCall));
     3597    __ link(code, callLazyLinkCall, reinterpret_cast<void*>(Interpreter::cti_vm_lazyLinkCall));
    35893598
    35903599    m_interpreter->m_ctiArrayLengthTrampoline = code;
    3591     m_interpreter->m_ctiStringLengthTrampoline = X86Assembler::getRelocatedAddress(code, stringLengthBegin);
    3592     m_interpreter->m_ctiVirtualCallPreLink = X86Assembler::getRelocatedAddress(code, virtualCallPreLinkBegin);
    3593     m_interpreter->m_ctiVirtualCallLink = X86Assembler::getRelocatedAddress(code, virtualCallLinkBegin);
    3594     m_interpreter->m_ctiVirtualCall = X86Assembler::getRelocatedAddress(code, virtualCallBegin);
    3595 }
    3596 
    3597 void CTI::freeCTIMachineTrampolines(BytecodeInterpreter* interpreter)
     3600    m_interpreter->m_ctiStringLengthTrampoline = __ getRelocatedAddress(code, stringLengthBegin);
     3601    m_interpreter->m_ctiVirtualCallPreLink = __ getRelocatedAddress(code, virtualCallPreLinkBegin);
     3602    m_interpreter->m_ctiVirtualCallLink = __ getRelocatedAddress(code, virtualCallLinkBegin);
     3603    m_interpreter->m_ctiVirtualCall = __ getRelocatedAddress(code, virtualCallBegin);
     3604}
     3605
     3606void CTI::freeCTIMachineTrampolines(Interpreter* interpreter)
    35983607{
    35993608    WTF::fastFreeExecutable(interpreter->m_ctiArrayLengthTrampoline);
     
    36053614
    36063615    // We don't want to repatch more than once - in future go to cti_op_get_by_id_generic.
    3607     // Should probably go to BytecodeInterpreter::cti_op_get_by_id_fail, but that doesn't do anything interesting right now.
    3608     ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_get_by_id_generic));
     3616    // Should probably go to Interpreter::cti_op_get_by_id_fail, but that doesn't do anything interesting right now.
     3617    ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_generic));
    36093618
    36103619    // Repatch the offset into the propoerty map to load from, then repatch the Structure to look for.
     
    36183627   
    36193628    // We don't want to repatch more than once - in future go to cti_op_put_by_id_generic.
    3620     // Should probably go to BytecodeInterpreter::cti_op_put_by_id_fail, but that doesn't do anything interesting right now.
    3621     ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_put_by_id_generic));
     3629    // Should probably go to Interpreter::cti_op_put_by_id_fail, but that doesn't do anything interesting right now.
     3630    ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(Interpreter::cti_op_put_by_id_generic));
    36223631
    36233632    // Repatch the offset into the propoerty map to load from, then repatch the Structure to look for.
     
    36313640
    36323641    // We don't want to repatch more than once - in future go to cti_op_put_by_id_generic.
    3633     ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(BytecodeInterpreter::cti_op_get_by_id_fail));
     3642    ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(Interpreter::cti_op_get_by_id_fail));
    36343643
    36353644    // Check eax is an array
    36363645    __ testl_i32r(JSImmediate::TagMask, X86::eax);
    3637     X86Assembler::JmpSrc failureCases1 = __ emitUnlinkedJne();
     3646    JmpSrc failureCases1 = __ emitUnlinkedJne();
    36383647    __ cmpl_i32m(reinterpret_cast<unsigned>(m_interpreter->m_jsArrayVptr), X86::eax);
    3639     X86Assembler::JmpSrc failureCases2 = __ emitUnlinkedJne();
     3648    JmpSrc failureCases2 = __ emitUnlinkedJne();
    36403649
    36413650    // Checks out okay! - get the length from the storage
    3642     __ movl_mr(OBJECT_OFFSET(JSArray, m_storage), X86::eax, X86::ecx);
    3643     __ movl_mr(OBJECT_OFFSET(ArrayStorage, m_length), X86::ecx, X86::ecx);
     3651    __ movl_mr(FIELD_OFFSET(JSArray, m_storage), X86::eax, X86::ecx);
     3652    __ movl_mr(FIELD_OFFSET(ArrayStorage, m_length), X86::ecx, X86::ecx);
    36443653
    36453654    __ cmpl_i32r(JSImmediate::maxImmediateInt, X86::ecx);
    3646     X86Assembler::JmpSrc failureCases3 = __ emitUnlinkedJa();
     3655    JmpSrc failureCases3 = __ emitUnlinkedJa();
    36473656
    36483657    __ addl_rr(X86::ecx, X86::ecx);
    36493658    __ addl_i8r(1, X86::ecx);
    36503659    __ movl_rr(X86::ecx, X86::eax);
    3651     X86Assembler::JmpSrc success = __ emitUnlinkedJmp();
    3652 
    3653     void* code = __ copy();
     3660    JmpSrc success = __ emitUnlinkedJmp();
     3661
     3662    void* code = __ executableCopy();
    36543663    ASSERT(code);
    36553664
    36563665    // Use the repatch information to link the failure cases back to the original slow case routine.
    36573666    void* slowCaseBegin = reinterpret_cast<char*>(info.callReturnLocation) - repatchOffsetGetByIdSlowCaseCall;
    3658     X86Assembler::link(code, failureCases1, slowCaseBegin);
    3659     X86Assembler::link(code, failureCases2, slowCaseBegin);
    3660     X86Assembler::link(code, failureCases3, slowCaseBegin);
     3667    __ link(code, failureCases1, slowCaseBegin);
     3668    __ link(code, failureCases2, slowCaseBegin);
     3669    __ link(code, failureCases3, slowCaseBegin);
    36613670
    36623671    // On success return back to the hot patch code, at a point it will perform the store to dest for us.
    36633672    intptr_t successDest = (intptr_t)(info.hotPathBegin) + repatchOffsetGetByIdPropertyMapOffset;
    3664     X86Assembler::link(code, success, reinterpret_cast<void*>(successDest));
     3673    __ link(code, success, reinterpret_cast<void*>(successDest));
    36653674
    36663675    // Track the stub we have created so that it will be deleted later.
     
    36703679    // FIXME: should revert this repatching, on failure.
    36713680    intptr_t jmpLocation = reinterpret_cast<intptr_t>(info.hotPathBegin) + repatchOffsetGetByIdBranchToSlowCase;
    3672     X86Assembler::repatchBranchOffset(jmpLocation, code);
    3673 }
    3674 
    3675 void CTI::emitGetVariableObjectRegister(X86Assembler::RegisterID variableObject, int index, X86Assembler::RegisterID dst)
    3676 {
    3677     __ movl_mr(JSVariableObject::offsetOf_d(), variableObject, dst);
    3678     __ movl_mr(JSVariableObject::offsetOf_Data_registers(), dst, dst);
     3681    __ repatchBranchOffset(jmpLocation, code);
     3682}
     3683
     3684void CTI::emitGetVariableObjectRegister(RegisterID variableObject, int index, RegisterID dst)
     3685{
     3686    __ movl_mr(FIELD_OFFSET(JSVariableObject, d), variableObject, dst);
     3687    __ movl_mr(FIELD_OFFSET(JSVariableObject::JSVariableObjectData, registers), dst, dst);
    36793688    __ movl_mr(index * sizeof(Register), dst, dst);
    36803689}
    36813690
    3682 void CTI::emitPutVariableObjectRegister(X86Assembler::RegisterID src, X86Assembler::RegisterID variableObject, int index)
    3683 {
    3684     __ movl_mr(JSVariableObject::offsetOf_d(), variableObject, variableObject);
    3685     __ movl_mr(JSVariableObject::offsetOf_Data_registers(), variableObject, variableObject);
     3691void CTI::emitPutVariableObjectRegister(RegisterID src, RegisterID variableObject, int index)
     3692{
     3693    __ movl_mr(FIELD_OFFSET(JSVariableObject, d), variableObject, src);
     3694    __ movl_mr(FIELD_OFFSET(JSVariableObject::JSVariableObjectData, registers), src, src);
    36863695    __ movl_rm(src, index * sizeof(Register), variableObject);
    36873696}
  • trunk/JavaScriptCore/VM/CTI.h

    r38440 r38461  
    9797    class CodeBlock;
    9898    class JSPropertyNameIterator;
    99     class BytecodeInterpreter;
     99    class Interpreter;
    100100    class Register;
    101101    class RegisterFile;
     
    118118
    119119    struct CallRecord {
    120         X86Assembler::JmpSrc from;
     120        typedef X86Assembler::JmpSrc JmpSrc;
     121
     122        JmpSrc from;
    121123        void* to;
    122124        unsigned bytecodeIndex;
     
    126128        }
    127129
    128         CallRecord(X86Assembler::JmpSrc f, CTIHelper_j t, unsigned i)
    129             : from(f)
    130             , to(reinterpret_cast<void*>(t))
    131             , bytecodeIndex(i)
    132         {
    133         }
    134 
    135         CallRecord(X86Assembler::JmpSrc f, CTIHelper_o t, unsigned i)
    136             : from(f)
    137             , to(reinterpret_cast<void*>(t))
    138             , bytecodeIndex(i)
    139         {
    140         }
    141 
    142         CallRecord(X86Assembler::JmpSrc f, CTIHelper_p t, unsigned i)
    143             : from(f)
    144             , to(reinterpret_cast<void*>(t))
    145             , bytecodeIndex(i)
    146         {
    147         }
    148        
    149         CallRecord(X86Assembler::JmpSrc f, CTIHelper_v t, unsigned i)
    150             : from(f)
    151             , to(reinterpret_cast<void*>(t))
    152             , bytecodeIndex(i)
    153         {
    154         }
    155        
    156         CallRecord(X86Assembler::JmpSrc f, CTIHelper_s t, unsigned i)
    157             : from(f)
    158             , to(reinterpret_cast<void*>(t))
    159             , bytecodeIndex(i)
    160         {
    161         }
    162        
    163         CallRecord(X86Assembler::JmpSrc f, CTIHelper_b t, unsigned i)
    164             : from(f)
    165             , to(reinterpret_cast<void*>(t))
    166             , bytecodeIndex(i)
    167         {
    168         }
    169 
    170         CallRecord(X86Assembler::JmpSrc f, CTIHelper_2 t, unsigned i)
    171             : from(f)
    172             , to(reinterpret_cast<void*>(t))
    173             , bytecodeIndex(i)
    174         {
    175         }
    176 
    177         CallRecord(X86Assembler::JmpSrc f, unsigned i)
     130        CallRecord(JmpSrc f, CTIHelper_j t, unsigned i)
     131            : from(f)
     132            , to(reinterpret_cast<void*>(t))
     133            , bytecodeIndex(i)
     134        {
     135        }
     136
     137        CallRecord(JmpSrc f, CTIHelper_o t, unsigned i)
     138            : from(f)
     139            , to(reinterpret_cast<void*>(t))
     140            , bytecodeIndex(i)
     141        {
     142        }
     143
     144        CallRecord(JmpSrc f, CTIHelper_p t, unsigned i)
     145            : from(f)
     146            , to(reinterpret_cast<void*>(t))
     147            , bytecodeIndex(i)
     148        {
     149        }
     150       
     151        CallRecord(JmpSrc f, CTIHelper_v t, unsigned i)
     152            : from(f)
     153            , to(reinterpret_cast<void*>(t))
     154            , bytecodeIndex(i)
     155        {
     156        }
     157       
     158        CallRecord(JmpSrc f, CTIHelper_s t, unsigned i)
     159            : from(f)
     160            , to(reinterpret_cast<void*>(t))
     161            , bytecodeIndex(i)
     162        {
     163        }
     164       
     165        CallRecord(JmpSrc f, CTIHelper_b t, unsigned i)
     166            : from(f)
     167            , to(reinterpret_cast<void*>(t))
     168            , bytecodeIndex(i)
     169        {
     170        }
     171
     172        CallRecord(JmpSrc f, CTIHelper_2 t, unsigned i)
     173            : from(f)
     174            , to(reinterpret_cast<void*>(t))
     175            , bytecodeIndex(i)
     176        {
     177        }
     178
     179        CallRecord(JmpSrc f, unsigned i)
    178180            : from(f)
    179181            , to(0)
     
    184186
    185187    struct JmpTable {
    186         X86Assembler::JmpSrc from;
     188        typedef X86Assembler::JmpSrc JmpSrc;
     189
     190        JmpSrc from;
    187191        unsigned to;
    188192       
    189         JmpTable(X86Assembler::JmpSrc f, unsigned t)
     193        JmpTable(JmpSrc f, unsigned t)
    190194            : from(f)
    191195            , to(t)
     
    195199
    196200    struct SlowCaseEntry {
    197         X86Assembler::JmpSrc from;
     201        typedef X86Assembler::JmpSrc JmpSrc;
     202
     203        JmpSrc from;
    198204        unsigned to;
    199205        unsigned hint;
    200206       
    201         SlowCaseEntry(X86Assembler::JmpSrc f, unsigned t, unsigned h = 0)
     207        SlowCaseEntry(JmpSrc f, unsigned t, unsigned h = 0)
    202208            : from(f)
    203209            , to(t)
     
    242248
    243249    struct StructureStubCompilationInfo {
    244         X86Assembler::JmpSrc callReturnLocation;
    245         X86Assembler::JmpDst hotPathBegin;
    246         X86Assembler::JmpSrc hotPathOther;
    247         X86Assembler::JmpDst coldPathOther;
     250        typedef X86Assembler::JmpSrc JmpSrc;
     251        typedef X86Assembler::JmpDst JmpDst;
     252
     253        JmpSrc callReturnLocation;
     254        JmpDst hotPathBegin;
     255        JmpSrc hotPathOther;
     256        JmpDst coldPathOther;
    248257    };
    249258
     
    257266
    258267    class CTI {
     268        typedef X86Assembler::JmpSrc JmpSrc;
     269        typedef X86Assembler::JmpDst JmpDst;
     270        typedef X86Assembler::RegisterID RegisterID;
     271        typedef X86Assembler::XMMRegisterID XMMRegisterID;
     272
    259273        static const int repatchGetByIdDefaultStructure = -1;
    260274        // Magic number - initial offset cannot be representable as a signed 8bit value, or the X86Assembler
     
    325339            cti.privateCompileCTIMachineTrampolines();
    326340        }
    327         static void freeCTIMachineTrampolines(BytecodeInterpreter*);
     341        static void freeCTIMachineTrampolines(Interpreter*);
    328342
    329343        static void patchGetByIdSelf(CodeBlock* codeBlock, Structure* structure, size_t cachedOffset, void* returnAddress);
     
    367381        enum CompileOpStrictEqType { OpStrictEq, OpNStrictEq };
    368382        void compileOpStrictEq(Instruction* instruction, unsigned i, CompileOpStrictEqType type);
    369         void putDoubleResultToJSNumberCellOrJSImmediate(X86::XMMRegisterID xmmSource, X86::RegisterID jsNumberCell, unsigned dst, X86Assembler::JmpSrc* wroteJSNumberCell,  X86::XMMRegisterID tempXmm, X86::RegisterID tempReg1, X86::RegisterID tempReg2);
     383        void putDoubleResultToJSNumberCellOrJSImmediate(XMMRegisterID xmmSource, RegisterID jsNumberCell, unsigned dst, JmpSrc* wroteJSNumberCell,  XMMRegisterID tempXmm, RegisterID tempReg1, RegisterID tempReg2);
    370384        void compileBinaryArithOp(OpcodeID, unsigned dst, unsigned src1, unsigned src2, OperandTypes opi, unsigned i);
    371385        void compileBinaryArithOpSlowCase(Instruction*, OpcodeID, Vector<SlowCaseEntry>::iterator& iter, unsigned dst, unsigned src1, unsigned src2, OperandTypes opi, unsigned i);
    372386
    373         void emitGetVirtualRegister(int src, X86Assembler::RegisterID dst, unsigned i);
    374         void emitGetVirtualRegisters(int src1, X86Assembler::RegisterID dst1, int src2, X86Assembler::RegisterID dst2, unsigned i);
    375         void emitPutVirtualRegister(unsigned dst, X86Assembler::RegisterID from = X86::eax);
    376 
    377         void emitPutCTIArg(X86Assembler::RegisterID src, unsigned offset);
    378         void emitPutCTIArgFromVirtualRegister(unsigned src, unsigned offset, X86Assembler::RegisterID scratch);
     387        void emitGetVirtualRegister(int src, RegisterID dst, unsigned i);
     388        void emitGetVirtualRegisters(int src1, RegisterID dst1, int src2, RegisterID dst2, unsigned i);
     389        void emitPutVirtualRegister(unsigned dst, RegisterID from = X86::eax);
     390
     391        void emitPutCTIArg(RegisterID src, unsigned offset);
     392        void emitPutCTIArgFromVirtualRegister(unsigned src, unsigned offset, RegisterID scratch);
    379393        void emitPutCTIArgConstant(unsigned value, unsigned offset);
    380         void emitGetCTIArg(unsigned offset, X86Assembler::RegisterID dst);
     394        void emitGetCTIArg(unsigned offset, RegisterID dst);
    381395
    382396        void emitInitRegister(unsigned dst);
    383397
    384398        void emitPutCTIParam(void* value, unsigned name);
    385         void emitPutCTIParam(X86Assembler::RegisterID from, unsigned name);
    386         void emitGetCTIParam(unsigned name, X86Assembler::RegisterID to);
    387 
    388         void emitPutToCallFrameHeader(X86Assembler::RegisterID from, RegisterFile::CallFrameHeaderEntry entry);
    389         void emitGetFromCallFrameHeader(RegisterFile::CallFrameHeaderEntry entry, X86Assembler::RegisterID to);
     399        void emitPutCTIParam(RegisterID from, unsigned name);
     400        void emitGetCTIParam(unsigned name, RegisterID to);
     401
     402        void emitPutToCallFrameHeader(RegisterID from, RegisterFile::CallFrameHeaderEntry entry);
     403        void emitGetFromCallFrameHeader(RegisterFile::CallFrameHeaderEntry entry, RegisterID to);
    390404
    391405        JSValue* getConstantImmediateNumericArg(unsigned src);
     
    393407
    394408        bool linkSlowCaseIfNotJSCell(const Vector<SlowCaseEntry>::iterator&, int vReg);
    395         void emitJumpSlowCaseIfNotJSCell(X86Assembler::RegisterID, unsigned bytecodeIndex);
    396         void emitJumpSlowCaseIfNotJSCell(X86Assembler::RegisterID, unsigned bytecodeIndex, int VReg);
    397 
    398         void emitJumpSlowCaseIfNotImmNum(X86Assembler::RegisterID, unsigned bytecodeIndex);
    399         void emitJumpSlowCaseIfNotImmNums(X86Assembler::RegisterID, X86Assembler::RegisterID, unsigned bytecodeIndex);
    400 
    401         void emitFastArithDeTagImmediate(X86Assembler::RegisterID);
    402         X86Assembler::JmpSrc emitFastArithDeTagImmediateJumpIfZero(X86Assembler::RegisterID);
    403         void emitFastArithReTagImmediate(X86Assembler::RegisterID);
    404         void emitFastArithPotentiallyReTagImmediate(X86Assembler::RegisterID);
    405         void emitFastArithImmToInt(X86Assembler::RegisterID);
    406         void emitFastArithIntToImmOrSlowCase(X86Assembler::RegisterID, unsigned bytecodeIndex);
    407         void emitFastArithIntToImmNoCheck(X86Assembler::RegisterID);
    408         X86Assembler::JmpSrc emitArithIntToImmWithJump(X86Assembler::RegisterID reg);
    409 
    410         void emitTagAsBoolImmediate(X86Assembler::RegisterID reg);
     409        void emitJumpSlowCaseIfNotJSCell(RegisterID, unsigned bytecodeIndex);
     410        void emitJumpSlowCaseIfNotJSCell(RegisterID, unsigned bytecodeIndex, int VReg);
     411
     412        void emitJumpSlowCaseIfNotImmNum(RegisterID, unsigned bytecodeIndex);
     413        void emitJumpSlowCaseIfNotImmNums(RegisterID, RegisterID, unsigned bytecodeIndex);
     414
     415        void emitFastArithDeTagImmediate(RegisterID);
     416        JmpSrc emitFastArithDeTagImmediateJumpIfZero(RegisterID);
     417        void emitFastArithReTagImmediate(RegisterID);
     418        void emitFastArithPotentiallyReTagImmediate(RegisterID);
     419        void emitFastArithImmToInt(RegisterID);
     420        void emitFastArithIntToImmOrSlowCase(RegisterID, unsigned bytecodeIndex);
     421        void emitFastArithIntToImmNoCheck(RegisterID);
     422        JmpSrc emitArithIntToImmWithJump(RegisterID reg);
     423
     424        void emitTagAsBoolImmediate(RegisterID reg);
    411425
    412426        void emitAllocateNumber(JSGlobalData*, unsigned);
    413427
    414         X86Assembler::JmpSrc emitNakedCall(unsigned bytecodeIndex, X86::RegisterID);
    415         X86Assembler::JmpSrc emitNakedCall(unsigned bytecodeIndex, void* function);
    416         X86Assembler::JmpSrc emitNakedFastCall(unsigned bytecodeIndex, void*);
    417         X86Assembler::JmpSrc emitCTICall(Instruction*, unsigned bytecodeIndex, CTIHelper_j);
    418         X86Assembler::JmpSrc emitCTICall(Instruction*, unsigned bytecodeIndex, CTIHelper_o);
    419         X86Assembler::JmpSrc emitCTICall(Instruction*, unsigned bytecodeIndex, CTIHelper_p);
    420         X86Assembler::JmpSrc emitCTICall(Instruction*, unsigned bytecodeIndex, CTIHelper_v);
    421         X86Assembler::JmpSrc emitCTICall(Instruction*, unsigned bytecodeIndex, CTIHelper_s);
    422         X86Assembler::JmpSrc emitCTICall(Instruction*, unsigned bytecodeIndex, CTIHelper_b);
    423         X86Assembler::JmpSrc emitCTICall(Instruction*, unsigned bytecodeIndex, CTIHelper_2);
    424 
    425         void emitGetVariableObjectRegister(X86Assembler::RegisterID variableObject, int index, X86Assembler::RegisterID dst);
    426         void emitPutVariableObjectRegister(X86Assembler::RegisterID src, X86Assembler::RegisterID variableObject, int index);
     428        JmpSrc emitNakedCall(unsigned bytecodeIndex, X86::RegisterID);
     429        JmpSrc emitNakedCall(unsigned bytecodeIndex, void* function);
     430        JmpSrc emitNakedFastCall(unsigned bytecodeIndex, void*);
     431        JmpSrc emitCTICall(Instruction*, unsigned bytecodeIndex, CTIHelper_j);
     432        JmpSrc emitCTICall(Instruction*, unsigned bytecodeIndex, CTIHelper_o);
     433        JmpSrc emitCTICall(Instruction*, unsigned bytecodeIndex, CTIHelper_p);
     434        JmpSrc emitCTICall(Instruction*, unsigned bytecodeIndex, CTIHelper_v);
     435        JmpSrc emitCTICall(Instruction*, unsigned bytecodeIndex, CTIHelper_s);
     436        JmpSrc emitCTICall(Instruction*, unsigned bytecodeIndex, CTIHelper_b);
     437        JmpSrc emitCTICall(Instruction*, unsigned bytecodeIndex, CTIHelper_2);
     438
     439        void emitGetVariableObjectRegister(RegisterID variableObject, int index, RegisterID dst);
     440        void emitPutVariableObjectRegister(RegisterID src, RegisterID variableObject, int index);
    427441       
    428442        void emitSlowScriptCheck(Instruction*, unsigned bytecodeIndex);
     
    434448
    435449        X86Assembler m_assembler;
    436         BytecodeInterpreter* m_interpreter;
     450        Interpreter* m_interpreter;
    437451        JSGlobalData* m_globalData;
    438452        CodeBlock* m_codeBlock;
    439453
    440454        Vector<CallRecord> m_calls;
    441         Vector<X86Assembler::JmpDst> m_labels;
     455        Vector<JmpDst> m_labels;
    442456        Vector<StructureStubCompilationInfo> m_propertyAccessCompilationInfo;
    443457        Vector<StructureStubCompilationInfo> m_callStructureStubCompilationInfo;
     
    445459
    446460        struct JSRInfo {
    447             X86Assembler::JmpDst addrPosition;
    448             X86Assembler::JmpDst target;
    449 
    450             JSRInfo(const X86Assembler::JmpDst& storeLocation, const X86Assembler::JmpDst& targetLocation)
     461            JmpDst addrPosition;
     462            JmpDst target;
     463
     464            JSRInfo(const JmpDst& storeLocation, const JmpDst& targetLocation)
    451465                : addrPosition(storeLocation)
    452466                , target(targetLocation)
  • trunk/JavaScriptCore/VM/CodeBlock.cpp

    r38440 r38461  
    182182void CodeBlock::printStructures(const Instruction* vPC) const
    183183{
    184     BytecodeInterpreter* interpreter = globalData->interpreter;
     184    Interpreter* interpreter = globalData->interpreter;
    185185    unsigned instructionOffset = vPC - instructions.begin();
    186186
     
    989989void CodeBlock::derefStructures(Instruction* vPC) const
    990990{
    991     BytecodeInterpreter* interpreter = globalData->interpreter;
     991    Interpreter* interpreter = globalData->interpreter;
    992992
    993993    if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self)) {
     
    10271027void CodeBlock::refStructures(Instruction* vPC) const
    10281028{
    1029     BytecodeInterpreter* interpreter = globalData->interpreter;
     1029    Interpreter* interpreter = globalData->interpreter;
    10301030
    10311031    if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self)) {
  • trunk/JavaScriptCore/VM/Machine.cpp

    r38440 r38461  
    178178        return n1 < n2;
    179179
    180     BytecodeInterpreter* interpreter = callFrame->interpreter();
     180    Interpreter* interpreter = callFrame->interpreter();
    181181    if (interpreter->isJSString(v1) && interpreter->isJSString(v2))
    182182        return asString(v1)->value() < asString(v2)->value();
     
    203203        return n1 <= n2;
    204204
    205     BytecodeInterpreter* interpreter = callFrame->interpreter();
     205    Interpreter* interpreter = callFrame->interpreter();
    206206    if (interpreter->isJSString(v1) && interpreter->isJSString(v2))
    207207        return !(asString(v2)->value() < asString(v1)->value());
     
    324324}
    325325
    326 NEVER_INLINE bool BytecodeInterpreter::resolve(CallFrame* callFrame, Instruction* vPC, JSValue*& exceptionValue)
     326NEVER_INLINE bool Interpreter::resolve(CallFrame* callFrame, Instruction* vPC, JSValue*& exceptionValue)
    327327{
    328328    int dst = (vPC + 1)->u.operand;
     
    352352}
    353353
    354 NEVER_INLINE bool BytecodeInterpreter::resolveSkip(CallFrame* callFrame, Instruction* vPC, JSValue*& exceptionValue)
     354NEVER_INLINE bool Interpreter::resolveSkip(CallFrame* callFrame, Instruction* vPC, JSValue*& exceptionValue)
    355355{
    356356    CodeBlock* codeBlock = callFrame->codeBlock();
     
    385385}
    386386
    387 NEVER_INLINE bool BytecodeInterpreter::resolveGlobal(CallFrame* callFrame, Instruction* vPC, JSValue*& exceptionValue)
     387NEVER_INLINE bool Interpreter::resolveGlobal(CallFrame* callFrame, Instruction* vPC, JSValue*& exceptionValue)
    388388{
    389389    int dst = (vPC + 1)->u.operand;
     
    448448}
    449449
    450 NEVER_INLINE void BytecodeInterpreter::resolveBase(CallFrame* callFrame, Instruction* vPC)
     450NEVER_INLINE void Interpreter::resolveBase(CallFrame* callFrame, Instruction* vPC)
    451451{
    452452    int dst = (vPC + 1)->u.operand;
     
    455455}
    456456
    457 NEVER_INLINE bool BytecodeInterpreter::resolveBaseAndProperty(CallFrame* callFrame, Instruction* vPC, JSValue*& exceptionValue)
     457NEVER_INLINE bool Interpreter::resolveBaseAndProperty(CallFrame* callFrame, Instruction* vPC, JSValue*& exceptionValue)
    458458{
    459459    int baseDst = (vPC + 1)->u.operand;
     
    491491}
    492492
    493 NEVER_INLINE bool BytecodeInterpreter::resolveBaseAndFunc(CallFrame* callFrame, Instruction* vPC, JSValue*& exceptionValue)
     493NEVER_INLINE bool Interpreter::resolveBaseAndFunc(CallFrame* callFrame, Instruction* vPC, JSValue*& exceptionValue)
    494494{
    495495    int baseDst = (vPC + 1)->u.operand;
     
    536536}
    537537
    538 ALWAYS_INLINE CallFrame* BytecodeInterpreter::slideRegisterWindowForCall(CodeBlock* newCodeBlock, RegisterFile* registerFile, CallFrame* callFrame, size_t registerOffset, int argc)
     538ALWAYS_INLINE CallFrame* Interpreter::slideRegisterWindowForCall(CodeBlock* newCodeBlock, RegisterFile* registerFile, CallFrame* callFrame, size_t registerOffset, int argc)
    539539{
    540540    Register* r = callFrame->registers();
     
    581581}
    582582
    583 NEVER_INLINE JSValue* BytecodeInterpreter::callEval(CallFrame* callFrame, RegisterFile* registerFile, Register* argv, int argc, int registerOffset, JSValue*& exceptionValue)
     583NEVER_INLINE JSValue* Interpreter::callEval(CallFrame* callFrame, RegisterFile* registerFile, Register* argv, int argc, int registerOffset, JSValue*& exceptionValue)
    584584{
    585585    if (argc < 2)
     
    604604}
    605605
    606 BytecodeInterpreter::BytecodeInterpreter()
     606Interpreter::Interpreter()
    607607    : m_sampler(0)
    608608#if ENABLE(CTI)
     
    642642}
    643643
    644 void BytecodeInterpreter::initialize(JSGlobalData* globalData)
     644void Interpreter::initialize(JSGlobalData* globalData)
    645645{
    646646#if ENABLE(CTI)
     
    651651}
    652652
    653 BytecodeInterpreter::~BytecodeInterpreter()
     653Interpreter::~Interpreter()
    654654{
    655655#if ENABLE(CTI)
     
    660660#ifndef NDEBUG
    661661
    662 void BytecodeInterpreter::dumpCallFrame(CallFrame* callFrame)
     662void Interpreter::dumpCallFrame(CallFrame* callFrame)
    663663{
    664664    callFrame->codeBlock()->dump(callFrame);
     
    666666}
    667667
    668 void BytecodeInterpreter::dumpRegisters(CallFrame* callFrame)
     668void Interpreter::dumpRegisters(CallFrame* callFrame)
    669669{
    670670    printf("Register frame: \n\n");
     
    744744#endif
    745745
    746 bool BytecodeInterpreter::isOpcode(Opcode opcode)
     746bool Interpreter::isOpcode(Opcode opcode)
    747747{
    748748#if HAVE(COMPUTED_GOTO)
     
    755755}
    756756
    757 NEVER_INLINE bool BytecodeInterpreter::unwindCallFrame(CallFrame*& callFrame, JSValue* exceptionValue, const Instruction*& vPC, CodeBlock*& codeBlock)
     757NEVER_INLINE bool Interpreter::unwindCallFrame(CallFrame*& callFrame, JSValue* exceptionValue, const Instruction*& vPC, CodeBlock*& codeBlock)
    758758{
    759759    CodeBlock* oldCodeBlock = codeBlock;
     
    798798}
    799799
    800 NEVER_INLINE Instruction* BytecodeInterpreter::throwException(CallFrame*& callFrame, JSValue*& exceptionValue, const Instruction* vPC, bool explicitThrow)
     800NEVER_INLINE Instruction* Interpreter::throwException(CallFrame*& callFrame, JSValue*& exceptionValue, const Instruction* vPC, bool explicitThrow)
    801801{
    802802    // Set up the exception object
     
    897897};
    898898
    899 JSValue* BytecodeInterpreter::execute(ProgramNode* programNode, CallFrame* callFrame, ScopeChainNode* scopeChain, JSObject* thisObj, JSValue** exception)
     899JSValue* Interpreter::execute(ProgramNode* programNode, CallFrame* callFrame, ScopeChainNode* scopeChain, JSObject* thisObj, JSValue** exception)
    900900{
    901901    ASSERT(!scopeChain->globalData->exception);
     
    958958}
    959959
    960 JSValue* BytecodeInterpreter::execute(FunctionBodyNode* functionBodyNode, CallFrame* callFrame, JSFunction* function, JSObject* thisObj, const ArgList& args, ScopeChainNode* scopeChain, JSValue** exception)
     960JSValue* Interpreter::execute(FunctionBodyNode* functionBodyNode, CallFrame* callFrame, JSFunction* function, JSObject* thisObj, const ArgList& args, ScopeChainNode* scopeChain, JSValue** exception)
    961961{
    962962    ASSERT(!scopeChain->globalData->exception);
     
    10201020}
    10211021
    1022 JSValue* BytecodeInterpreter::execute(EvalNode* evalNode, CallFrame* callFrame, JSObject* thisObj, ScopeChainNode* scopeChain, JSValue** exception)
     1022JSValue* Interpreter::execute(EvalNode* evalNode, CallFrame* callFrame, JSObject* thisObj, ScopeChainNode* scopeChain, JSValue** exception)
    10231023{
    10241024    return execute(evalNode, callFrame, thisObj, m_registerFile.size() + evalNode->bytecode(scopeChain).numParameters + RegisterFile::CallFrameHeaderSize, scopeChain, exception);
    10251025}
    10261026
    1027 JSValue* BytecodeInterpreter::execute(EvalNode* evalNode, CallFrame* callFrame, JSObject* thisObj, int globalRegisterOffset, ScopeChainNode* scopeChain, JSValue** exception)
     1027JSValue* Interpreter::execute(EvalNode* evalNode, CallFrame* callFrame, JSObject* thisObj, int globalRegisterOffset, ScopeChainNode* scopeChain, JSValue** exception)
    10281028{
    10291029    ASSERT(!scopeChain->globalData->exception);
     
    11121112}
    11131113
    1114 NEVER_INLINE void BytecodeInterpreter::debug(CallFrame* callFrame, DebugHookID debugHookID, int firstLine, int lastLine)
     1114NEVER_INLINE void Interpreter::debug(CallFrame* callFrame, DebugHookID debugHookID, int firstLine, int lastLine)
    11151115{
    11161116    Debugger* debugger = callFrame->dynamicGlobalObject()->debugger();
     
    11401140}
    11411141
    1142 void BytecodeInterpreter::resetTimeoutCheck()
     1142void Interpreter::resetTimeoutCheck()
    11431143{
    11441144    m_ticksUntilNextTimeoutCheck = initialTickCountThreshold;
     
    11891189// We have to return a JSValue here, gcc seems to produce worse code if
    11901190// we attempt to return a bool
    1191 ALWAYS_INLINE JSValue* BytecodeInterpreter::checkTimeout(JSGlobalObject* globalObject)
     1191ALWAYS_INLINE JSValue* Interpreter::checkTimeout(JSGlobalObject* globalObject)
    11921192{
    11931193    unsigned currentTime = getCPUTime();
     
    12251225}
    12261226
    1227 NEVER_INLINE ScopeChainNode* BytecodeInterpreter::createExceptionScope(CallFrame* callFrame, const Instruction* vPC)
     1227NEVER_INLINE ScopeChainNode* Interpreter::createExceptionScope(CallFrame* callFrame, const Instruction* vPC)
    12281228{
    12291229    int dst = (++vPC)->u.operand;
     
    12471247}
    12481248
    1249 NEVER_INLINE void BytecodeInterpreter::tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, Instruction* vPC, JSValue* baseValue, const PutPropertySlot& slot)
     1249NEVER_INLINE void Interpreter::tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, Instruction* vPC, JSValue* baseValue, const PutPropertySlot& slot)
    12501250{
    12511251    // Recursive invocation may already have specialized this instruction.
     
    13171317}
    13181318
    1319 NEVER_INLINE void BytecodeInterpreter::uncachePutByID(CodeBlock* codeBlock, Instruction* vPC)
     1319NEVER_INLINE void Interpreter::uncachePutByID(CodeBlock* codeBlock, Instruction* vPC)
    13201320{
    13211321    codeBlock->derefStructures(vPC);
     
    13241324}
    13251325
    1326 NEVER_INLINE void BytecodeInterpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, Instruction* vPC, JSValue* baseValue, const Identifier& propertyName, const PropertySlot& slot)
     1326NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, Instruction* vPC, JSValue* baseValue, const Identifier& propertyName, const PropertySlot& slot)
    13271327{
    13281328    // Recursive invocation may already have specialized this instruction.
     
    14421442}
    14431443
    1444 NEVER_INLINE void BytecodeInterpreter::uncacheGetByID(CodeBlock* codeBlock, Instruction* vPC)
     1444NEVER_INLINE void Interpreter::uncacheGetByID(CodeBlock* codeBlock, Instruction* vPC)
    14451445{
    14461446    codeBlock->derefStructures(vPC);
     
    14491449}
    14501450
    1451 JSValue* BytecodeInterpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFile, CallFrame* callFrame, JSValue** exception)
     1451JSValue* Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFile, CallFrame* callFrame, JSValue** exception)
    14521452{
    14531453    // One-time initialization of our address tables. We have to put this code
     
    39863986}
    39873987
    3988 JSValue* BytecodeInterpreter::retrieveArguments(CallFrame* callFrame, JSFunction* function) const
     3988JSValue* Interpreter::retrieveArguments(CallFrame* callFrame, JSFunction* function) const
    39893989{
    39903990    CallFrame* functionCallFrame = findFunctionCallFrame(callFrame, function);
     
    40104010}
    40114011
    4012 JSValue* BytecodeInterpreter::retrieveCaller(CallFrame* callFrame, InternalFunction* function) const
     4012JSValue* Interpreter::retrieveCaller(CallFrame* callFrame, InternalFunction* function) const
    40134013{
    40144014    CallFrame* functionCallFrame = findFunctionCallFrame(callFrame, function);
     
    40274027}
    40284028
    4029 void BytecodeInterpreter::retrieveLastCaller(CallFrame* callFrame, int& lineNumber, intptr_t& sourceID, UString& sourceURL, JSValue*& function) const
     4029void Interpreter::retrieveLastCaller(CallFrame* callFrame, int& lineNumber, intptr_t& sourceID, UString& sourceURL, JSValue*& function) const
    40304030{
    40314031    function = noValue();
     
    40484048}
    40494049
    4050 CallFrame* BytecodeInterpreter::findFunctionCallFrame(CallFrame* callFrame, InternalFunction* function)
     4050CallFrame* Interpreter::findFunctionCallFrame(CallFrame* callFrame, InternalFunction* function)
    40514051{
    40524052    for (CallFrame* candidate = callFrame; candidate; candidate = candidate->callerFrame()->removeHostCallFrameFlag()) {
     
    40594059#if ENABLE(CTI)
    40604060
    4061 NEVER_INLINE void BytecodeInterpreter::tryCTICachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, void* returnAddress, JSValue* baseValue, const PutPropertySlot& slot)
     4061NEVER_INLINE void Interpreter::tryCTICachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, void* returnAddress, JSValue* baseValue, const PutPropertySlot& slot)
    40624062{
    40634063    // The interpreter checks for recursion here; I do not believe this can occur in CTI.
     
    41284128}
    41294129
    4130 NEVER_INLINE void BytecodeInterpreter::tryCTICacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, void* returnAddress, JSValue* baseValue, const Identifier& propertyName, const PropertySlot& slot)
     4130NEVER_INLINE void Interpreter::tryCTICacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, void* returnAddress, JSValue* baseValue, const Identifier& propertyName, const PropertySlot& slot)
    41314131{
    41324132    // FIXME: Write a test that proves we need to check for recursion here just
     
    43454345    } while (0)
    43464346
    4347 JSObject* BytecodeInterpreter::cti_op_convert_this(CTI_ARGS)
     4347JSObject* Interpreter::cti_op_convert_this(CTI_ARGS)
    43484348{
    43494349    CTI_STACK_HACK();
     
    43574357}
    43584358
    4359 void BytecodeInterpreter::cti_op_end(CTI_ARGS)
     4359void Interpreter::cti_op_end(CTI_ARGS)
    43604360{
    43614361    CTI_STACK_HACK();
     
    43664366}
    43674367
    4368 JSValue* BytecodeInterpreter::cti_op_add(CTI_ARGS)
     4368JSValue* Interpreter::cti_op_add(CTI_ARGS)
    43694369{
    43704370    CTI_STACK_HACK();
     
    44114411}
    44124412
    4413 JSValue* BytecodeInterpreter::cti_op_pre_inc(CTI_ARGS)
     4413JSValue* Interpreter::cti_op_pre_inc(CTI_ARGS)
    44144414{
    44154415    CTI_STACK_HACK();
     
    44234423}
    44244424
    4425 void BytecodeInterpreter::cti_timeout_check(CTI_ARGS)
     4425void Interpreter::cti_timeout_check(CTI_ARGS)
    44264426{
    44274427    CTI_STACK_HACK();
     
    44334433}
    44344434
    4435 void BytecodeInterpreter::cti_register_file_check(CTI_ARGS)
     4435void Interpreter::cti_register_file_check(CTI_ARGS)
    44364436{
    44374437    CTI_STACK_HACK();
     
    44474447}
    44484448
    4449 int BytecodeInterpreter::cti_op_loop_if_less(CTI_ARGS)
     4449int Interpreter::cti_op_loop_if_less(CTI_ARGS)
    44504450{
    44514451    CTI_STACK_HACK();
     
    44604460}
    44614461
    4462 int BytecodeInterpreter::cti_op_loop_if_lesseq(CTI_ARGS)
     4462int Interpreter::cti_op_loop_if_lesseq(CTI_ARGS)
    44634463{
    44644464    CTI_STACK_HACK();
     
    44734473}
    44744474
    4475 JSObject* BytecodeInterpreter::cti_op_new_object(CTI_ARGS)
     4475JSObject* Interpreter::cti_op_new_object(CTI_ARGS)
    44764476{
    44774477    CTI_STACK_HACK();
     
    44804480}
    44814481
    4482 void BytecodeInterpreter::cti_op_put_by_id(CTI_ARGS)
     4482void Interpreter::cti_op_put_by_id(CTI_ARGS)
    44834483{
    44844484    CTI_STACK_HACK();
     
    44954495}
    44964496
    4497 void BytecodeInterpreter::cti_op_put_by_id_second(CTI_ARGS)
     4497void Interpreter::cti_op_put_by_id_second(CTI_ARGS)
    44984498{
    44994499    CTI_STACK_HACK();
     
    45054505}
    45064506
    4507 void BytecodeInterpreter::cti_op_put_by_id_generic(CTI_ARGS)
     4507void Interpreter::cti_op_put_by_id_generic(CTI_ARGS)
    45084508{
    45094509    CTI_STACK_HACK();
     
    45144514}
    45154515
    4516 void BytecodeInterpreter::cti_op_put_by_id_fail(CTI_ARGS)
     4516void Interpreter::cti_op_put_by_id_fail(CTI_ARGS)
    45174517{
    45184518    CTI_STACK_HACK();
     
    45304530}
    45314531
    4532 JSValue* BytecodeInterpreter::cti_op_get_by_id(CTI_ARGS)
     4532JSValue* Interpreter::cti_op_get_by_id(CTI_ARGS)
    45334533{
    45344534    CTI_STACK_HACK();
     
    45474547}
    45484548
    4549 JSValue* BytecodeInterpreter::cti_op_get_by_id_second(CTI_ARGS)
     4549JSValue* Interpreter::cti_op_get_by_id_second(CTI_ARGS)
    45504550{
    45514551    CTI_STACK_HACK();
     
    45644564}
    45654565
    4566 JSValue* BytecodeInterpreter::cti_op_get_by_id_generic(CTI_ARGS)
     4566JSValue* Interpreter::cti_op_get_by_id_generic(CTI_ARGS)
    45674567{
    45684568    CTI_STACK_HACK();
     
    45794579}
    45804580
    4581 JSValue* BytecodeInterpreter::cti_op_get_by_id_fail(CTI_ARGS)
     4581JSValue* Interpreter::cti_op_get_by_id_fail(CTI_ARGS)
    45824582{
    45834583    CTI_STACK_HACK();
     
    45974597}
    45984598
    4599 JSValue* BytecodeInterpreter::cti_op_instanceof(CTI_ARGS)
     4599JSValue* Interpreter::cti_op_instanceof(CTI_ARGS)
    46004600{
    46014601    CTI_STACK_HACK();
     
    46374637}
    46384638
    4639 JSValue* BytecodeInterpreter::cti_op_del_by_id(CTI_ARGS)
     4639JSValue* Interpreter::cti_op_del_by_id(CTI_ARGS)
    46404640{
    46414641    CTI_STACK_HACK();
     
    46514651}
    46524652
    4653 JSValue* BytecodeInterpreter::cti_op_mul(CTI_ARGS)
     4653JSValue* Interpreter::cti_op_mul(CTI_ARGS)
    46544654{
    46554655    CTI_STACK_HACK();
     
    46694669}
    46704670
    4671 JSObject* BytecodeInterpreter::cti_op_new_func(CTI_ARGS)
     4671JSObject* Interpreter::cti_op_new_func(CTI_ARGS)
    46724672{
    46734673    CTI_STACK_HACK();
     
    46764676}
    46774677
    4678 void* BytecodeInterpreter::cti_op_call_JSFunction(CTI_ARGS)
     4678void* Interpreter::cti_op_call_JSFunction(CTI_ARGS)
    46794679{
    46804680    CTI_STACK_HACK();
     
    46944694}
    46954695
    4696 VoidPtrPair BytecodeInterpreter::cti_op_call_arityCheck(CTI_ARGS)
     4696VoidPtrPair Interpreter::cti_op_call_arityCheck(CTI_ARGS)
    46974697{
    46984698    CTI_STACK_HACK();
     
    47414741}
    47424742
    4743 void* BytecodeInterpreter::cti_vm_dontLazyLinkCall(CTI_ARGS)
     4743void* Interpreter::cti_vm_dontLazyLinkCall(CTI_ARGS)
    47444744{
    47454745    CTI_STACK_HACK();
     
    47554755}
    47564756
    4757 void* BytecodeInterpreter::cti_vm_lazyLinkCall(CTI_ARGS)
     4757void* Interpreter::cti_vm_lazyLinkCall(CTI_ARGS)
    47584758{
    47594759    CTI_STACK_HACK();
     
    47704770}
    47714771
    4772 JSObject* BytecodeInterpreter::cti_op_push_activation(CTI_ARGS)
     4772JSObject* Interpreter::cti_op_push_activation(CTI_ARGS)
    47734773{
    47744774    CTI_STACK_HACK();
     
    47794779}
    47804780
    4781 JSValue* BytecodeInterpreter::cti_op_call_NotJSFunction(CTI_ARGS)
     4781JSValue* Interpreter::cti_op_call_NotJSFunction(CTI_ARGS)
    47824782{
    47834783    CTI_STACK_HACK();
     
    48254825}
    48264826
    4827 void BytecodeInterpreter::cti_op_create_arguments(CTI_ARGS)
     4827void Interpreter::cti_op_create_arguments(CTI_ARGS)
    48284828{
    48294829    CTI_STACK_HACK();
     
    48344834}
    48354835
    4836 void BytecodeInterpreter::cti_op_create_arguments_no_params(CTI_ARGS)
     4836void Interpreter::cti_op_create_arguments_no_params(CTI_ARGS)
    48374837{
    48384838    CTI_STACK_HACK();
     
    48434843}
    48444844
    4845 void BytecodeInterpreter::cti_op_tear_off_activation(CTI_ARGS)
     4845void Interpreter::cti_op_tear_off_activation(CTI_ARGS)
    48464846{
    48474847    CTI_STACK_HACK();
     
    48514851}
    48524852
    4853 void BytecodeInterpreter::cti_op_tear_off_arguments(CTI_ARGS)
     4853void Interpreter::cti_op_tear_off_arguments(CTI_ARGS)
    48544854{
    48554855    CTI_STACK_HACK();
     
    48594859}
    48604860
    4861 void BytecodeInterpreter::cti_op_profile_will_call(CTI_ARGS)
     4861void Interpreter::cti_op_profile_will_call(CTI_ARGS)
    48624862{
    48634863    CTI_STACK_HACK();
     
    48674867}
    48684868
    4869 void BytecodeInterpreter::cti_op_profile_did_call(CTI_ARGS)
     4869void Interpreter::cti_op_profile_did_call(CTI_ARGS)
    48704870{
    48714871    CTI_STACK_HACK();
     
    48754875}
    48764876
    4877 void BytecodeInterpreter::cti_op_ret_scopeChain(CTI_ARGS)
     4877void Interpreter::cti_op_ret_scopeChain(CTI_ARGS)
    48784878{
    48794879    CTI_STACK_HACK();
     
    48834883}
    48844884
    4885 JSObject* BytecodeInterpreter::cti_op_new_array(CTI_ARGS)
     4885JSObject* Interpreter::cti_op_new_array(CTI_ARGS)
    48864886{
    48874887    CTI_STACK_HACK();
     
    48914891}
    48924892
    4893 JSValue* BytecodeInterpreter::cti_op_resolve(CTI_ARGS)
     4893JSValue* Interpreter::cti_op_resolve(CTI_ARGS)
    48944894{
    48954895    CTI_STACK_HACK();
     
    49204920}
    49214921
    4922 JSObject* BytecodeInterpreter::cti_op_construct_JSConstruct(CTI_ARGS)
     4922JSObject* Interpreter::cti_op_construct_JSConstruct(CTI_ARGS)
    49234923{
    49244924    CTI_STACK_HACK();
     
    49374937}
    49384938
    4939 JSValue* BytecodeInterpreter::cti_op_construct_NotJSConstruct(CTI_ARGS)
     4939JSValue* Interpreter::cti_op_construct_NotJSConstruct(CTI_ARGS)
    49404940{
    49414941    CTI_STACK_HACK();
     
    49694969}
    49704970
    4971 JSValue* BytecodeInterpreter::cti_op_get_by_val(CTI_ARGS)
    4972 {
    4973     CTI_STACK_HACK();
    4974 
    4975     CallFrame* callFrame = ARG_callFrame;
    4976     BytecodeInterpreter* interpreter = ARG_globalData->interpreter;
     4971JSValue* Interpreter::cti_op_get_by_val(CTI_ARGS)
     4972{
     4973    CTI_STACK_HACK();
     4974
     4975    CallFrame* callFrame = ARG_callFrame;
     4976    Interpreter* interpreter = ARG_globalData->interpreter;
    49774977
    49784978    JSValue* baseValue = ARG_src1;
     
    50035003}
    50045004
    5005 VoidPtrPair BytecodeInterpreter::cti_op_resolve_func(CTI_ARGS)
     5005VoidPtrPair Interpreter::cti_op_resolve_func(CTI_ARGS)
    50065006{
    50075007    CTI_STACK_HACK();
     
    50475047}
    50485048
    5049 JSValue* BytecodeInterpreter::cti_op_sub(CTI_ARGS)
     5049JSValue* Interpreter::cti_op_sub(CTI_ARGS)
    50505050{
    50515051    CTI_STACK_HACK();
     
    50655065}
    50665066
    5067 void BytecodeInterpreter::cti_op_put_by_val(CTI_ARGS)
    5068 {
    5069     CTI_STACK_HACK();
    5070 
    5071     CallFrame* callFrame = ARG_callFrame;
    5072     BytecodeInterpreter* interpreter = ARG_globalData->interpreter;
     5067void Interpreter::cti_op_put_by_val(CTI_ARGS)
     5068{
     5069    CTI_STACK_HACK();
     5070
     5071    CallFrame* callFrame = ARG_callFrame;
     5072    Interpreter* interpreter = ARG_globalData->interpreter;
    50735073
    50745074    JSValue* baseValue = ARG_src1;
     
    50995099}
    51005100
    5101 void BytecodeInterpreter::cti_op_put_by_val_array(CTI_ARGS)
     5101void Interpreter::cti_op_put_by_val_array(CTI_ARGS)
    51025102{
    51035103    CTI_STACK_HACK();
     
    51255125}
    51265126
    5127 JSValue* BytecodeInterpreter::cti_op_lesseq(CTI_ARGS)
     5127JSValue* Interpreter::cti_op_lesseq(CTI_ARGS)
    51285128{
    51295129    CTI_STACK_HACK();
     
    51355135}
    51365136
    5137 int BytecodeInterpreter::cti_op_loop_if_true(CTI_ARGS)
     5137int Interpreter::cti_op_loop_if_true(CTI_ARGS)
    51385138{
    51395139    CTI_STACK_HACK();
     
    51485148}
    51495149
    5150 JSValue* BytecodeInterpreter::cti_op_negate(CTI_ARGS)
     5150JSValue* Interpreter::cti_op_negate(CTI_ARGS)
    51515151{
    51525152    CTI_STACK_HACK();
     
    51645164}
    51655165
    5166 JSValue* BytecodeInterpreter::cti_op_resolve_base(CTI_ARGS)
     5166JSValue* Interpreter::cti_op_resolve_base(CTI_ARGS)
    51675167{
    51685168    CTI_STACK_HACK();
     
    51715171}
    51725172
    5173 JSValue* BytecodeInterpreter::cti_op_resolve_skip(CTI_ARGS)
     5173JSValue* Interpreter::cti_op_resolve_skip(CTI_ARGS)
    51745174{
    51755175    CTI_STACK_HACK();
     
    52055205}
    52065206
    5207 JSValue* BytecodeInterpreter::cti_op_resolve_global(CTI_ARGS)
     5207JSValue* Interpreter::cti_op_resolve_global(CTI_ARGS)
    52085208{
    52095209    CTI_STACK_HACK();
     
    52355235}
    52365236
    5237 JSValue* BytecodeInterpreter::cti_op_div(CTI_ARGS)
     5237JSValue* Interpreter::cti_op_div(CTI_ARGS)
    52385238{
    52395239    CTI_STACK_HACK();
     
    52535253}
    52545254
    5255 JSValue* BytecodeInterpreter::cti_op_pre_dec(CTI_ARGS)
     5255JSValue* Interpreter::cti_op_pre_dec(CTI_ARGS)
    52565256{
    52575257    CTI_STACK_HACK();
     
    52655265}
    52665266
    5267 int BytecodeInterpreter::cti_op_jless(CTI_ARGS)
     5267int Interpreter::cti_op_jless(CTI_ARGS)
    52685268{
    52695269    CTI_STACK_HACK();
     
    52785278}
    52795279
    5280 JSValue* BytecodeInterpreter::cti_op_not(CTI_ARGS)
     5280JSValue* Interpreter::cti_op_not(CTI_ARGS)
    52815281{
    52825282    CTI_STACK_HACK();
     
    52915291}
    52925292
    5293 int SFX_CALL BytecodeInterpreter::cti_op_jtrue(CTI_ARGS)
     5293int SFX_CALL Interpreter::cti_op_jtrue(CTI_ARGS)
    52945294{
    52955295    CTI_STACK_HACK();
     
    53045304}
    53055305
    5306 VoidPtrPair BytecodeInterpreter::cti_op_post_inc(CTI_ARGS)
     5306VoidPtrPair Interpreter::cti_op_post_inc(CTI_ARGS)
    53075307{
    53085308    CTI_STACK_HACK();
     
    53195319}
    53205320
    5321 JSValue* BytecodeInterpreter::cti_op_eq(CTI_ARGS)
     5321JSValue* Interpreter::cti_op_eq(CTI_ARGS)
    53225322{
    53235323    CTI_STACK_HACK();
     
    53345334}
    53355335
    5336 JSValue* BytecodeInterpreter::cti_op_lshift(CTI_ARGS)
     5336JSValue* Interpreter::cti_op_lshift(CTI_ARGS)
    53375337{
    53385338    CTI_STACK_HACK();
     
    53545354}
    53555355
    5356 JSValue* BytecodeInterpreter::cti_op_bitand(CTI_ARGS)
     5356JSValue* Interpreter::cti_op_bitand(CTI_ARGS)
    53575357{
    53585358    CTI_STACK_HACK();
     
    53725372}
    53735373
    5374 JSValue* BytecodeInterpreter::cti_op_rshift(CTI_ARGS)
     5374JSValue* Interpreter::cti_op_rshift(CTI_ARGS)
    53755375{
    53765376    CTI_STACK_HACK();
     
    53925392}
    53935393
    5394 JSValue* BytecodeInterpreter::cti_op_bitnot(CTI_ARGS)
     5394JSValue* Interpreter::cti_op_bitnot(CTI_ARGS)
    53955395{
    53965396    CTI_STACK_HACK();
     
    54085408}
    54095409
    5410 VoidPtrPair BytecodeInterpreter::cti_op_resolve_with_base(CTI_ARGS)
     5410VoidPtrPair Interpreter::cti_op_resolve_with_base(CTI_ARGS)
    54115411{
    54125412    CTI_STACK_HACK();
     
    54445444}
    54455445
    5446 JSObject* BytecodeInterpreter::cti_op_new_func_exp(CTI_ARGS)
     5446JSObject* Interpreter::cti_op_new_func_exp(CTI_ARGS)
    54475447{
    54485448    CTI_STACK_HACK();
     
    54515451}
    54525452
    5453 JSValue* BytecodeInterpreter::cti_op_mod(CTI_ARGS)
     5453JSValue* Interpreter::cti_op_mod(CTI_ARGS)
    54545454{
    54555455    CTI_STACK_HACK();
     
    54655465}
    54665466
    5467 JSValue* BytecodeInterpreter::cti_op_less(CTI_ARGS)
     5467JSValue* Interpreter::cti_op_less(CTI_ARGS)
    54685468{
    54695469    CTI_STACK_HACK();
     
    54755475}
    54765476
    5477 JSValue* BytecodeInterpreter::cti_op_neq(CTI_ARGS)
     5477JSValue* Interpreter::cti_op_neq(CTI_ARGS)
    54785478{
    54795479    CTI_STACK_HACK();
     
    54905490}
    54915491
    5492 VoidPtrPair BytecodeInterpreter::cti_op_post_dec(CTI_ARGS)
     5492VoidPtrPair Interpreter::cti_op_post_dec(CTI_ARGS)
    54935493{
    54945494    CTI_STACK_HACK();
     
    55055505}
    55065506
    5507 JSValue* BytecodeInterpreter::cti_op_urshift(CTI_ARGS)
     5507JSValue* Interpreter::cti_op_urshift(CTI_ARGS)
    55085508{
    55095509    CTI_STACK_HACK();
     
    55235523}
    55245524
    5525 JSValue* BytecodeInterpreter::cti_op_bitxor(CTI_ARGS)
     5525JSValue* Interpreter::cti_op_bitxor(CTI_ARGS)
    55265526{
    55275527    CTI_STACK_HACK();
     
    55375537}
    55385538
    5539 JSObject* BytecodeInterpreter::cti_op_new_regexp(CTI_ARGS)
     5539JSObject* Interpreter::cti_op_new_regexp(CTI_ARGS)
    55405540{
    55415541    CTI_STACK_HACK();
     
    55445544}
    55455545
    5546 JSValue* BytecodeInterpreter::cti_op_bitor(CTI_ARGS)
     5546JSValue* Interpreter::cti_op_bitor(CTI_ARGS)
    55475547{
    55485548    CTI_STACK_HACK();
     
    55585558}
    55595559
    5560 JSValue* BytecodeInterpreter::cti_op_call_eval(CTI_ARGS)
     5560JSValue* Interpreter::cti_op_call_eval(CTI_ARGS)
    55615561{
    55625562    CTI_STACK_HACK();
     
    55655565    RegisterFile* registerFile = ARG_registerFile;
    55665566
    5567     BytecodeInterpreter* interpreter = ARG_globalData->interpreter;
     5567    Interpreter* interpreter = ARG_globalData->interpreter;
    55685568   
    55695569    JSValue* funcVal = ARG_src1;
     
    55895589}
    55905590
    5591 JSValue* BytecodeInterpreter::cti_op_throw(CTI_ARGS)
     5591JSValue* Interpreter::cti_op_throw(CTI_ARGS)
    55925592{
    55935593    CTI_STACK_HACK();
     
    56165616}
    56175617
    5618 JSPropertyNameIterator* BytecodeInterpreter::cti_op_get_pnames(CTI_ARGS)
     5618JSPropertyNameIterator* Interpreter::cti_op_get_pnames(CTI_ARGS)
    56195619{
    56205620    CTI_STACK_HACK();
     
    56235623}
    56245624
    5625 JSValue* BytecodeInterpreter::cti_op_next_pname(CTI_ARGS)
     5625JSValue* Interpreter::cti_op_next_pname(CTI_ARGS)
    56265626{
    56275627    CTI_STACK_HACK();
     
    56345634}
    56355635
    5636 void BytecodeInterpreter::cti_op_push_scope(CTI_ARGS)
     5636void Interpreter::cti_op_push_scope(CTI_ARGS)
    56375637{
    56385638    CTI_STACK_HACK();
     
    56435643}
    56445644
    5645 void BytecodeInterpreter::cti_op_pop_scope(CTI_ARGS)
     5645void Interpreter::cti_op_pop_scope(CTI_ARGS)
    56465646{
    56475647    CTI_STACK_HACK();
     
    56505650}
    56515651
    5652 JSValue* BytecodeInterpreter::cti_op_typeof(CTI_ARGS)
     5652JSValue* Interpreter::cti_op_typeof(CTI_ARGS)
    56535653{
    56545654    CTI_STACK_HACK();
     
    56575657}
    56585658
    5659 JSValue* BytecodeInterpreter::cti_op_is_undefined(CTI_ARGS)
     5659JSValue* Interpreter::cti_op_is_undefined(CTI_ARGS)
    56605660{
    56615661    CTI_STACK_HACK();
     
    56655665}
    56665666
    5667 JSValue* BytecodeInterpreter::cti_op_is_boolean(CTI_ARGS)
     5667JSValue* Interpreter::cti_op_is_boolean(CTI_ARGS)
    56685668{
    56695669    CTI_STACK_HACK();
     
    56725672}
    56735673
    5674 JSValue* BytecodeInterpreter::cti_op_is_number(CTI_ARGS)
     5674JSValue* Interpreter::cti_op_is_number(CTI_ARGS)
    56755675{
    56765676    CTI_STACK_HACK();
     
    56795679}
    56805680
    5681 JSValue* BytecodeInterpreter::cti_op_is_string(CTI_ARGS)
     5681JSValue* Interpreter::cti_op_is_string(CTI_ARGS)
    56825682{
    56835683    CTI_STACK_HACK();
     
    56865686}
    56875687
    5688 JSValue* BytecodeInterpreter::cti_op_is_object(CTI_ARGS)
     5688JSValue* Interpreter::cti_op_is_object(CTI_ARGS)
    56895689{
    56905690    CTI_STACK_HACK();
     
    56935693}
    56945694
    5695 JSValue* BytecodeInterpreter::cti_op_is_function(CTI_ARGS)
     5695JSValue* Interpreter::cti_op_is_function(CTI_ARGS)
    56965696{
    56975697    CTI_STACK_HACK();
     
    57005700}
    57015701
    5702 JSValue* BytecodeInterpreter::cti_op_stricteq(CTI_ARGS)
     5702JSValue* Interpreter::cti_op_stricteq(CTI_ARGS)
    57035703{
    57045704    CTI_STACK_HACK();
     
    57145714}
    57155715
    5716 JSValue* BytecodeInterpreter::cti_op_nstricteq(CTI_ARGS)
     5716JSValue* Interpreter::cti_op_nstricteq(CTI_ARGS)
    57175717{
    57185718    CTI_STACK_HACK();
     
    57285728}
    57295729
    5730 JSValue* BytecodeInterpreter::cti_op_to_jsnumber(CTI_ARGS)
     5730JSValue* Interpreter::cti_op_to_jsnumber(CTI_ARGS)
    57315731{
    57325732    CTI_STACK_HACK();
     
    57405740}
    57415741
    5742 JSValue* BytecodeInterpreter::cti_op_in(CTI_ARGS)
     5742JSValue* Interpreter::cti_op_in(CTI_ARGS)
    57435743{
    57445744    CTI_STACK_HACK();
     
    57685768}
    57695769
    5770 JSObject* BytecodeInterpreter::cti_op_push_new_scope(CTI_ARGS)
     5770JSObject* Interpreter::cti_op_push_new_scope(CTI_ARGS)
    57715771{
    57725772    CTI_STACK_HACK();
     
    57795779}
    57805780
    5781 void BytecodeInterpreter::cti_op_jmp_scopes(CTI_ARGS)
     5781void Interpreter::cti_op_jmp_scopes(CTI_ARGS)
    57825782{
    57835783    CTI_STACK_HACK();
     
    57925792}
    57935793
    5794 void BytecodeInterpreter::cti_op_put_by_index(CTI_ARGS)
     5794void Interpreter::cti_op_put_by_index(CTI_ARGS)
    57955795{
    57965796    CTI_STACK_HACK();
     
    58025802}
    58035803
    5804 void* BytecodeInterpreter::cti_op_switch_imm(CTI_ARGS)
     5804void* Interpreter::cti_op_switch_imm(CTI_ARGS)
    58055805{
    58065806    CTI_STACK_HACK();
     
    58195819}
    58205820
    5821 void* BytecodeInterpreter::cti_op_switch_char(CTI_ARGS)
     5821void* Interpreter::cti_op_switch_char(CTI_ARGS)
    58225822{
    58235823    CTI_STACK_HACK();
     
    58395839}
    58405840
    5841 void* BytecodeInterpreter::cti_op_switch_string(CTI_ARGS)
     5841void* Interpreter::cti_op_switch_string(CTI_ARGS)
    58425842{
    58435843    CTI_STACK_HACK();
     
    58585858}
    58595859
    5860 JSValue* BytecodeInterpreter::cti_op_del_by_val(CTI_ARGS)
     5860JSValue* Interpreter::cti_op_del_by_val(CTI_ARGS)
    58615861{
    58625862    CTI_STACK_HACK();
     
    58835883}
    58845884
    5885 void BytecodeInterpreter::cti_op_put_getter(CTI_ARGS)
     5885void Interpreter::cti_op_put_getter(CTI_ARGS)
    58865886{
    58875887    CTI_STACK_HACK();
     
    58965896}
    58975897
    5898 void BytecodeInterpreter::cti_op_put_setter(CTI_ARGS)
     5898void Interpreter::cti_op_put_setter(CTI_ARGS)
    58995899{
    59005900    CTI_STACK_HACK();
     
    59095909}
    59105910
    5911 JSObject* BytecodeInterpreter::cti_op_new_error(CTI_ARGS)
     5911JSObject* Interpreter::cti_op_new_error(CTI_ARGS)
    59125912{
    59135913    CTI_STACK_HACK();
     
    59225922}
    59235923
    5924 void BytecodeInterpreter::cti_op_debug(CTI_ARGS)
     5924void Interpreter::cti_op_debug(CTI_ARGS)
    59255925{
    59265926    CTI_STACK_HACK();
     
    59355935}
    59365936
    5937 JSValue* BytecodeInterpreter::cti_vm_throw(CTI_ARGS)
     5937JSValue* Interpreter::cti_vm_throw(CTI_ARGS)
    59385938{
    59395939    CTI_STACK_HACK();
  • trunk/JavaScriptCore/VM/Machine.h

    r38434 r38461  
    102102    enum { MaxReentryDepth = 128 };
    103103
    104     class BytecodeInterpreter {
     104    class Interpreter {
    105105        friend class CTI;
    106106    public:
    107         BytecodeInterpreter();
    108         ~BytecodeInterpreter();
     107        Interpreter();
     108        ~Interpreter();
    109109
    110110        void initialize(JSGlobalData*);
  • trunk/JavaScriptCore/VM/Register.h

    r38423 r38461  
    6060    private:
    6161        friend class ExecState;
    62         friend class BytecodeInterpreter;
    63 
    64         // Only CallFrame and BytecodeInterpreter should use these functions.
     62        friend class Interpreter;
     63
     64        // Only CallFrame and Interpreter should use these functions.
    6565
    6666        Register(intptr_t);
     
    171171    }
    172172   
    173     // BytecodeInterpreter functions
     173    // Interpreter functions
    174174
    175175    ALWAYS_INLINE Register::Register(Arguments* arguments)
  • trunk/JavaScriptCore/VM/SamplingTool.h

    r38428 r38461  
    4141    class CodeBlock;
    4242    class ExecState;
    43     class BytecodeInterpreter;
     43    class Interpreter;
    4444    class ScopeNode;
    4545    struct Instruction;
     
    126126#endif       
    127127
    128         SamplingTool(BytecodeInterpreter* interpreter)
     128        SamplingTool(Interpreter* interpreter)
    129129            : m_interpreter(interpreter)
    130130            , m_running(false)
     
    189189        void run();
    190190       
    191         BytecodeInterpreter* m_interpreter;
     191        Interpreter* m_interpreter;
    192192       
    193193        // Sampling thread state.
  • trunk/JavaScriptCore/bytecompiler/CodeGenerator.cpp

    r38441 r38461  
    142142
    143143    m_scopeNode->children().shrinkCapacity(0);
    144     if (m_codeType != EvalCode) { // eval code needs to hang on to its declaration stacks to keep declaration info alive until BytecodeInterpreter::execute time.
     144    if (m_codeType != EvalCode) { // eval code needs to hang on to its declaration stacks to keep declaration info alive until Interpreter::execute time.
    145145        m_scopeNode->varStack().shrinkCapacity(0);
    146146        m_scopeNode->functionStack().shrinkCapacity(0);
     
    237237    codeBlock->globalData = m_globalData;
    238238
    239     // FIXME: Move code that modifies the global object to BytecodeInterpreter::execute.
     239    // FIXME: Move code that modifies the global object to Interpreter::execute.
    240240   
    241241    m_codeBlock->numParameters = 1; // Allocate space for "this"
  • trunk/JavaScriptCore/jsc.cpp

    r38442 r38461  
    321321
    322322#if ENABLE(OPCODE_SAMPLING)
    323     BytecodeInterpreter* interpreter = globalObject->globalData()->interpreter;
     323    Interpreter* interpreter = globalObject->globalData()->interpreter;
    324324    interpreter->setSampler(new SamplingTool(machine));
    325325#endif
  • trunk/JavaScriptCore/masm/X86Assembler.h

    r38434 r38461  
    123123    }
    124124   
    125     void* copy()
     125    void* executableCopy()
    126126    {
    127127        if (!m_size)
     
    11071107    }
    11081108   
    1109     void* copy()
    1110     {
    1111         return m_buffer->copy();
     1109    void* executableCopy()
     1110    {
     1111        return m_buffer->executableCopy();
    11121112    }
    11131113
  • trunk/JavaScriptCore/runtime/ExecState.h

    r38423 r38461  
    8383        const CommonIdentifiers& propertyNames() const { return *globalData().propertyNames; }
    8484        const ArgList& emptyList() const { return *globalData().emptyList; }
    85         BytecodeInterpreter* interpreter() { return globalData().interpreter; }
     85        Interpreter* interpreter() { return globalData().interpreter; }
    8686        Heap* heap() { return &globalData().heap; }
    8787
     
    9898        friend class JSActivation;
    9999        friend class JSGlobalObject;
    100         friend class BytecodeInterpreter;
     100        friend class Interpreter;
    101101
    102102        static CallFrame* create(Register* callFrameBase) { return static_cast<CallFrame*>(callFrameBase); }
  • trunk/JavaScriptCore/runtime/JSCell.h

    r38440 r38461  
    3939        friend class JSString;
    4040        friend class JSValue;
    41         friend class BytecodeInterpreter;
     41        friend class Interpreter;
    4242
    4343    private:
  • trunk/JavaScriptCore/runtime/JSFunction.h

    r38440 r38461  
    4040    class JSFunction : public InternalFunction {
    4141        friend class CTI;
    42         friend class BytecodeInterpreter;
     42        friend class Interpreter;
    4343
    4444        typedef InternalFunction Base;
  • trunk/JavaScriptCore/runtime/JSGlobalData.cpp

    r38440 r38461  
    6565
    6666JSGlobalData::JSGlobalData(bool isShared)
    67     : interpreter(new BytecodeInterpreter)
     67    : interpreter(new Interpreter)
    6868    , exception(noValue())
    6969    , arrayTable(new HashTable(JSC::arrayTable))
  • trunk/JavaScriptCore/runtime/JSGlobalData.h

    r38440 r38461  
    4848    class JSObject;
    4949    class Lexer;
    50     class BytecodeInterpreter;
     50    class Interpreter;
    5151    class Parser;
    5252    class ParserRefCounted;
     
    6464        ~JSGlobalData();
    6565
    66         BytecodeInterpreter* interpreter;
     66        Interpreter* interpreter;
    6767
    6868        JSValue* exception;
  • trunk/JavaScriptCore/runtime/JSImmediate.h

    r38148 r38461  
    8787    class JSImmediate {
    8888    private:
    89         friend class CTI; // Whooo!
     89        friend class CTI;
    9090   
    9191        static const uintptr_t TagMask           = 0x3u; // primary tag is 2 bits long
  • trunk/JavaScriptCore/runtime/JSString.h

    r38440 r38461  
    6161    class JSString : public JSCell {
    6262        friend class CTI;
    63         friend class BytecodeInterpreter;
     63        friend class Interpreter;
    6464
    6565    public:
  • trunk/JavaScriptCore/runtime/JSValue.h

    r38137 r38461  
    2929#include "UString.h"
    3030#include <stddef.h> // for size_t
    31 
    32 // The magic number 0x4000 is not important here, it is being subtracted back out (avoiding using zero since this
    33 // can have unexpected effects in this type of macro, particularly where multiple-inheritance is involved).
    34 #define OBJECT_OFFSET(class, member) (reinterpret_cast<ptrdiff_t>(&(reinterpret_cast<class*>(0x4000)->member)) - 0x4000)
    3531
    3632namespace JSC {
  • trunk/JavaScriptCore/runtime/JSVariableObject.h

    r38440 r38461  
    4242
    4343    class JSVariableObject : public JSObject {
     44        friend class CTI;
     45
    4446    public:
    4547        SymbolTable& symbolTable() const { return *d->symbolTable; }
     
    7375            OwnArrayPtr<Register> registerArray; // Independent copy of registers, used when a variable object copies its registers out of the register file.
    7476
    75             static inline ptrdiff_t offsetOf_registers()
    76             {
    77                 return OBJECT_OFFSET(JSVariableObjectData, registers);
    78             }
    79 
    8077        private:
    8178            JSVariableObjectData(const JSVariableObjectData&);
     
    9895
    9996        JSVariableObjectData* d;
    100 
    101     public:
    102         static inline ptrdiff_t offsetOf_d()
    103         {
    104             return OBJECT_OFFSET(JSVariableObject, d);
    105         }
    106 
    107         static inline ptrdiff_t offsetOf_Data_registers()
    108         {
    109             return JSVariableObjectData::offsetOf_registers();
    110         }
    11197    };
    11298
  • trunk/JavaScriptCore/runtime/RegExp.cpp

    r38438 r38461  
    2222#include "RegExp.h"
    2323
    24 #include "CTI.h"
    2524#include "Lexer.h"
    2625#include <pcre/pcre.h>
     
    2827#include <stdlib.h>
    2928#include <string.h>
    30 #include <wrec/WREC.h>
    3129#include <wtf/Assertions.h>
    3230#include <wtf/OwnArrayPtr.h>
     
    4644{
    4745#if ENABLE(WREC)
    48     m_wrecFunction = WREC::compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError);
     46    m_wrecFunction = compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError);
    4947    if (m_wrecFunction)
    5048        return;
     
    8987
    9088#if ENABLE(WREC)
    91     m_wrecFunction = WREC::compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError, (m_flagBits & IgnoreCase), (m_flagBits & Multiline));
     89    m_wrecFunction = compileRegExp(globalData->interpreter, pattern, &m_numSubpatterns, &m_constructionError, (m_flagBits & IgnoreCase), (m_flagBits & Multiline));
    9290    if (m_wrecFunction)
    9391        return;
     
    110108#if ENABLE(WREC)
    111109    if (m_wrecFunction)
    112         WTF::fastFreeExecutable(m_wrecFunction);
     110        WTF::fastFreeExecutable(reinterpret_cast<void*>(m_wrecFunction));
    113111#endif
    114112}
     
    137135            ovector->set(offsetVector);
    138136
    139         int result = reinterpret_cast<WRECFunction>(m_wrecFunction)(s.data(), i, s.size(), offsetVector);
     137        int result = m_wrecFunction(s.data(), i, s.size(), offsetVector);
    140138
    141139        if (result < 0) {
  • trunk/JavaScriptCore/runtime/RegExp.h

    r38137 r38461  
    2323
    2424#include "UString.h"
     25#include "WREC.h"
    2526#include <wtf/Forward.h>
    2627#include <wtf/RefCounted.h>
     
    6768
    6869#if ENABLE(WREC)
    69         // Called as a WRECFunction
    70         void* m_wrecFunction;
     70        WREC::RegExpFunction m_wrecFunction;
    7171#endif
    7272    };
  • trunk/JavaScriptCore/wrec/CharacterClassConstructor.cpp

    r38434 r38461  
    3333
    3434using namespace WTF;
    35 using namespace JSC;
    36 
    37 namespace WREC {
     35
     36namespace JSC { namespace WREC {
    3837
    3938static const UChar asciiNewlines[2] = { '\n', '\r' };
     
    357356}
    358357
    359 } // namespace WREC
     358} } // namespace JSC::WREC
    360359
    361360#endif // ENABLE(WREC)
  • trunk/JavaScriptCore/wrec/CharacterClassConstructor.h

    r38434 r38461  
    2727#define CharacterClassConstructor_h
    2828
     29#include <wtf/Platform.h>
     30
    2931#if ENABLE(WREC)
    3032
    3133#include "UString.h"
    3234
    33 namespace WREC {
     35namespace JSC { namespace WREC {
    3436
    3537    struct CharacterClassRange {
     
    115117    };
    116118
    117 } // namespace WREC
     119} } // namespace JSC::WREC
    118120
    119121#endif // ENABLE(WREC)
  • trunk/JavaScriptCore/wrec/WREC.cpp

    r38434 r38461  
    3636
    3737using namespace WTF;
    38 using namespace JSC;
    39 
    40 namespace WREC {
     38
     39namespace JSC { namespace WREC {
    4140
    4241class GenerateAtomFunctor {
     
    13291328static const int MaxPatternSize = (1 << 16);
    13301329
    1331 void* compileRegExp(BytecodeInterpreter* interpreter, const UString& pattern, unsigned* numSubpatterns_ptr, const char** error_ptr, bool ignoreCase, bool multiline)
     1330RegExpFunction compileRegExp(Interpreter* interpreter, const UString& pattern, unsigned* numSubpatterns_ptr, const char** error_ptr, bool ignoreCase, bool multiline)
    13321331{
    13331332    // TODO: better error messages
     
    14151414    *numSubpatterns_ptr = parser.m_numSubpatterns;
    14161415
    1417     void* code = __ copy();
     1416    void* code = __ executableCopy();
    14181417    ASSERT(code);
    1419     return code;
    1420 }
    1421 
    1422 } // namespace WREC
     1418    return reinterpret_cast<RegExpFunction>(code);
     1419}
     1420
     1421} } // namespace JSC::WREC
    14231422
    14241423#endif // ENABLE(WREC)
  • trunk/JavaScriptCore/wrec/WREC.h

    r38434 r38461  
    2727#define WREC_h
    2828
     29#include <wtf/Platform.h>
     30
    2931#if ENABLE(WREC)
    3032
     
    4143
    4244namespace JSC {
    43     class BytecodeInterpreter;
     45    class Interpreter;
    4446}
    4547
    46 namespace WREC {
     48namespace JSC { namespace WREC {
    4749
    4850    class GenerateAtomFunctor;
     
    5052    struct CharacterClass;
    5153
    52     typedef int (*WRECFunction)(const UChar* input, unsigned start, unsigned length, int* output) WREC_CALL;
    53 
    54     void* compileRegExp(JSC::BytecodeInterpreter*, const JSC::UString& pattern, unsigned* numSubpatterns_ptr, const char** error_ptr, bool ignoreCase = false, bool multiline = false);
     54    typedef int (*RegExpFunction)(const UChar* input, unsigned start, unsigned length, int* output) WREC_CALL;
     55
     56    RegExpFunction compileRegExp(Interpreter*, const UString& pattern, unsigned* numSubpatterns_ptr, const char** error_ptr, bool ignoreCase = false, bool multiline = false);
    5557
    5658    struct Quantifier {
     
    8688    class Generator {
    8789    public:
    88         Generator(Parser& parser, JSC::X86Assembler& assembler)
     90        Generator(Parser& parser, X86Assembler& assembler)
    8991            : m_parser(parser)
    9092            , m_assembler(assembler)
     
    9294        }
    9395
    94         typedef JSC::X86Assembler::JmpSrc JmpSrc;
    95         typedef JSC::X86Assembler::JmpDst JmpDst;
     96        typedef X86Assembler::JmpSrc JmpSrc;
     97        typedef X86Assembler::JmpDst JmpDst;
     98        typedef X86Assembler::RegisterID RegisterID;
    9699
    97100        // these regs setup by the params
    98         static const JSC::X86Assembler::RegisterID inputRegister = JSC::X86::eax;
    99         static const JSC::X86Assembler::RegisterID currentPositionRegister = JSC::X86::edx;
    100         static const JSC::X86Assembler::RegisterID lengthRegister = JSC::X86::ecx;
    101         static const JSC::X86Assembler::RegisterID currentValueRegister = JSC::X86::esi;
    102         static const JSC::X86Assembler::RegisterID outputRegister = JSC::X86::edi;
    103         static const JSC::X86Assembler::RegisterID quantifierCountRegister = JSC::X86::ebx;
     101        static const RegisterID inputRegister = X86::eax;
     102        static const RegisterID currentPositionRegister = X86::edx;
     103        static const RegisterID lengthRegister = X86::ecx;
     104        static const RegisterID currentValueRegister = X86::esi;
     105        static const RegisterID outputRegister = X86::edi;
     106        static const RegisterID quantifierCountRegister = X86::ebx;
    104107
    105108        friend class GenerateAtomFunctor;
     
    109112        friend class GenerateParenthesesNonGreedyFunctor;
    110113
    111         void generateGreedyQuantifier(JSC::JmpSrcVector& failures, GenerateAtomFunctor& functor, unsigned min, unsigned max);
    112         void generateNonGreedyQuantifier(JSC::JmpSrcVector& failures, GenerateAtomFunctor& functor, unsigned min, unsigned max);
     114        void generateGreedyQuantifier(JmpSrcVector& failures, GenerateAtomFunctor& functor, unsigned min, unsigned max);
     115        void generateNonGreedyQuantifier(JmpSrcVector& failures, GenerateAtomFunctor& functor, unsigned min, unsigned max);
    113116        void generateBacktrack1();
    114117        void generateBacktrackBackreference(unsigned subpatternId);
    115         void generateCharacterClass(JSC::JmpSrcVector& failures, CharacterClass& charClass, bool invert);
    116         void generateCharacterClassInverted(JSC::JmpSrcVector& failures, CharacterClass& charClass);
    117         void generateCharacterClassInvertedRange(JSC::JmpSrcVector& failures, JSC::JmpSrcVector& matchDest, const CharacterClassRange* ranges, unsigned count, unsigned* matchIndex, const UChar* matches, unsigned matchCount);
    118         void generatePatternCharacter(JSC::JmpSrcVector& failures, int ch);
    119         void generateAssertionWordBoundary(JSC::JmpSrcVector& failures, bool invert);
    120         void generateAssertionBOL(JSC::JmpSrcVector& failures);
    121         void generateAssertionEOL(JSC::JmpSrcVector& failures);
    122         void generateBackreference(JSC::JmpSrcVector& failures, unsigned subpatternID);
    123         void generateBackreferenceQuantifier(JSC::JmpSrcVector& failures, Quantifier::Type quantifierType, unsigned subpatternId, unsigned min, unsigned max);
     118        void generateCharacterClass(JmpSrcVector& failures, CharacterClass& charClass, bool invert);
     119        void generateCharacterClassInverted(JmpSrcVector& failures, CharacterClass& charClass);
     120        void generateCharacterClassInvertedRange(JmpSrcVector& failures, JmpSrcVector& matchDest, const CharacterClassRange* ranges, unsigned count, unsigned* matchIndex, const UChar* matches, unsigned matchCount);
     121        void generatePatternCharacter(JmpSrcVector& failures, int ch);
     122        void generateAssertionWordBoundary(JmpSrcVector& failures, bool invert);
     123        void generateAssertionBOL(JmpSrcVector& failures);
     124        void generateAssertionEOL(JmpSrcVector& failures);
     125        void generateBackreference(JmpSrcVector& failures, unsigned subpatternID);
     126        void generateBackreferenceQuantifier(JmpSrcVector& failures, Quantifier::Type quantifierType, unsigned subpatternId, unsigned min, unsigned max);
    124127        enum ParenthesesType { capturing, non_capturing, assertion, inverted_assertion }; // order is relied on in generateParentheses()
    125128        JmpSrc generateParentheses(ParenthesesType type);
    126         JmpSrc generateParenthesesResetTrampoline(JSC::JmpSrcVector& newFailures, unsigned subpatternIdBefore, unsigned subpatternIdAfter);
    127         void generateParenthesesNonGreedy(JSC::JmpSrcVector& failures, JmpDst start, JmpSrc success, JmpSrc fail);
    128 
    129         void generateDisjunction(JSC::JmpSrcVector& successes, JSC::JmpSrcVector& failures);
    130         void terminateDisjunction(JSC::JmpSrcVector& successes);
     129        JmpSrc generateParenthesesResetTrampoline(JmpSrcVector& newFailures, unsigned subpatternIdBefore, unsigned subpatternIdAfter);
     130        void generateParenthesesNonGreedy(JmpSrcVector& failures, JmpDst start, JmpSrc success, JmpSrc fail);
     131
     132        void generateDisjunction(JmpSrcVector& successes, JmpSrcVector& failures);
     133        void terminateDisjunction(JmpSrcVector& successes);
    131134
    132135    private:
    133136        Parser& m_parser;
    134         JSC::X86Assembler& m_assembler;
     137        X86Assembler& m_assembler;
    135138    };
    136139
     
    140143        bool m_multiline;
    141144        unsigned m_numSubpatterns;
    142         enum WRECError {
     145        enum {
    143146            NoError,
    144147            Error_malformedCharacterClass,
     
    151154        } m_err;
    152155
    153         Parser(const JSC::UString& pattern, bool ignoreCase, bool multiline, JSC::X86Assembler& assembler)
     156        Parser(const UString& pattern, bool ignoreCase, bool multiline, X86Assembler& assembler)
    154157            : m_ignoreCase(ignoreCase)
    155158            , m_multiline(multiline)
     
    163166        }
    164167
    165         void parseAlternative(JSC::JmpSrcVector& failures)
     168        void parseAlternative(JmpSrcVector& failures)
    166169        {
    167170            while (parseTerm(failures)) { }
    168171        }
    169172
    170         void parseDisjunction(JSC::JmpSrcVector& failures);
    171 
    172         bool parseTerm(JSC::JmpSrcVector& failures);
    173         bool parseEscape(JSC::JmpSrcVector& failures);
    174         bool parseOctalEscape(JSC::JmpSrcVector& failures);
    175         bool parseParentheses(JSC::JmpSrcVector& failures);
    176         bool parseCharacterClass(JSC::JmpSrcVector& failures);
    177         bool parseCharacterClassQuantifier(JSC::JmpSrcVector& failures, CharacterClass& charClass, bool invert);
    178         bool parsePatternCharacterQualifier(JSC::JmpSrcVector& failures, int ch);
    179         bool parseBackreferenceQuantifier(JSC::JmpSrcVector& failures, unsigned subpatternId);
     173        void parseDisjunction(JmpSrcVector& failures);
     174
     175        bool parseTerm(JmpSrcVector& failures);
     176        bool parseEscape(JmpSrcVector& failures);
     177        bool parseOctalEscape(JmpSrcVector& failures);
     178        bool parseParentheses(JmpSrcVector& failures);
     179        bool parseCharacterClass(JmpSrcVector& failures);
     180        bool parseCharacterClassQuantifier(JmpSrcVector& failures, CharacterClass& charClass, bool invert);
     181        bool parsePatternCharacterQualifier(JmpSrcVector& failures, int ch);
     182        bool parseBackreferenceQuantifier(JmpSrcVector& failures, unsigned subpatternId);
    180183
    181184        ALWAYS_INLINE Quantifier parseGreedyQuantifier();
     
    256259    };
    257260
    258 } // namespace JSC
     261} } // namespace JSC::WREC
    259262
    260263#endif // ENABLE(WREC)
Note: See TracChangeset for help on using the changeset viewer.