Ignore:
Timestamp:
May 8, 2009, 1:51:53 PM (16 years ago)
Author:
[email protected]
Message:

2009-05-08 Geoffrey Garen <[email protected]>

Reviewed by Gavin Barraclough.


More abstraction for JITStub calls from JITed code.


Added a JITStubCall class that automatically handles things like assigning
arguments to different stack slots and storing return values. Deployed
the class in about a billion places. A bunch more places remain to be
fixed up, but this is a good stopping point for now.

  • jit/JIT.cpp: (JSC::JIT::emitTimeoutCheck): (JSC::JIT::privateCompileMainPass): (JSC::JIT::privateCompileSlowCases): (JSC::JIT::privateCompile):
  • jit/JIT.h: (JSC::JIT::JSRInfo::JSRInfo): (JSC::JITStubCall::JITStubCall): (JSC::JITStubCall::addArgument): (JSC::JITStubCall::call): (JSC::JITStubCall::): (JSC::CallEvalJITStub::CallEvalJITStub):
  • jit/JITArithmetic.cpp: (JSC::JIT::compileFastArithSlow_op_lshift): (JSC::JIT::compileFastArithSlow_op_rshift): (JSC::JIT::compileFastArithSlow_op_jnless): (JSC::JIT::compileFastArithSlow_op_bitand): (JSC::JIT::compileFastArithSlow_op_mod): (JSC::JIT::compileFastArith_op_mod): (JSC::JIT::compileFastArithSlow_op_post_inc): (JSC::JIT::compileFastArithSlow_op_post_dec): (JSC::JIT::compileFastArithSlow_op_pre_inc): (JSC::JIT::compileFastArithSlow_op_pre_dec): (JSC::JIT::compileFastArith_op_add): (JSC::JIT::compileFastArith_op_mul): (JSC::JIT::compileFastArith_op_sub): (JSC::JIT::compileBinaryArithOpSlowCase): (JSC::JIT::compileFastArithSlow_op_add): (JSC::JIT::compileFastArithSlow_op_mul):
  • jit/JITCall.cpp: (JSC::JIT::compileOpCall): (JSC::):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::compileGetByIdHotPath): (JSC::JIT::compilePutByIdHotPath): (JSC::JIT::compileGetByIdSlowCase): (JSC::JIT::compilePutByIdSlowCase):
  • jit/JITStubs.cpp: (JSC::JITStubs::cti_op_resolve_func): (JSC::JITStubs::cti_op_resolve_with_base):
File:
1 edited

Legend:

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

    r43401 r43409  
    460460        return 0; \
    461461    } while (0)
    462 #define VM_THROW_EXCEPTION_2() \
    463     do { \
    464         VM_THROW_EXCEPTION_AT_END(); \
    465         RETURN_PAIR(0, 0); \
    466     } while (0)
    467462#define VM_THROW_EXCEPTION_AT_END() \
    468463    returnToThrowTrampoline(stackFrame.globalData, STUB_RETURN_ADDRESS, STUB_RETURN_ADDRESS)
     
    14291424    unsigned vPCIndex = codeBlock->getBytecodeIndex(callFrame, STUB_RETURN_ADDRESS);
    14301425    stackFrame.globalData->exception = createUndefinedVariableError(callFrame, ident, vPCIndex, codeBlock);
    1431     VM_THROW_EXCEPTION_2();
     1426    VM_THROW_EXCEPTION_AT_END();
     1427    RETURN_PAIR(0, 0);
    14321428}
    14331429
     
    19551951    unsigned vPCIndex = codeBlock->getBytecodeIndex(callFrame, STUB_RETURN_ADDRESS);
    19561952    stackFrame.globalData->exception = createUndefinedVariableError(callFrame, ident, vPCIndex, codeBlock);
    1957     VM_THROW_EXCEPTION_2();
     1953    VM_THROW_EXCEPTION_AT_END();
     1954    RETURN_PAIR(0, 0);
    19581955}
    19591956
Note: See TracChangeset for help on using the changeset viewer.