Ignore:
Timestamp:
Dec 16, 2008, 4:03:34 PM (16 years ago)
Author:
[email protected]
Message:

2008-12-16 Gavin Barraclough <[email protected]>

Reviewed by Cameron Zwarich.

Make the JIT compile on x86-64.
This largely involves populting the missing calls in MacroAssembler.h.
In addition some reinterpret_casts need removing from the JIT, and the
repatching property access code will need to be fully compiled out for
now. The changes in interpret.cpp are to reorder the functions so that
the _generic forms come before all other property access methods, and
then to place all property access methods other than the generic forms
under control of the ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS macro.

No performance impact.

  • assembler/AssemblerBuffer.h: (JSC::AssemblerBuffer::putInt64Unchecked):
  • assembler/MacroAssembler.h: (JSC::MacroAssembler::loadPtr): (JSC::MacroAssembler::load32): (JSC::MacroAssembler::storePtr): (JSC::MacroAssembler::storePtrWithRepatch): (JSC::MacroAssembler::store32): (JSC::MacroAssembler::poke): (JSC::MacroAssembler::move): (JSC::MacroAssembler::testImm64): (JSC::MacroAssembler::jePtr): (JSC::MacroAssembler::jnePtr): (JSC::MacroAssembler::jnzPtr): (JSC::MacroAssembler::jzPtr):
  • assembler/X86Assembler.h: (JSC::X86Assembler::): (JSC::X86Assembler::cmpq_rr): (JSC::X86Assembler::cmpq_rm): (JSC::X86Assembler::cmpq_im): (JSC::X86Assembler::testq_i32m): (JSC::X86Assembler::movl_mEAX): (JSC::X86Assembler::movl_i32r): (JSC::X86Assembler::movl_EAXm): (JSC::X86Assembler::movq_rm): (JSC::X86Assembler::movq_mEAX): (JSC::X86Assembler::movq_mr): (JSC::X86Assembler::movq_i64r): (JSC::X86Assembler::movl_mr): (JSC::X86Assembler::X86InstructionFormatter::oneByteOp64): (JSC::X86Assembler::X86InstructionFormatter::immediate64):
  • interpreter/Interpreter.cpp: (JSC::Interpreter::cti_op_put_by_id_generic): (JSC::Interpreter::cti_op_get_by_id_generic): (JSC::Interpreter::cti_op_put_by_id): (JSC::Interpreter::cti_op_put_by_id_second):
  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): (JSC::JIT::privateCompile): (JSC::JIT::privateCompileCTIMachineTrampolines):
  • jit/JITCall.cpp: (JSC::JIT::compileOpCallSetupArgs): (JSC::JIT::compileOpCall):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::compileGetByIdHotPath): (JSC::JIT::compilePutByIdHotPath):
  • runtime/JSImmediate.h: (JSC::JSImmediate::makeInt):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/interpreter/Interpreter.cpp

    r39329 r39342  
    40524052#if ENABLE(JIT)
    40534053
     4054#if ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
     4055
    40544056NEVER_INLINE void Interpreter::tryCTICachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, void* returnAddress, JSValue* baseValue, const PutPropertySlot& slot)
    40554057{
     
    42024204    JIT::compileGetByIdChain(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, chain, count, slot.cachedOffset(), returnAddress);
    42034205}
     4206
     4207#endif
    42044208
    42054209#ifndef NDEBUG
     
    44314435}
    44324436
     4437void Interpreter::cti_op_put_by_id_generic(CTI_ARGS)
     4438{
     4439    CTI_STACK_HACK();
     4440
     4441    PutPropertySlot slot;
     4442    ARG_src1->put(ARG_callFrame, *ARG_id2, ARG_src3, slot);
     4443    CHECK_FOR_EXCEPTION_AT_END();
     4444}
     4445
     4446JSValue* Interpreter::cti_op_get_by_id_generic(CTI_ARGS)
     4447{
     4448    CTI_STACK_HACK();
     4449
     4450    CallFrame* callFrame = ARG_callFrame;
     4451    Identifier& ident = *ARG_id2;
     4452
     4453    JSValue* baseValue = ARG_src1;
     4454    PropertySlot slot(baseValue);
     4455    JSValue* result = baseValue->get(callFrame, ident, slot);
     4456
     4457    CHECK_FOR_EXCEPTION_AT_END();
     4458    return result;
     4459}
     4460
     4461#if ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
     4462
    44334463void Interpreter::cti_op_put_by_id(CTI_ARGS)
    44344464{
     
    44564486}
    44574487
    4458 void Interpreter::cti_op_put_by_id_generic(CTI_ARGS)
    4459 {
    4460     CTI_STACK_HACK();
    4461 
    4462     PutPropertySlot slot;
    4463     ARG_src1->put(ARG_callFrame, *ARG_id2, ARG_src3, slot);
    4464     CHECK_FOR_EXCEPTION_AT_END();
    4465 }
    4466 
    44674488void Interpreter::cti_op_put_by_id_fail(CTI_ARGS)
    44684489{
     
    45074528
    45084529    ARG_globalData->interpreter->tryCTICacheGetByID(callFrame, callFrame->codeBlock(), CTI_RETURN_ADDRESS, baseValue, ident, slot);
    4509 
    4510     CHECK_FOR_EXCEPTION_AT_END();
    4511     return result;
    4512 }
    4513 
    4514 JSValue* Interpreter::cti_op_get_by_id_generic(CTI_ARGS)
    4515 {
    4516     CTI_STACK_HACK();
    4517 
    4518     CallFrame* callFrame = ARG_callFrame;
    4519     Identifier& ident = *ARG_id2;
    4520 
    4521     JSValue* baseValue = ARG_src1;
    4522     PropertySlot slot(baseValue);
    4523     JSValue* result = baseValue->get(callFrame, ident, slot);
    45244530
    45254531    CHECK_FOR_EXCEPTION_AT_END();
     
    47114717}
    47124718
     4719#endif
     4720
    47134721JSValue* Interpreter::cti_op_instanceof(CTI_ARGS)
    47144722{
Note: See TracChangeset for help on using the changeset viewer.