Title: [186136] trunk/Source/_javascript_Core
- Revision
- 186136
- Author
- [email protected]
- Date
- 2015-06-30 15:19:05 -0700 (Tue, 30 Jun 2015)
Log Message
Allow object allocation sinking through GetScope, GetExecutable and SkipScope nodes
https://bugs.webkit.org/show_bug.cgi?id=146431
Reviewed by Filip Pizlo.
* dfg/DFGNode.h:
(JSC::DFG::Node::isFunctionAllocation):
(JSC::DFG::Node::isPhantomFunctionAllocation):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::handleNode):
* dfg/DFGPromoteHeapAccess.h:
(JSC::DFG::promoteHeapAccess):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (186135 => 186136)
--- trunk/Source/_javascript_Core/ChangeLog 2015-06-30 22:16:21 UTC (rev 186135)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-06-30 22:19:05 UTC (rev 186136)
@@ -1,3 +1,18 @@
+2015-06-30 Basile Clement <[email protected]>
+
+ Allow object allocation sinking through GetScope, GetExecutable and SkipScope nodes
+ https://bugs.webkit.org/show_bug.cgi?id=146431
+
+ Reviewed by Filip Pizlo.
+
+ * dfg/DFGNode.h:
+ (JSC::DFG::Node::isFunctionAllocation):
+ (JSC::DFG::Node::isPhantomFunctionAllocation):
+ * dfg/DFGObjectAllocationSinkingPhase.cpp:
+ (JSC::DFG::ObjectAllocationSinkingPhase::handleNode):
+ * dfg/DFGPromoteHeapAccess.h:
+ (JSC::DFG::promoteHeapAccess):
+
2015-06-30 Matt Baker <[email protected]>
Web Inspector: Reduce rendering frames "Other" time by instrumenting compositing
Modified: trunk/Source/_javascript_Core/dfg/DFGNode.h (186135 => 186136)
--- trunk/Source/_javascript_Core/dfg/DFGNode.h 2015-06-30 22:16:21 UTC (rev 186135)
+++ trunk/Source/_javascript_Core/dfg/DFGNode.h 2015-06-30 22:19:05 UTC (rev 186136)
@@ -1489,6 +1489,26 @@
}
}
+ bool isFunctionAllocation()
+ {
+ switch (op()) {
+ case NewFunction:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ bool isPhantomFunctionAllocation()
+ {
+ switch (op()) {
+ case PhantomNewFunction:
+ return true;
+ default:
+ return false;
+ }
+ }
+
bool isPhantomAllocation()
{
switch (op()) {
Modified: trunk/Source/_javascript_Core/dfg/DFGObjectAllocationSinkingPhase.cpp (186135 => 186136)
--- trunk/Source/_javascript_Core/dfg/DFGObjectAllocationSinkingPhase.cpp 2015-06-30 22:16:21 UTC (rev 186135)
+++ trunk/Source/_javascript_Core/dfg/DFGObjectAllocationSinkingPhase.cpp 2015-06-30 22:19:05 UTC (rev 186136)
@@ -914,6 +914,27 @@
escape(node->child2().node());
break;
}
+
+ case GetScope: {
+ Node* target = node->child1().node();
+ if (!target->isFunctionAllocation())
+ escape(target);
+ break;
+ }
+
+ case GetExecutable: {
+ Node* target = node->child1().node();
+ if (!target->isFunctionAllocation())
+ escape(target);
+ break;
+ }
+
+ case SkipScope: {
+ Node* target = node->child1().node();
+ if (!target->isActivationAllocation())
+ escape(target);
+ break;
+ }
case MultiPutByOffset:
// FIXME: In the future we should be able to handle this. It's just a matter of
Modified: trunk/Source/_javascript_Core/dfg/DFGPromoteHeapAccess.h (186135 => 186136)
--- trunk/Source/_javascript_Core/dfg/DFGPromoteHeapAccess.h 2015-06-30 22:16:21 UTC (rev 186135)
+++ trunk/Source/_javascript_Core/dfg/DFGPromoteHeapAccess.h 2015-06-30 22:19:05 UTC (rev 186136)
@@ -64,7 +64,22 @@
if (node->child1()->isPhantomActivationAllocation())
read(PromotedHeapLocation(ClosureVarPLoc, node->child1(), node->scopeOffset().offset()));
break;
-
+
+ case SkipScope:
+ if (node->child1()->isPhantomActivationAllocation())
+ read(PromotedHeapLocation(ActivationScopePLoc, node->child1()));
+ break;
+
+ case GetScope:
+ if (node->child1()->isPhantomFunctionAllocation())
+ read(PromotedHeapLocation(FunctionActivationPLoc, node->child1()));
+ break;
+
+ case GetExecutable:
+ if (node->child1()->isPhantomFunctionAllocation())
+ read(PromotedHeapLocation(FunctionExecutablePLoc, node->child1()));
+ break;
+
case PutHint: {
ASSERT(node->child1()->isPhantomAllocation());
write(
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes