Ignore:
Timestamp:
Dec 9, 2008, 4:26:13 PM (16 years ago)
Author:
[email protected]
Message:

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

Reviewed by Geoffrey Garen.

Remove unnecessary extra lookup when throwing an exception.
We used to first lookup the target offset using getHandlerForVPC
and then we would lookup the native code stub using
nativeExceptionCodeForHandlerVPC. Instead, we can just pass around
the HandlerInfo.

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::handlerForVPC): Return the HandlerInfo.
  • bytecode/CodeBlock.h: Remove nativeExceptionCodeForHandlerVPC.
  • interpreter/Interpreter.cpp: (JSC::Interpreter::throwException): Return a HandlerInfo instead of and Instruction offset. (JSC::Interpreter::privateExecute): Get the offset from HandlerInfo. (JSC::Interpreter::cti_op_throw): Get the native code from the HandleInfo. (JSC::Interpreter::cti_vm_throw): Ditto.
  • interpreter/Interpreter.h:
File:
1 edited

Legend:

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

    r39083 r39156  
    5151    class ScopeChainNode;
    5252    class SamplingTool;
     53    struct HandlerInfo;
    5354
    5455#if ENABLE(JIT)
     
    302303
    303304        NEVER_INLINE bool unwindCallFrame(CallFrame*&, JSValue*, const Instruction*&, CodeBlock*&);
    304         NEVER_INLINE Instruction* throwException(CallFrame*&, JSValue*&, const Instruction*, bool);
     305        NEVER_INLINE HandlerInfo* throwException(CallFrame*&, JSValue*&, const Instruction*, bool);
    305306        NEVER_INLINE bool resolveBaseAndFunc(CallFrame*, Instruction*, JSValue*& exceptionValue);
    306307
Note: See TracChangeset for help on using the changeset viewer.