Ignore:
Timestamp:
Jun 18, 2010, 1:14:23 PM (15 years ago)
Author:
[email protected]
Message:

2010-06-17 Oliver Hunt <[email protected]>

Reviewed by Sam Weinig.

Don't throw away exception information for functions that use exceptions
https://bugs.webkit.org/show_bug.cgi?id=40786

Simple patch to stop JSC from throwing away the exception information
of a function that uses "exceptiony" features like try and throw. This
is a speed up for catching expressions but it's difficult to quantify as
the old cost of reparsing is amortised over all exceptions caught in the
effected function.

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
  • bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::generate): (JSC::BytecodeGenerator::emitCatch):
  • bytecompiler/BytecodeGenerator.h: (JSC::BytecodeGenerator::emitThrow):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.h

    r60762 r61430  
    364364
    365365        RegisterID* emitCatch(RegisterID*, Label* start, Label* end);
    366         void emitThrow(RegisterID* exc) { emitUnaryNoDstOp(op_throw, exc); }
     366        void emitThrow(RegisterID* exc)
     367        {
     368            m_usesExceptions = true;
     369            emitUnaryNoDstOp(op_throw, exc);
     370        }
     371
    367372        RegisterID* emitNewError(RegisterID* dst, bool isReferenceError, JSValue message);
    368373        void emitPushNewScope(RegisterID* dst, const Identifier& property, RegisterID* value);
     
    553558        unsigned m_emitNodeDepth;
    554559
     560        bool m_usesExceptions;
    555561        bool m_regeneratingForExceptionInfo;
    556562        CodeBlock* m_codeBlockBeingRegeneratedFrom;
Note: See TracChangeset for help on using the changeset viewer.