Title: [185505] trunk/Source/_javascript_Core
- Revision
- 185505
- Author
- [email protected]
- Date
- 2015-06-12 09:33:37 -0700 (Fri, 12 Jun 2015)
Log Message
DFG Object Allocation Sinking should not consider GetClosureVar as escapes
https://bugs.webkit.org/show_bug.cgi?id=145904
Reviewed by Filip Pizlo.
The object allocation sinking phase is currently able to sink
CreateActivation nodes, but will consider any GetClosureVar node as
escaping.
This is not problematic in general as most of the GetClosureVar nodes
we would have been able to sink over will have been eliminated by CSE
anyway. Still, this is an oversight that we should fix since the
machinery is already in place.
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::handleNode):
* dfg/DFGPromoteHeapAccess.h:
(JSC::DFG::promoteHeapAccess):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (185504 => 185505)
--- trunk/Source/_javascript_Core/ChangeLog 2015-06-12 14:46:15 UTC (rev 185504)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-06-12 16:33:37 UTC (rev 185505)
@@ -1,3 +1,24 @@
+2015-06-12 Basile Clement <[email protected]>
+
+ DFG Object Allocation Sinking should not consider GetClosureVar as escapes
+ https://bugs.webkit.org/show_bug.cgi?id=145904
+
+ Reviewed by Filip Pizlo.
+
+ The object allocation sinking phase is currently able to sink
+ CreateActivation nodes, but will consider any GetClosureVar node as
+ escaping.
+
+ This is not problematic in general as most of the GetClosureVar nodes
+ we would have been able to sink over will have been eliminated by CSE
+ anyway. Still, this is an oversight that we should fix since the
+ machinery is already in place.
+
+ * dfg/DFGObjectAllocationSinkingPhase.cpp:
+ (JSC::DFG::ObjectAllocationSinkingPhase::handleNode):
+ * dfg/DFGPromoteHeapAccess.h:
+ (JSC::DFG::promoteHeapAccess):
+
2015-06-11 Mark Lam <[email protected]>
WebCore::reportException() needs to be able to accept a raw thrown value in addition to Exception objects.
Modified: trunk/Source/_javascript_Core/dfg/DFGObjectAllocationSinkingPhase.cpp (185504 => 185505)
--- trunk/Source/_javascript_Core/dfg/DFGObjectAllocationSinkingPhase.cpp 2015-06-12 14:46:15 UTC (rev 185504)
+++ trunk/Source/_javascript_Core/dfg/DFGObjectAllocationSinkingPhase.cpp 2015-06-12 16:33:37 UTC (rev 185505)
@@ -900,6 +900,13 @@
break;
}
+ case GetClosureVar: {
+ Node* target = node->child1().node();
+ if (!target->isActivationAllocation())
+ escape(target);
+ break;
+ }
+
case PutClosureVar: {
Node* target = node->child1().node();
if (!target->isActivationAllocation())
Modified: trunk/Source/_javascript_Core/dfg/DFGPromoteHeapAccess.h (185504 => 185505)
--- trunk/Source/_javascript_Core/dfg/DFGPromoteHeapAccess.h 2015-06-12 14:46:15 UTC (rev 185504)
+++ trunk/Source/_javascript_Core/dfg/DFGPromoteHeapAccess.h 2015-06-12 16:33:37 UTC (rev 185505)
@@ -59,6 +59,11 @@
}
break;
}
+
+ case GetClosureVar:
+ if (node->child1()->isPhantomActivationAllocation())
+ read(PromotedHeapLocation(ClosureVarPLoc, node->child1(), node->scopeOffset().offset()));
+ break;
case PutHint: {
ASSERT(node->child1()->isPhantomAllocation());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes