summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-06-02 12:07:06 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-06-02 12:07:20 +0200
commit8eba6d043d51b2f1dbabc042bb207e8677ef11f3 (patch)
tree7fb24a5d406ccd5469bc59c34732b600c3fd2b1d /Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp
parent8b00fdada15a53c7764472435cffe04f22c3522f (diff)
parentdbbef9bee537a88a9d3e1656f4b7935023aacacf (diff)
downloadqtwebkit-8eba6d043d51b2f1dbabc042bb207e8677ef11f3.tar.gz
Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: I2e9acbd80e4a654a1fb4a5a9d79bb6bbaf5b1be8
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp')
-rw-r--r--Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp b/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp
index cbab4e8c8..ec7515eec 100644
--- a/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp
+++ b/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp
@@ -123,12 +123,9 @@ public:
bool changed = false;
// Record which arguments are known to escape no matter what.
- for (unsigned i = codeBlock()->inlineCallFrames().size(); i--;) {
- InlineCallFrame* inlineCallFrame = &codeBlock()->inlineCallFrames()[i];
- if (m_graph.m_executablesWhoseArgumentsEscaped.contains(
- m_graph.executableFor(inlineCallFrame)))
- m_createsArguments.add(inlineCallFrame);
- }
+ for (unsigned i = codeBlock()->inlineCallFrames().size(); i--;)
+ pruneObviousArgumentCreations(&codeBlock()->inlineCallFrames()[i]);
+ pruneObviousArgumentCreations(0); // the machine call frame.
// Create data for variable access datas that we will want to analyze.
for (unsigned i = m_graph.m_variableAccessData.size(); i--;) {
@@ -700,6 +697,14 @@ private:
NullableHashTraits<VariableAccessData*> > m_argumentsAliasing;
HashSet<VariableAccessData*> m_isLive;
+ void pruneObviousArgumentCreations(InlineCallFrame* inlineCallFrame)
+ {
+ ScriptExecutable* executable = jsCast<ScriptExecutable*>(m_graph.executableFor(inlineCallFrame));
+ if (m_graph.m_executablesWhoseArgumentsEscaped.contains(executable)
+ || executable->isStrictMode())
+ m_createsArguments.add(inlineCallFrame);
+ }
+
void observeBadArgumentsUse(Node* node)
{
if (!node)