Fail FTL compilation if the required stack is too big
https://bugs.webkit.org/show_bug.cgi?id=128560
Reviewed by Filip Pizlo.
Added StackSize struct to FTLStackMaps and populated it. Added and updated
related dump functions. Use the stack size found at the end of the compilation
to compare against the value of a new option, llvmMaxStackSize. We fail the
compile if the function's stack size is greater than llvmMaxStackSize.
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* ftl/FTLStackMaps.cpp:
(JSC::FTL::StackMaps::StackSize::parse):
(JSC::FTL::StackMaps::StackSize::dump):
(JSC::FTL::StackMaps::parse):
(JSC::FTL::StackMaps::dump):
(JSC::FTL::StackMaps::dumpMultiline):
(JSC::FTL::StackMaps::getStackSize):
* ftl/FTLStackMaps.h:
* runtime/Options.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5 files changed