Changeset 39265 in webkit for trunk/JavaScriptCore/jit


Ignore:
Timestamp:
Dec 12, 2008, 7:03:07 PM (16 years ago)
Author:
[email protected]
Message:

2008-12-12 Sam Weinig <[email protected]>

Reviewed by Cameron Zwarich.

<rdar://problem/6428342> Look into feasibility of discarding bytecode after native codegen

Move more JIT functionality to using offsets into the Instruction buffer
instead of raw pointers. Two to go!

  • interpreter/Interpreter.cpp: (JSC::bytecodeOffsetForPC): Rename from vPCForPC. (JSC::Interpreter::resolve): Pass offset to exception helper. (JSC::Interpreter::resolveSkip): Ditto. (JSC::Interpreter::resolveGlobal): Ditto. (JSC::Interpreter::resolveBaseAndProperty): Ditto. (JSC::Interpreter::resolveBaseAndFunc): Ditto. (JSC::isNotObject): Ditto. (JSC::Interpreter::unwindCallFrame): Call bytecodeOffsetForPC. (JSC::Interpreter::throwException): Use offsets instead of vPCs. (JSC::Interpreter::privateExecute): Pass offset to exception helper. (JSC::Interpreter::retrieveLastCaller): Ditto. (JSC::Interpreter::cti_op_instanceof): Ditto. (JSC::Interpreter::cti_op_call_NotJSFunction): Ditto. (JSC::Interpreter::cti_op_resolve): Pass offset to exception helper. (JSC::Interpreter::cti_op_construct_NotJSConstruct): Ditto. (JSC::Interpreter::cti_op_resolve_func): Ditto. (JSC::Interpreter::cti_op_resolve_skip): Ditto. (JSC::Interpreter::cti_op_resolve_global): Ditto. (JSC::Interpreter::cti_op_resolve_with_base): Ditto. (JSC::Interpreter::cti_op_throw): Ditto. (JSC::Interpreter::cti_op_in): Ditto. (JSC::Interpreter::cti_vm_throw): Ditto.
  • interpreter/Interpreter.h:
  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): Don't pass unnecessary vPC to stub.
  • jit/JIT.h: Remove ARG_instr1 - ARG_instr3 and ARG_instr5 - ARG_instr6.
  • jit/JITCall.cpp: (JSC::JIT::compileOpCallEvalSetupArgs): Don't pass unnecessary vPC to stub.. (JSC::JIT::compileOpConstructSetupArgs): Ditto.
  • runtime/ExceptionHelpers.cpp: (JSC::createUndefinedVariableError): Take an offset instead of vPC. (JSC::createInvalidParamError): Ditto. (JSC::createNotAConstructorError): Ditto. (JSC::createNotAFunctionError): Ditto. (JSC::createNotAnObjectError): Ditto.
  • runtime/ExceptionHelpers.h:
Location:
trunk/JavaScriptCore/jit
Files:
3 edited

Legend:

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

    r39261 r39265  
    722722            emitPutCTIArgConstant(reinterpret_cast<unsigned>(ident), 4);
    723723            emitPutCTIArgConstant(currentIndex, 8);
    724             emitPutCTIArgConstant(reinterpret_cast<unsigned>(instruction + i), 12);
    725724            emitCTICall(i, Interpreter::cti_op_resolve_global);
    726725            emitPutVirtualRegister(instruction[i + 1].u.operand);
  • trunk/JavaScriptCore/jit/JIT.h

    r39261 r39265  
    7575#define ARG_regexp1 static_cast<RegExp*>(ARGS[1])
    7676#define ARG_pni1 static_cast<JSPropertyNameIterator*>(ARGS[1])
    77 #define ARG_instr1 static_cast<Instruction*>(ARGS[1])
    78 #define ARG_instr2 static_cast<Instruction*>(ARGS[2])
    79 #define ARG_instr3 static_cast<Instruction*>(ARGS[3])
    8077#define ARG_instr4 static_cast<Instruction*>(ARGS[4])
    81 #define ARG_instr5 static_cast<Instruction*>(ARGS[5])
    82 #define ARG_instr6 static_cast<Instruction*>(ARGS[6])
    8378#define ARG_returnAddress2 static_cast<void*>(ARGS[2])
    8479#define ARG_codeBlock4 static_cast<CodeBlock*>(ARGS[4])
  • trunk/JavaScriptCore/jit/JITCall.cpp

    r39261 r39265  
    102102    emitPutCTIArgConstant(registerOffset, 4);
    103103    emitPutCTIArgConstant(argCount, 8);
    104     emitPutCTIArgConstant(reinterpret_cast<unsigned>(instruction), 12);
    105104}
    106105
     
    118117    emitPutCTIArgFromVirtualRegister(proto, 12, X86::eax);
    119118    emitPutCTIArgConstant(thisRegister, 16);
    120     emitPutCTIArgConstant(reinterpret_cast<unsigned>(instruction), 20);
    121119}
    122120
Note: See TracChangeset for help on using the changeset viewer.