Ignore:
Timestamp:
Oct 18, 2013, 9:25:02 AM (12 years ago)
Author:
[email protected]
Message:

Change native function call stubs to use JIT operations instead of ctiVMHandleException
https://bugs.webkit.org/show_bug.cgi?id=122982

Reviewed by Geoffrey Garen.

Change ctiVMHandleException to operationVMHandleException. Change all exception operations to
return the catch callFrame and entryPC via vm.callFrameForThrow and vm.targetMachinePCForThrow.
This removed calling convention headaches, fixing https://bugs.webkit.org/show_bug.cgi?id=122980
in the process.

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileExceptionHandlers):

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::jumpToExceptionHandler):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileExceptionHandlers):

  • jit/JIT.h:
  • jit/JITExceptions.cpp:

(JSC::genericUnwind):

  • jit/JITExceptions.h:
  • jit/JITInlines.h:

(JSC::JIT::callOperationNoExceptionCheck):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_throw):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileCTINativeCall):
(JSC::JIT::emit_op_throw):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/JITStubs.cpp:
  • jit/JITStubs.h:
  • jit/JITStubsARM.h:
  • jit/JITStubsARM64.h:
  • jit/JITStubsARMv7.h:
  • jit/JITStubsMIPS.h:
  • jit/JITStubsMSVC64.asm:
  • jit/JITStubsSH4.h:
  • jit/JITStubsX86.h:
  • jit/JITStubsX86_64.h:
  • jit/Repatch.cpp:

(JSC::tryBuildGetByIDList):

  • jit/SlowPathCall.h:

(JSC::JITSlowPathCall::call):

  • jit/ThunkGenerators.cpp:

(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::nativeForGenerator):

  • runtime/VM.h:

(JSC::VM::callFrameForThrowOffset):
(JSC::VM::targetMachinePCForThrowOffset):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITExceptions.cpp

    r156242 r157636  
    3939namespace JSC {
    4040
    41 #if USE(JSVALUE32_64)
    42 EncodedExceptionHandler encode(ExceptionHandler handler)
    43 {
    44     ExceptionHandlerUnion u;
    45     u.handler = handler;
    46     return u.encodedHandler;
    47 }
    48 #endif
    49 
    50 ExceptionHandler uncaughtExceptionHandler()
    51 {
    52     void* catchRoutine = FunctionPtr(LLInt::getCodePtr(ctiOpThrowNotCaught)).value();
    53     ExceptionHandler exceptionHandler = { 0, catchRoutine};
    54     return exceptionHandler;
    55 }
    56 
    57 ExceptionHandler genericUnwind(VM* vm, ExecState* callFrame, JSValue exceptionValue)
     41void genericUnwind(VM* vm, ExecState* callFrame, JSValue exceptionValue)
    5842{
    5943    RELEASE_ASSERT(exceptionValue);
     
    7357   
    7458    RELEASE_ASSERT(catchRoutine);
    75     ExceptionHandler exceptionHandler = { callFrame, catchRoutine};
    76     return exceptionHandler;
    7759}
    7860
Note: See TracChangeset for help on using the changeset viewer.