Changeset 37386 in webkit for trunk/JavaScriptCore/VM/CTI.h


Ignore:
Timestamp:
Oct 7, 2008, 1:27:50 PM (17 years ago)
Author:
[email protected]
Message:

2008-10-07 Gavin Barraclough <[email protected]>

Reviewed by Oliver Hunt.

Move callframe initialization into JIT code, again.


As a part of the restructuring the second result from functions is now
returned in edx, allowing the new value of 'r' to be returned via a
register, and stored to the stack from JIT code, too.

4.5% progression on v8-tests. (3% in their harness)

  • VM/CTI.cpp: (JSC::): (JSC::CTI::emitCall): (JSC::CTI::compileOpCall): (JSC::CTI::privateCompileMainPass): (JSC::CTI::privateCompileSlowCases): (JSC::CTI::privateCompile):
  • VM/CTI.h: (JSC::CallRecord::CallRecord):
  • VM/Machine.cpp: (JSC::Machine::cti_op_call_JSFunction): (JSC::Machine::cti_op_construct_JSConstruct): (JSC::Machine::cti_op_resolve_func): (JSC::Machine::cti_op_post_inc): (JSC::Machine::cti_op_resolve_with_base): (JSC::Machine::cti_op_post_dec):
  • VM/Machine.h:
  • kjs/JSFunction.h:
  • kjs/ScopeChain.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/CTI.h

    r37316 r37386  
    4646#endif
    4747
    48 #define CTI_ARGS_2ndResult 0x08
    49 
    5048#define CTI_ARGS_code 0x0C
    5149#define CTI_ARGS_registerFile 0x0D
     
    6361
    6462#define ARG_setR(newR) (*(Register**)&(ARGS)[CTI_ARGS_r] = newR)
    65 #define ARG_set2ndResult(new2ndResult) (*(JSValue**)&(ARGS)[CTI_ARGS_2ndResult] = new2ndResult)
    6663
    6764#define ARG_src1 ((JSValue*)((ARGS)[1]))
     
    109106    struct OperandTypes;
    110107
     108    struct VoidPtrPair { void* first; void* second; };
     109
    111110    typedef JSValue* (*CTIHelper_j)(CTI_ARGS);
    112111    typedef JSPropertyNameIterator* (*CTIHelper_p)(CTI_ARGS);
     
    114113    typedef void* (*CTIHelper_s)(CTI_ARGS);
    115114    typedef int (*CTIHelper_b)(CTI_ARGS);
     115    typedef VoidPtrPair (*CTIHelper_2)(CTI_ARGS);
    116116
    117117    struct CallRecord {
     
    153153       
    154154        CallRecord(X86Assembler::JmpSrc f, CTIHelper_b t, unsigned i)
     155            : from(f)
     156            , to((void*)t)
     157            , opcodeIndex(i)
     158        {
     159        }
     160
     161        CallRecord(X86Assembler::JmpSrc f, CTIHelper_2 t, unsigned i)
    155162            : from(f)
    156163            , to((void*)t)
     
    351358        enum CompileOpCallType { OpCallNormal, OpCallEval, OpConstruct };
    352359        void compileOpCall(Instruction* instruction, unsigned i, CompileOpCallType type = OpCallNormal);
     360        void compileOpCallInitializeCallFrame(unsigned callee, unsigned argCount);
    353361        enum CompileOpStrictEqType { OpStrictEq, OpNStrictEq };
    354362        void compileOpStrictEq(Instruction* instruction, unsigned i, CompileOpStrictEqType type);
     
    393401        X86Assembler::JmpSrc emitCall(unsigned opcodeIndex, CTIHelper_j);
    394402        X86Assembler::JmpSrc emitCall(unsigned opcodeIndex, CTIHelper_p);
    395         X86Assembler::JmpSrc emitCall(unsigned opcodeIndex, CTIHelper_b);
    396403        X86Assembler::JmpSrc emitCall(unsigned opcodeIndex, CTIHelper_v);
    397404        X86Assembler::JmpSrc emitCall(unsigned opcodeIndex, CTIHelper_s);
    398        
     405        X86Assembler::JmpSrc emitCall(unsigned opcodeIndex, CTIHelper_b);
     406        X86Assembler::JmpSrc emitCall(unsigned opcodeIndex, CTIHelper_2);
     407
    399408        void emitGetVariableObjectRegister(X86Assembler::RegisterID variableObject, int index, X86Assembler::RegisterID dst);
    400409        void emitPutVariableObjectRegister(X86Assembler::RegisterID src, X86Assembler::RegisterID variableObject, int index);
Note: See TracChangeset for help on using the changeset viewer.