Title: [188796] trunk/Source/_javascript_Core
Revision
188796
Author
basile_clem...@apple.com
Date
2015-08-21 16:30:40 -0700 (Fri, 21 Aug 2015)

Log Message

Remove unused code relative to allocation sinking
https://bugs.webkit.org/show_bug.cgi?id=148342

Reviewed by Mark Lam.

This removes two things:

 - The DFGPromoteHeapAccess.h file which is a relic of the old sinking
   phase and is no longer used (it has been subsumed by
   ObjectAllocationSinking::promoteLocalHeap)

 - Code in the allocation sinking phase for sinking
   MaterializeCreateActivation and MaterializeNewObject. Handling those
   is no longer necessary since the phase no longer runs in a fixpoint
   and thus will never see those nodes, since no other phase creates
   them.

* _javascript_Core.vcxproj/_javascript_Core.vcxproj:
* _javascript_Core.vcxproj/_javascript_Core.vcxproj.filters:
* _javascript_Core.xcodeproj/project.pbxproj:
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* dfg/DFGPromoteHeapAccess.h: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (188795 => 188796)


--- trunk/Source/_javascript_Core/ChangeLog	2015-08-21 23:28:08 UTC (rev 188795)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-08-21 23:30:40 UTC (rev 188796)
@@ -1,3 +1,28 @@
+2015-08-21  Basile Clement  <basile_clem...@apple.com>
+
+        Remove unused code relative to allocation sinking
+        https://bugs.webkit.org/show_bug.cgi?id=148342
+
+        Reviewed by Mark Lam.
+
+        This removes two things:
+
+         - The DFGPromoteHeapAccess.h file which is a relic of the old sinking
+           phase and is no longer used (it has been subsumed by
+           ObjectAllocationSinking::promoteLocalHeap)
+
+         - Code in the allocation sinking phase for sinking
+           MaterializeCreateActivation and MaterializeNewObject. Handling those
+           is no longer necessary since the phase no longer runs in a fixpoint
+           and thus will never see those nodes, since no other phase creates
+           them.
+
+        * _javascript_Core.vcxproj/_javascript_Core.vcxproj:
+        * _javascript_Core.vcxproj/_javascript_Core.vcxproj.filters:
+        * _javascript_Core.xcodeproj/project.pbxproj:
+        * dfg/DFGObjectAllocationSinkingPhase.cpp:
+        * dfg/DFGPromoteHeapAccess.h: Removed.
+
 2015-08-21  Geoffrey Garen  <gga...@apple.com>
 
         Unify code paths for manually deleting all code

Modified: trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj (188795 => 188796)


--- trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj	2015-08-21 23:28:08 UTC (rev 188795)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj	2015-08-21 23:30:40 UTC (rev 188796)
@@ -1197,7 +1197,6 @@
     <ClInclude Include="..\dfg\DFGPreciseLocalClobberize.h" />
     <ClInclude Include="..\dfg\DFGPredictionInjectionPhase.h" />
     <ClInclude Include="..\dfg\DFGPredictionPropagationPhase.h" />
-    <ClInclude Include="..\dfg\DFGPromoteHeapAccess.h" />
     <ClInclude Include="..\dfg\DFGPromotedHeapLocation.h" />
     <ClInclude Include="..\dfg\DFGPureValue.h" />
     <ClInclude Include="..\dfg\DFGPutStackSinkingPhase.h" />

Modified: trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters (188795 => 188796)


--- trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters	2015-08-21 23:28:08 UTC (rev 188795)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters	2015-08-21 23:30:40 UTC (rev 188796)
@@ -4369,9 +4369,6 @@
     <ClInclude Include="..\dfg\DFGPromotedHeapLocation.h">
       <Filter>dfg</Filter>
     </ClInclude>
-    <ClInclude Include="..\dfg\DFGPromoteHeapAccess.h">
-      <Filter>dfg</Filter>
-    </ClInclude>
     <ClInclude Include="..\ftl\FTLExitPropertyValue.h">
       <Filter>ftl</Filter>
     </ClInclude>
