Ignore:
Timestamp:
Oct 2, 2013, 7:44:18 PM (12 years ago)
Author:
[email protected]
Message:

Make LLINT exception stack unwinding consistent with the JIT.
https://bugs.webkit.org/show_bug.cgi?id=122255.

Reviewed by Filip Pizlo.

Previously, the CommonSlowPaths code is expected to behave in an
inconsistent way in terms of whether to unwind the stack when handling
exceptions or not. For the LLINT, the slow path should unwind the stack
before returning. For the JIT, the slow path should not unwind the stack.
This can result in the stack being unwound twice when the exception
being handled is a TerminationException.

This patch fixes the LLINT's expectation so that it expects the same
slow path behavior as the JIT does.

  • llint/LLIntExceptions.cpp:

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

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LLIntSlowPaths.h:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPathsExceptions.cpp:

(JSC::CommonSlowPaths::interpreterThrowInCaller):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp

    r156668 r156818  
    3838#include "Interpreter.h"
    3939#include "JIT.h"
     40#include "JITExceptions.h"
    4041#include "JSActivation.h"
    4142#include "JSCJSValue.h"
     
    12681269}
    12691270
     1271LLINT_SLOW_PATH_DECL(slow_path_handle_exception)
     1272{
     1273    LLINT_BEGIN_NO_SET_PC();
     1274    ASSERT(vm.exception());
     1275    genericUnwind(&vm, exec, vm.exception());
     1276    LLINT_END_IMPL();
     1277}
     1278
    12701279LLINT_SLOW_PATH_DECL(slow_path_resolve_scope)
    12711280{
Note: See TracChangeset for help on using the changeset viewer.