WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
the patch
blah.patch (text/plain), 3.25 KB, created by
Filip Pizlo
on 2014-02-19 23:45:59 PST
(
hide
)
Description:
the patch
Filename:
MIME Type:
Creator:
Filip Pizlo
Created:
2014-02-19 23:45:59 PST
Size:
3.25 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 164416) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,16 @@ >+2014-02-19 Filip Pizlo <fpizlo@apple.com> >+ >+ FTL should not emit stack overflow checks in leaf functions >+ https://bugs.webkit.org/show_bug.cgi?id=129085 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Miniscule (0.5%) speed-up on V8v7. >+ >+ * ftl/FTLLowerDFGToLLVM.cpp: >+ (JSC::FTL::LowerDFGToLLVM::lower): >+ (JSC::FTL::LowerDFGToLLVM::didOverflowStack): >+ > 2014-02-19 ChangSeok Oh <changseok.oh@collabora.com> > > Unreviewed build fix after r164396 >Index: Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp >=================================================================== >--- Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp (revision 164415) >+++ Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp (working copy) >@@ -136,9 +136,9 @@ public: > m_tagMask = m_out.constInt64(TagMask); > > m_out.storePtr(m_out.constIntPtr(codeBlock()), addressFor(JSStack::CodeBlock)); >+ > m_out.branch( >- m_out.below(m_callFrame, m_out.loadPtr(m_out.absolute(vm().addressOfFTLStackLimit()))), >- rarely(stackOverflow), usually(lowBlock(m_graph.block(0)))); >+ didOverflowStack(), rarely(stackOverflow), usually(lowBlock(m_graph.block(0)))); > > m_out.appendTo(stackOverflow, m_handleExceptions); > vmCall(m_out.operation(operationThrowStackOverflowError), m_callFrame, m_out.constIntPtr(codeBlock()), NoExceptions); >@@ -3700,6 +3700,42 @@ private: > m_out.store64(m_out.add(m_out.load64(counter), m_out.constInt64(1)), counter); > } > >+ LValue didOverflowStack() >+ { >+ // This does a very simple leaf function analysis. The invariant of FTL call >+ // frames is that the caller had already done enough of a stack check to >+ // prove that this call frame has enough stack to run, and also enough stack >+ // to make runtime calls. So, we only need to stack check when making calls >+ // to other JS functions. If we don't find such calls then we don't need to >+ // do any stack checks. >+ >+ for (BlockIndex blockIndex = 0; blockIndex < m_graph.numBlocks(); ++blockIndex) { >+ BasicBlock* block = m_graph.block(blockIndex); >+ if (!block) >+ continue; >+ >+ for (unsigned nodeIndex = block->size(); nodeIndex--;) { >+ Node* node = block->at(nodeIndex); >+ >+ switch (node->op()) { >+ case GetById: >+ case PutById: >+ case Call: >+ case Construct: >+ return m_out.below( >+ m_callFrame, >+ m_out.loadPtr( >+ m_out.absolute(vm().addressOfFTLStackLimit()))); >+ >+ default: >+ break; >+ } >+ } >+ } >+ >+ return m_out.booleanFalse; >+ } >+ > LValue getById(LValue base) > { > StringImpl* uid = m_graph.identifiers()[m_node->identifierNumber()];
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
msaboff
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 129085
: 224721