@@ -4641,4 +4638,4 @@
       <Filter>jit</Filter>
     </MASM>
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (188795 => 188796)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2015-08-21 23:28:08 UTC (rev 188795)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2015-08-21 23:30:40 UTC (rev 188796)
@@ -482,7 +482,6 @@
 		0FA7A8EB18B413C80052371D /* Reg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FA7A8E918B413C80052371D /* Reg.cpp */; };
 		0FA7A8EC18B413C80052371D /* Reg.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FA7A8EA18B413C80052371D /* Reg.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0FA7A8EE18CE4FD80052371D /* ScratchRegisterAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FA7A8ED18CE4FD80052371D /* ScratchRegisterAllocator.cpp */; };
-		0FAA3E0919D0C2CB00FAC9E2 /* DFGPromoteHeapAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FAA3E0819D0C2CB00FAC9E2 /* DFGPromoteHeapAccess.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0FAF7EFD165BA91B000C8455 /* JITDisassembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FAF7EFA165BA919000C8455 /* JITDisassembler.cpp */; };
 		0FAF7EFE165BA91F000C8455 /* JITDisassembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FAF7EFB165BA919000C8455 /* JITDisassembler.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0FB105851675480F00F8AB6E /* ExitKind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB105821675480C00F8AB6E /* ExitKind.cpp */; };
@@ -2293,7 +2292,6 @@
 		0FA7A8E918B413C80052371D /* Reg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Reg.cpp; sourceTree = "<group>"; };
 		0FA7A8EA18B413C80052371D /* Reg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reg.h; sourceTree = "<group>"; };
 		0FA7A8ED18CE4FD80052371D /* ScratchRegisterAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScratchRegisterAllocator.cpp; sourceTree = "<group>"; };
-		0FAA3E0819D0C2CB00FAC9E2 /* DFGPromoteHeapAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGPromoteHeapAccess.h; path = dfg/DFGPromoteHeapAccess.h; sourceTree = "<group>"; };
 		0FAF7EFA165BA919000C8455 /* JITDisassembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITDisassembler.cpp; sourceTree = "<group>"; };
 		0FAF7EFB165BA919000C8455 /* JITDisassembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITDisassembler.h; sourceTree = "<group>"; };
 		0FB105821675480C00F8AB6E /* ExitKind.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExitKind.cpp; sourceTree = "<group>"; };
@@ -5287,7 +5285,6 @@
 				0F3E01A919D353A500F61B7F /* DFGPrePostNumbering.h */,
 				0F2B9CE019D0BA7D00B1D1B5 /* DFGPromotedHeapLocation.cpp */,
 				0F2B9CE119D0BA7D00B1D1B5 /* DFGPromotedHeapLocation.h */,
-				0FAA3E0819D0C2CB00FAC9E2 /* DFGPromoteHeapAccess.h */,
 				0FB1765E196B8F9E0091052A /* DFGPureValue.cpp */,
 				0FB1765F196B8F9E0091052A /* DFGPureValue.h */,
 				0F3A1BF71A9ECB7D000DE01A /* DFGPutStackSinkingPhase.cpp */,
@@ -6174,7 +6171,6 @@
 				0F3B3A2C15475002003ED0FF /* DFGValidate.h in Headers */,
 				0F2BDC481522802900CD8910 /* DFGValueSource.h in Headers */,
 				0F620174143FCD330068B77C /* DFGVariableAccessData.h in Headers */,
-				0FAA3E0919D0C2CB00FAC9E2 /* DFGPromoteHeapAccess.h in Headers */,
 				0FDDBFB61666EEDA00C55FEF /* DFGVariableAccessDataDump.h in Headers */,
 				0F2BDC491522809600CD8910 /* DFGVariableEvent.h in Headers */,
 				0F2BDC4B1522809D00CD8910 /* DFGVariableEventStream.h in Headers */,

Modified: trunk/Source/_javascript_Core/dfg/DFGObjectAllocationSinkingPhase.cpp (188795 => 188796)


--- trunk/Source/_javascript_Core/dfg/DFGObjectAllocationSinkingPhase.cpp	2015-08-21 23:28:08 UTC (rev 188795)
+++ trunk/Source/_javascript_Core/dfg/DFGObjectAllocationSinkingPhase.cpp	2015-08-21 23:30:40 UTC (rev 188796)
@@ -834,21 +834,6 @@
                 StructurePLoc, LazyNode(m_graph.freeze(node->structure())));
             break;
 
