Bytecodegenerator emits crappy code for returns in a lexical scope.
authorsaambarati1@gmail.com <saambarati1@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Aug 2015 21:45:20 +0000 (21:45 +0000)
committersaambarati1@gmail.com <saambarati1@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Aug 2015 21:45:20 +0000 (21:45 +0000)
commit655065370c07b53f2b699d64858d282ea260dae7
tree556f677fef39a88086187f4372c2be7fe1793ef4
parent6855db8f680f7e13b13bb1968c82ca9f6f2e4deb
Bytecodegenerator emits crappy code for returns in a lexical scope.
https://bugs.webkit.org/show_bug.cgi?id=147688

Reviewed by Mark Lam.

When returning, we only need to emit complex pop scopes if we're in
a finally block. Otherwise, we can just return like normal. This saves
us from inefficiently emitting unnecessary pop scopes.

* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::isInFinallyBlock):
(JSC::BytecodeGenerator::hasFinaliser): Deleted.
* bytecompiler/NodesCodegen.cpp:
(JSC::ReturnNode::emitBytecode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187991 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp