Ignore:
Timestamp:
Sep 21, 2013, 10:00:45 PM (12 years ago)
Author:
[email protected]
Message:

Interpreter::unwind() has no need for the bytecodeOffset
https://bugs.webkit.org/show_bug.cgi?id=121755

Reviewed by Oliver Hunt.

It was only using the bytecodeOffset for some debugger stuff, but the debugger could
just get the bytecodeOffset the same way the rest of the machinery does: by using the
CallFrame's location.

It turns out that a lot of really ugly code was in place just to supply this
bytecodeOffset. This patch kills most of that code, and allows us to kill even more
code in a future patch - though most likely that killage will involve further
refactorings as well, see https://bugs.webkit.org/show_bug.cgi?id=121734.

  • dfg/DFGOperations.cpp:
  • interpreter/CallFrame.cpp:

(JSC::CallFrame::bytecodeOffset):
(JSC::CallFrame::codeOrigin):

  • interpreter/CallFrame.h:
  • interpreter/Interpreter.cpp:

(JSC::Interpreter::unwind):

  • interpreter/Interpreter.h:
  • jit/JITExceptions.cpp:

(JSC::genericUnwind):

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

(JSC::DEFINE_STUB_FUNCTION):
(JSC::cti_vm_handle_exception):

  • llint/LLIntExceptions.cpp:

(JSC::LLInt::doThrow):
(JSC::LLInt::returnToThrow):
(JSC::LLInt::callToThrow):

  • llint/LLIntExceptions.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPathsExceptions.cpp:

(JSC::CommonSlowPaths::interpreterThrowInCaller):

  • runtime/CommonSlowPathsExceptions.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r156237 r156242  
    19071907DFGHandlerEncoded DFG_OPERATION lookupExceptionHandler(ExecState* exec, uint32_t callIndex)
    19081908{
     1909    // FIXME: This isn't needed anymore.
     1910    // https://bugs.webkit.org/show_bug.cgi?id=121734
     1911    UNUSED_PARAM(callIndex);
     1912   
    19091913    VM* vm = &exec->vm();
    19101914    NativeCallFrameTracer tracer(vm, exec);
     
    19131917    ASSERT(exceptionValue);
    19141918   
    1915     unsigned vPCIndex = exec->codeBlock()->bytecodeOffsetForCallAtIndex(callIndex);
    1916     ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue, vPCIndex);
     1919    ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue);
    19171920    ASSERT(handler.catchRoutine);
    19181921    return dfgHandlerEncoded(handler.callFrame, handler.catchRoutine);
     
    19211924DFGHandlerEncoded DFG_OPERATION lookupExceptionHandlerInStub(ExecState* exec, StructureStubInfo* stubInfo)
    19221925{
     1926    // FIXME: This isn't needed anymore.
     1927    // https://bugs.webkit.org/show_bug.cgi?id=121734
     1928    UNUSED_PARAM(stubInfo);
     1929   
    19231930    VM* vm = &exec->vm();
    19241931    NativeCallFrameTracer tracer(vm, exec);
     
    19271934    ASSERT(exceptionValue);
    19281935   
    1929     CodeOrigin codeOrigin = stubInfo->codeOrigin;
    1930     while (codeOrigin.inlineCallFrame)
    1931         codeOrigin = codeOrigin.inlineCallFrame->caller;
    1932    
    1933     ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue, codeOrigin.bytecodeIndex);
     1936    ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue);
    19341937    ASSERT(handler.catchRoutine);
    19351938    return dfgHandlerEncoded(handler.callFrame, handler.catchRoutine);
Note: See TracChangeset for help on using the changeset viewer.