Ignore:
Timestamp:
Oct 27, 2010, 1:46:09 PM (15 years ago)
Author:
[email protected]
Message:

Bug 48365 - Remove output parameters from JITStackFrame

Reviewed by Oliver Hunt.

The JIT stub functions presently use the stackframe to provide a couple of additional return values.

  • In the case of uncaught exceptions the exception value is returned on the stackframe.exception property.
  • In the case of caught exceptions the updated value for the callFrame register is returned on the stackframe.callFrame property.

Change exception returns such that exceptions are always returned on JSGlobalData::exception.
Change op_catch such that the new CallFrame value is returned from op_throw / vm_throw in regT0.

(JSC::evaluateInGlobalCallFrame):

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::evaluate):

  • interpreter/CachedCall.h:

(JSC::CachedCall::CachedCall):
(JSC::CachedCall::call):

  • interpreter/CallFrame.h:

(JSC::ExecState::exception):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::callEval):
(JSC::Interpreter::Interpreter):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::privateExecute):

  • interpreter/Interpreter.h:
  • jit/JITCode.h:

(JSC::JITCode::execute):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_catch):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_catch):

  • jit/JITStubs.cpp:

(JSC::ctiTrampoline):
(JSC::jitThrow):
(JSC::DEFINE_STUB_FUNCTION):

  • jit/JITStubs.h:
  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):

  • runtime/CallData.cpp:

(JSC::call):

  • runtime/Completion.cpp:

(JSC::evaluate):

  • runtime/ConstructData.cpp:

(JSC::construct):

  • runtime/ExceptionHelpers.cpp:

(JSC::createErrorForInvalidGlobalAssignment):
(JSC::throwOutOfMemoryError):
(JSC::throwStackOverflowError):

  • runtime/ExceptionHelpers.h:
  • runtime/JSArray.cpp:

(JSC::JSArray::sort):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncEval):

  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncReplace):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/interpreter/CachedCall.h

    r51672 r70703  
    3535    class CachedCall : public Noncopyable {
    3636    public:
    37         CachedCall(CallFrame* callFrame, JSFunction* function, int argCount, JSValue* exception)
     37        CachedCall(CallFrame* callFrame, JSFunction* function, int argCount)
    3838            : m_valid(false)
    3939            , m_interpreter(callFrame->interpreter())
    40             , m_exception(exception)
    4140            , m_globalObjectScope(callFrame, function->scope().globalObject())
    4241        {
    4342            ASSERT(!function->isHostFunction());
    44             m_closure = m_interpreter->prepareForRepeatCall(function->jsExecutable(), callFrame, function, argCount, function->scope().node(), exception);
    45             m_valid = !*exception;
     43            m_closure = m_interpreter->prepareForRepeatCall(function->jsExecutable(), callFrame, function, argCount, function->scope().node());
     44            m_valid = !callFrame->hadException();
    4645        }
    4746       
     
    4948        {
    5049            ASSERT(m_valid);
    51             return m_interpreter->execute(m_closure, m_exception);
     50            return m_interpreter->execute(m_closure);
    5251        }
    5352        void setThis(JSValue v) { m_closure.setArgument(0, v); }
     
    7069        bool m_valid;
    7170        Interpreter* m_interpreter;
    72         JSValue* m_exception;
    7371        DynamicGlobalObjectScope m_globalObjectScope;
    7472        CallFrameClosure m_closure;
Note: See TracChangeset for help on using the changeset viewer.