Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[DOMJIT] Not emit exception case if it is not necessary
https://bugs.webkit.org/show_bug.cgi?id=163589

Reviewed by Sam Weinig.

We should not emit exception case if we do not use the slow path calls.
For example, nodeType accessor does not use the slow path calls.

* bytecode/PolymorphicAccess.cpp:
(JSC::AccessCase::emitDOMJITGetter):


Canonical link: https://commits.webkit.org/181378@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Constellation committed Oct 18, 2016
1 parent 375f0aa commit 63c14f7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
13 changes: 13 additions & 0 deletions Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,16 @@
2016-10-18 Yusuke Suzuki <utatane.tea@gmail.com>

[DOMJIT] Not emit exception case if it is not necessary
https://bugs.webkit.org/show_bug.cgi?id=163589

Reviewed by Sam Weinig.

We should not emit exception case if we do not use the slow path calls.
For example, nodeType accessor does not use the slow path calls.

* bytecode/PolymorphicAccess.cpp:
(JSC::AccessCase::emitDOMJITGetter):

2016-10-18 Caitlin Potter <caitp@igalia.com>

[JSC] ES6 Method functions should not have prototype
Expand Down
8 changes: 5 additions & 3 deletions Source/JavaScriptCore/bytecode/PolymorphicAccess.cpp
Expand Up @@ -1535,9 +1535,11 @@ void AccessCase::emitDOMJITGetter(AccessGenerationState& state, GPRReg baseForGe
state.succeed();

CCallHelpers::JumpList exceptions = params.emitSlowPathCalls(state, registersToSpillForCCall, jit);
exceptions.link(&jit);
allocator.restoreReusedRegistersByPopping(jit, preservedState);
state.emitExplicitExceptionHandler();
if (!exceptions.empty()) {
exceptions.link(&jit);
allocator.restoreReusedRegistersByPopping(jit, preservedState);
state.emitExplicitExceptionHandler();
}
}

PolymorphicAccess::PolymorphicAccess() { }
Expand Down

0 comments on commit 63c14f7

Please sign in to comment.