-        case MaterializeNewObject: {
-            target = &m_heap.newAllocation(node, Allocation::Kind::Object);
-            target->setStructures(node->structureSet());
-            writes.add(
-                StructurePLoc, LazyNode(m_graph.varArgChild(node, 0).node()));
-            for (unsigned i = 0; i < node->objectMaterializationData().m_properties.size(); ++i) {
-                writes.add(
-                    PromotedLocationDescriptor(
-                        NamedPropertyPLoc,
-                        node->objectMaterializationData().m_properties[i].m_identifierNumber),
-                    LazyNode(m_graph.varArgChild(node, i + 1).node()));
-            }
-            break;
-        }
-
         case NewFunction:
         case NewArrowFunction: {
             bool isArrowFunction = node->op() == NewArrowFunction;
@@ -886,23 +871,6 @@
             break;
         }
 
-        case MaterializeCreateActivation: {
-            // We have sunk this once already - there is no way the
-            // watchpoint is still valid.
-            ASSERT(!node->castOperand<SymbolTable*>()->singletonScope()->isStillValid());
-            target = &m_heap.newAllocation(node, Allocation::Kind::Activation);
-            writes.add(ActivationSymbolTablePLoc, LazyNode(m_graph.varArgChild(node, 0).node()));
-            writes.add(ActivationScopePLoc, LazyNode(m_graph.varArgChild(node, 1).node()));
-            for (unsigned i = 0; i < node->objectMaterializationData().m_properties.size(); ++i) {
-                writes.add(
-                    PromotedLocationDescriptor(
-                        ClosureVarPLoc,
-                        node->objectMaterializationData().m_properties[i].m_identifierNumber),
-                    LazyNode(m_graph.varArgChild(node, i + 2).node()));
-            }
-            break;
-        }
-
         case PutStructure:
             target = m_heap.onlyLocalAllocation(node->child1().node());
             if (target && target->isObjectAllocation()) {
@@ -1792,7 +1760,6 @@
                 if (m_sinkCandidates.contains(node) || doLower) {
                     switch (node->op()) {
                     case NewObject:
-                    case MaterializeNewObject:
                         node->convertToPhantomNewObject();
                         break;
 
@@ -1802,7 +1769,6 @@
                         break;
 
                     case CreateActivation:
-                    case MaterializeCreateActivation:
                         node->convertToPhantomCreateActivation();
                         break;
 

Deleted: trunk/Source/_javascript_Core/dfg/DFGPromoteHeapAccess.h (188795 => 188796)


--- trunk/Source/_javascript_Core/dfg/DFGPromoteHeapAccess.h	2015-08-21 23:28:08 UTC (rev 188795)
+++ trunk/Source/_javascript_Core/dfg/DFGPromoteHeapAccess.h	2015-08-21 23:30:40 UTC (rev 188796)
@@ -1,101 +0,0 @@
-/*
- * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#ifndef DFGPromoteHeapAccess_h
-#define DFGPromoteHeapAccess_h
-
-#if ENABLE(DFG_JIT)
-
-#include "DFGNode.h"
-#include "DFGPromotedHeapLocation.h"
-
-namespace JSC { namespace DFG {
-
-template<typename WriteFunctor, typename ReadFunctor>
-void promoteHeapAccess(Node* node, const WriteFunctor& write, const ReadFunctor& read)
-{
-    switch (node->op()) {
-    case CheckStructure: {
-        if (node->child1()->isPhantomObjectAllocation())
-            read(PromotedHeapLocation(StructurePLoc, node->child1()));
-        break;
-    }
-    
-    case GetByOffset:
-    case GetGetterSetterByOffset: {
-        if (node->child2()->isPhantomObjectAllocation()) {
-            unsigned identifierNumber = node->storageAccessData().identifierNumber;
-            read(PromotedHeapLocation(NamedPropertyPLoc, node->child2(), identifierNumber));
-        }
-        break;
-    }
-
-    case MultiGetByOffset: {
-        if (node->child1()->isPhantomObjectAllocation()) {
-            unsigned identifierNumber = node->multiGetByOffsetData().identifierNumber;
-            read(PromotedHeapLocation(NamedPropertyPLoc, node->child1(), identifierNumber));
-        }
-        break;
-    }
-
-    case GetClosureVar:
-        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(
-            PromotedHeapLocation(node->child1().node(), node->promotedLocationDescriptor()),
-            node->child2());
-        break;
-    }
-
-    default:
-        break;
-    }
-}
-
-} } // namespace JSC::DFG
-
-#endif // ENABLE(DFG_JIT)
-
-#endif // DFGPromoteHeapAccess_h
-
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to