Title: [214734] releases/WebKitGTK/webkit-2.16/Source/_javascript_Core
- Revision
- 214734
- Author
- carlo...@webkit.org
- Date
- 2017-04-03 00:03:52 -0700 (Mon, 03 Apr 2017)
Log Message
Merge r213876 - FTL should not flush strict arguments unless it really needs to
https://bugs.webkit.org/show_bug.cgi?id=169519
Reviewed by Mark Lam.
This is a refinement that we should have done ages ago. This kills some pointless PutStacks
in DFG SSA IR. It can sometimes unlock other optimizations.
Relanding after I fixed the special cases for CreateArguments-style nodes.
* dfg/DFGPreciseLocalClobberize.h:
(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.16/Source/_javascript_Core/ChangeLog (214733 => 214734)
--- releases/WebKitGTK/webkit-2.16/Source/_javascript_Core/ChangeLog 2017-04-03 06:51:57 UTC (rev 214733)
+++ releases/WebKitGTK/webkit-2.16/Source/_javascript_Core/ChangeLog 2017-04-03 07:03:52 UTC (rev 214734)
@@ -1,3 +1,18 @@
+2017-03-13 Filip Pizlo <fpi...@apple.com>
+
+ FTL should not flush strict arguments unless it really needs to
+ https://bugs.webkit.org/show_bug.cgi?id=169519
+
+ Reviewed by Mark Lam.
+
+ This is a refinement that we should have done ages ago. This kills some pointless PutStacks
+ in DFG SSA IR. It can sometimes unlock other optimizations.
+
+ Relanding after I fixed the special cases for CreateArguments-style nodes.
+
+ * dfg/DFGPreciseLocalClobberize.h:
+ (JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):
+
2017-03-13 Caio Lima <ticaiol...@gmail.com>
[JSC] It should be possible create a label named let when parsing Statement in non strict mode
Modified: releases/WebKitGTK/webkit-2.16/Source/_javascript_Core/dfg/DFGPreciseLocalClobberize.h (214733 => 214734)
--- releases/WebKitGTK/webkit-2.16/Source/_javascript_Core/dfg/DFGPreciseLocalClobberize.h 2017-04-03 06:51:57 UTC (rev 214733)
+++ releases/WebKitGTK/webkit-2.16/Source/_javascript_Core/dfg/DFGPreciseLocalClobberize.h 2017-04-03 07:03:52 UTC (rev 214734)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -137,7 +137,6 @@
}
};
- bool isForwardingNode = false;
switch (m_node->op()) {
case ForwardVarargs:
case CallForwardVarargs:
@@ -144,11 +143,36 @@
case ConstructForwardVarargs:
case TailCallForwardVarargs:
case TailCallForwardVarargsInlinedCaller:
- isForwardingNode = true;
- FALLTHROUGH;
case GetMyArgumentByVal:
- case GetMyArgumentByValOutOfBounds: {
-
+ case GetMyArgumentByValOutOfBounds:
+ case CreateDirectArguments:
+ case CreateScopedArguments:
+ case CreateClonedArguments:
+ case PhantomDirectArguments:
+ case PhantomClonedArguments:
+ case GetRestLength:
+ case CreateRest: {
+ bool isForwardingNode = false;
+ bool isPhantomNode = false;
+ switch (m_node->op()) {
+ case ForwardVarargs:
+ case CallForwardVarargs:
+ case ConstructForwardVarargs:
+ case TailCallForwardVarargs:
+ case TailCallForwardVarargsInlinedCaller:
+ isForwardingNode = true;
+ break;
+ case PhantomDirectArguments:
+ case PhantomClonedArguments:
+ isPhantomNode = true;
+ break;
+ default:
+ break;
+ }
+
+ if (isPhantomNode && isFTL(m_graph.m_plan.mode))
+ break;
+
if (isForwardingNode && m_node->hasArgumentsChild() && m_node->argumentsChild() && m_node->argumentsChild()->op() == PhantomNewArrayWithSpread) {
Node* arrayWithSpread = m_node->argumentsChild().node();
readNewArrayWithSpreadNode(arrayWithSpread);
@@ -194,12 +218,13 @@
m_read(VirtualRegister(inlineCallFrame->stackOffset + CallFrameSlot::argumentCount));
break;
}
-
default: {
- // All of the outermost arguments, except this, are definitely read.
- for (unsigned i = m_graph.m_codeBlock->numParameters(); i-- > 1;)
- m_read(virtualRegisterForArgument(i));
+ // All of the outermost arguments, except this, are read in sloppy mode.
+ if (!m_graph.m_codeBlock->isStrictMode()) {
+ for (unsigned i = m_graph.m_codeBlock->numParameters(); i-- > 1;)
+ m_read(virtualRegisterForArgument(i));
+ }
// The stack header is read.
for (unsigned i = 0; i < CallFrameSlot::thisArgument; ++i)
@@ -207,8 +232,10 @@
// Read all of the inline arguments and call frame headers that we didn't already capture.
for (InlineCallFrame* inlineCallFrame = m_node->origin.semantic.inlineCallFrame; inlineCallFrame; inlineCallFrame = inlineCallFrame->getCallerInlineFrameSkippingTailCalls()) {
- for (unsigned i = inlineCallFrame->arguments.size(); i-- > 1;)
- m_read(VirtualRegister(inlineCallFrame->stackOffset + virtualRegisterForArgument(i).offset()));
+ if (!inlineCallFrame->isStrictMode()) {
+ for (unsigned i = inlineCallFrame->arguments.size(); i-- > 1;)
+ m_read(VirtualRegister(inlineCallFrame->stackOffset + virtualRegisterForArgument(i).offset()));
+ }
if (inlineCallFrame->isClosureCall)
m_read(VirtualRegister(inlineCallFrame->stackOffset + CallFrameSlot::callee));
if (inlineCallFrame->isVarargs())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes