DFG IR shouldn't have a separate node for every kind of put hint that could be descri...
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Mar 2015 15:50:44 +0000 (15:50 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Mar 2015 15:50:44 +0000 (15:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142769

Reviewed by Michael Saboff.

When we sink an object allocation, we need to have some way of tracking what stores would
have happened had the allocation not been sunk, so that we know how to rematerialize the
object on OSR exit. Prior to this change, trunk had two ways of describing such a "put
hint":

- The PutStrutureHint and PutByOffsetHint node types.
- The PromotedLocationDescriptor class, which has an enum with cases StructurePLoc and
  NamedPropertyPLoc.

We also had ways of converting from a Node with those two node types to a
PromotedLocationDescriptor, and we had a way of converting a PromotedLocationDescriptor to
a Node.

This change removes the redundancy. We now have just one node type that corresponds to a
put hint, and it's called PutHint. It has a PromotedLocationDescriptor as metadata.
Converting between a PutHint node and a PromotedLocationDescriptor and vice-versa is now
trivial.

This means that if we add new kinds of sunken objects, we'll have less pro-forma to write
for the put hints to those objects. This is mainly to simplify the implementation of
arguments elimination in bug 141174.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::mergeRelevantToOSR):
* dfg/DFGMayExit.cpp:
(JSC::DFG::mayExit):
* dfg/DFGNode.cpp:
(JSC::DFG::Node::convertToPutHint):
(JSC::DFG::Node::convertToPutStructureHint):
(JSC::DFG::Node::convertToPutByOffsetHint):
(JSC::DFG::Node::promotedLocationDescriptor):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasIdentifier):
(JSC::DFG::Node::hasPromotedLocationDescriptor):
(JSC::DFG::Node::convertToPutByOffsetHint): Deleted.
(JSC::DFG::Node::convertToPutStructureHint): Deleted.
* dfg/DFGNodeType.h:
* dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
(JSC::DFG::LocalOSRAvailabilityCalculator::executeNode):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::run):
(JSC::DFG::ObjectAllocationSinkingPhase::lowerNonReadingOperationsOnPhantomAllocations):
(JSC::DFG::ObjectAllocationSinkingPhase::handleNode):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGPromoteHeapAccess.h:
(JSC::DFG::promoteHeapAccess):
* dfg/DFGPromotedHeapLocation.cpp:
(JSC::DFG::PromotedHeapLocation::createHint):
* dfg/DFGPromotedHeapLocation.h:
(JSC::DFG::PromotedLocationDescriptor::imm1):
(JSC::DFG::PromotedLocationDescriptor::imm2):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validateCPS):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181650 268f45cc-cd09-0410-ab3c-d52691b4dbfc

22 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
Source/JavaScriptCore/dfg/DFGClobberize.h
Source/JavaScriptCore/dfg/DFGDoesGC.cpp
Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
Source/JavaScriptCore/dfg/DFGGraph.cpp
Source/JavaScriptCore/dfg/DFGMayExit.cpp
Source/JavaScriptCore/dfg/DFGNode.cpp
Source/JavaScriptCore/dfg/DFGNode.h
Source/JavaScriptCore/dfg/DFGNodeType.h
Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.cpp
Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp
Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp
Source/JavaScriptCore/dfg/DFGPromoteHeapAccess.h
Source/JavaScriptCore/dfg/DFGPromotedHeapLocation.cpp
Source/JavaScriptCore/dfg/DFGPromotedHeapLocation.h
Source/JavaScriptCore/dfg/DFGSafeToExecute.h
Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
Source/JavaScriptCore/dfg/DFGValidate.cpp
Source/JavaScriptCore/ftl/FTLCapabilities.cpp
Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp

index 026499a..0f41268 100644 (file)
@@ -1,3 +1,84 @@
+2015-03-16  Filip Pizlo  <fpizlo@apple.com>
+
+        DFG IR shouldn't have a separate node for every kind of put hint that could be described using PromotedLocationDescriptor
+        https://bugs.webkit.org/show_bug.cgi?id=142769
+
+        Reviewed by Michael Saboff.
+        
+        When we sink an object allocation, we need to have some way of tracking what stores would
+        have happened had the allocation not been sunk, so that we know how to rematerialize the
+        object on OSR exit. Prior to this change, trunk had two ways of describing such a "put
+        hint":
+        
+        - The PutStrutureHint and PutByOffsetHint node types.
+        - The PromotedLocationDescriptor class, which has an enum with cases StructurePLoc and
+          NamedPropertyPLoc.
+        
+        We also had ways of converting from a Node with those two node types to a
+        PromotedLocationDescriptor, and we had a way of converting a PromotedLocationDescriptor to
+        a Node.
+        
+        This change removes the redundancy. We now have just one node type that corresponds to a
+        put hint, and it's called PutHint. It has a PromotedLocationDescriptor as metadata.
+        Converting between a PutHint node and a PromotedLocationDescriptor and vice-versa is now
+        trivial.
+        
+        This means that if we add new kinds of sunken objects, we'll have less pro-forma to write
+        for the put hints to those objects. This is mainly to simplify the implementation of
+        arguments elimination in bug 141174.
+
+        * dfg/DFGAbstractInterpreterInlines.h:
+        (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
+        * dfg/DFGClobberize.h:
+        (JSC::DFG::clobberize):
+        * dfg/DFGDoesGC.cpp:
+        (JSC::DFG::doesGC):
+        * dfg/DFGFixupPhase.cpp:
+        (JSC::DFG::FixupPhase::fixupNode):
+        * dfg/DFGGraph.cpp:
+        (JSC::DFG::Graph::dump):
+        (JSC::DFG::Graph::mergeRelevantToOSR):
+        * dfg/DFGMayExit.cpp:
+        (JSC::DFG::mayExit):
+        * dfg/DFGNode.cpp:
+        (JSC::DFG::Node::convertToPutHint):
+        (JSC::DFG::Node::convertToPutStructureHint):
+        (JSC::DFG::Node::convertToPutByOffsetHint):
+        (JSC::DFG::Node::promotedLocationDescriptor):
+        * dfg/DFGNode.h:
+        (JSC::DFG::Node::hasIdentifier):
+        (JSC::DFG::Node::hasPromotedLocationDescriptor):
+        (JSC::DFG::Node::convertToPutByOffsetHint): Deleted.
+        (JSC::DFG::Node::convertToPutStructureHint): Deleted.
+        * dfg/DFGNodeType.h:
+        * dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
+        (JSC::DFG::LocalOSRAvailabilityCalculator::executeNode):
+        * dfg/DFGObjectAllocationSinkingPhase.cpp:
+        (JSC::DFG::ObjectAllocationSinkingPhase::run):
+        (JSC::DFG::ObjectAllocationSinkingPhase::lowerNonReadingOperationsOnPhantomAllocations):
+        (JSC::DFG::ObjectAllocationSinkingPhase::handleNode):
+        * dfg/DFGPredictionPropagationPhase.cpp:
+        (JSC::DFG::PredictionPropagationPhase::propagate):
+        * dfg/DFGPromoteHeapAccess.h:
+        (JSC::DFG::promoteHeapAccess):
+        * dfg/DFGPromotedHeapLocation.cpp:
+        (JSC::DFG::PromotedHeapLocation::createHint):
+        * dfg/DFGPromotedHeapLocation.h:
+        (JSC::DFG::PromotedLocationDescriptor::imm1):
+        (JSC::DFG::PromotedLocationDescriptor::imm2):
+        * dfg/DFGSafeToExecute.h:
+        (JSC::DFG::safeToExecute):
+        * dfg/DFGSpeculativeJIT32_64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+        * dfg/DFGSpeculativeJIT64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+        * dfg/DFGValidate.cpp:
+        (JSC::DFG::Validate::validateCPS):
+        * ftl/FTLCapabilities.cpp:
+        (JSC::FTL::canCompile):
+        * ftl/FTLLowerDFGToLLVM.cpp:
+        (JSC::FTL::LowerDFGToLLVM::compileNode):
+
 2015-03-17  Michael Saboff  <msaboff@apple.com>
 
         Windows X86-64 should use the fixed executable allocator
index 52b0d05..e3542d1 100644 (file)
@@ -1308,8 +1308,7 @@ bool AbstractInterpreter<AbstractStateType>::executeEffects(unsigned clobberLimi
         // This claims to return bottom.
         break;
         
-    case PutByOffsetHint:
-    case PutStructureHint:
+    case PutHint:
         break;
         
     case MaterializeNewObject: {
index 22cab17..625e221 100644 (file)
@@ -290,8 +290,7 @@ void clobberize(Graph& graph, Node* node, const ReadFunctor& read, const WriteFu
     case ProfileControlFlow:
     case StoreBarrier:
     case StoreBarrierWithNullCheck:
-    case PutByOffsetHint:
-    case PutStructureHint:
+    case PutHint:
         write(SideState);
         return;
         
index 866ecb5..8f70a18 100644 (file)
@@ -204,9 +204,8 @@ bool doesGC(Graph& graph, Node* node)
     case CheckBadCell:
     case BottomValue:
     case PhantomNewObject:
-    case PutByOffsetHint:
+    case PutHint:
     case CheckStructureImmediate:
-    case PutStructureHint:
     case PutStack:
     case KillStack:
     case GetStack:
index f4443fb..8bc912b 100644 (file)
@@ -1068,9 +1068,8 @@ private:
         case Identity: // This should have been cleaned up.
         case BooleanToNumber:
         case PhantomNewObject:
-        case PutByOffsetHint:
+        case PutHint:
         case CheckStructureImmediate:
-        case PutStructureHint:
         case MaterializeNewObject:
         case PutStack:
         case KillStack:
index c299d0f..ecf2619 100644 (file)
@@ -222,6 +222,8 @@ void Graph::dump(PrintStream& out, const char* prefix, Node* node, DumpContext*
         out.print(comma, "global", globalObjectFor(node->origin.semantic)->findRegisterIndex(node->registerPointer()), "(", RawPointer(node->registerPointer()), ")");
     if (node->hasIdentifier())
         out.print(comma, "id", node->identifierNumber(), "{", identifiers()[node->identifierNumber()], "}");
+    if (node->hasPromotedLocationDescriptor())
+        out.print(comma, node->promotedLocationDescriptor());
     if (node->hasStructureSet())
         out.print(comma, inContext(node->structureSet(), context));
     if (node->hasStructure())
@@ -585,8 +587,7 @@ void Graph::mergeRelevantToOSR()
                 node->child1()->mergeFlags(NodeRelevantToOSR);
                 break;
                 
-            case PutStructureHint:
-            case PutByOffsetHint:
+            case PutHint:
                 node->child2()->mergeFlags(NodeRelevantToOSR);
                 break;
                 
index c1eaa37..47c8920 100644 (file)
@@ -76,8 +76,7 @@ bool mayExit(Graph& graph, Node* node)
     case Upsilon:
     case ZombieHint:
     case BottomValue:
-    case PutStructureHint:
-    case PutByOffsetHint:
+    case PutHint:
     case PhantomNewObject:
     case PutStack:
     case KillStack:
index b3022bb..84cb853 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "DFGGraph.h"
 #include "DFGNodeAllocator.h"
+#include "DFGPromotedHeapLocation.h"
 #include "JSCInlines.h"
 
 namespace JSC { namespace DFG {
@@ -93,6 +94,36 @@ void Node::convertToIdentity()
     setResult(result);
 }
 
+void Node::convertToPutHint(const PromotedLocationDescriptor& descriptor, Node* base, Node* value)
+{
+    m_op = PutHint;
+    m_opInfo = descriptor.imm1().m_value;
+    m_opInfo2 = descriptor.imm2().m_value;
+    child1() = base->defaultEdge();
+    child2() = value->defaultEdge();
+    child3() = Edge();
+}
+
+void Node::convertToPutStructureHint(Node* structure)
+{
+    ASSERT(m_op == PutStructure);
+    ASSERT(structure->castConstant<Structure*>() == transition()->next);
+    convertToPutHint(StructurePLoc, child1().node(), structure);
+}
+
+void Node::convertToPutByOffsetHint()
+{
+    ASSERT(m_op == PutByOffset);
+    convertToPutHint(
+        PromotedLocationDescriptor(NamedPropertyPLoc, storageAccessData().identifierNumber),
+        child2().node(), child3().node());
+}
+
+PromotedLocationDescriptor Node::promotedLocationDescriptor()
+{
+    return PromotedLocationDescriptor(static_cast<PromotedLocationKind>(m_opInfo), m_opInfo2);
+}
+
 } } // namespace JSC::DFG
 
 namespace WTF {
index a721e6d..081f31f 100644 (file)
@@ -56,6 +56,7 @@
 namespace JSC { namespace DFG {
 
 class Graph;
+class PromotedLocationDescriptor;
 struct BasicBlock;
 
 struct StorageAccessData {
@@ -557,24 +558,10 @@ struct Node {
         m_op = MultiPutByOffset;
     }
     
-    void convertToPutByOffsetHint()
-    {
-        ASSERT(m_op == PutByOffset);
-        m_opInfo = storageAccessData().identifierNumber;
-        m_op = PutByOffsetHint;
-        child1() = child2();
-        child2() = child3();
-        child3() = Edge();
-    }
+    void convertToPutHint(const PromotedLocationDescriptor&, Node* base, Node* value);
     
-    void convertToPutStructureHint(Node* structure)
-    {
-        ASSERT(m_op == PutStructure);
-        ASSERT(structure->castConstant<Structure*>() == transition()->next);
-        m_op = PutStructureHint;
-        m_opInfo = 0;
-        child2() = Edge(structure, KnownCellUse);
-    }
+    void convertToPutByOffsetHint();
+    void convertToPutStructureHint(Node* structure);
     
     void convertToPhantomNewObject()
     {
@@ -830,7 +817,6 @@ struct Node {
         case PutById:
         case PutByIdFlush:
         case PutByIdDirect:
-        case PutByOffsetHint:
             return true;
         default:
             return false;
@@ -843,6 +829,13 @@ struct Node {
         return m_opInfo;
     }
     
+    bool hasPromotedLocationDescriptor()
+    {
+        return op() == PutHint;
+    }
+    
+    PromotedLocationDescriptor promotedLocationDescriptor();
+    
     // This corrects the arithmetic node flags, so that irrelevant bits are
     // ignored. In particular, anything other than ArithMul does not need
     // to know if it can speculate on negative zero.
index cc44c82..339ce62 100644 (file)
@@ -237,9 +237,8 @@ namespace JSC { namespace DFG {
     \
     /* Support for allocation sinking. */\
     macro(PhantomNewObject, NodeResultJS) \
-    macro(PutByOffsetHint, NodeMustGenerate) \
+    macro(PutHint, NodeMustGenerate) \
     macro(CheckStructureImmediate, NodeMustGenerate) \
-    macro(PutStructureHint, NodeMustGenerate) \
     macro(MaterializeNewObject, NodeResultJS | NodeHasVarArgs) \
     \
     /* Nodes for misc operations. */\
index 4537099..fe67a66 100644 (file)
@@ -166,16 +166,16 @@ void LocalOSRAvailabilityCalculator::executeNode(Node* node)
         break;
     }
         
+    case PutHint: {
+        m_availability.m_heap.set(
+            PromotedHeapLocation(node->child1().node(), node->promotedLocationDescriptor()),
+            Availability(node->child2().node()));
+        break;
+    }
+        
     default:
         break;
     }
-    
-    promoteHeapAccess(
-        node,
-        [&] (PromotedHeapLocation location, Edge value) {
-            m_availability.m_heap.set(location, Availability(value.node()));
-        },
-        [&] (PromotedHeapLocation) { });
 }
 
 } } // namespace JSC::DFG
index 1b7b683..f2d19fa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * 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
@@ -72,10 +72,10 @@ public:
         //   that would see any other escape. Note that Upsilons constitute escaping sites. Then we
         //   insert additional MaterializeNewObject nodes on Upsilons that feed into Phis that mix
         //   materializations and the original PhantomNewObject. We then turn each PutByOffset over a
-        //   PhantomNewObject into a PutByOffsetHint.
+        //   PhantomNewObject into a PutHint.
         //
         // - We perform the same optimization for MaterializeNewObject. This allows us to cover
-        //   cases where we had MaterializeNewObject flowing into a PutByOffsetHint.
+        //   cases where we had MaterializeNewObject flowing into a PutHint.
         //
         // We could also add this rule:
         //
@@ -527,9 +527,10 @@ private:
                     if (m_sinkCandidates.contains(node)) {
                         Node* structure = m_insertionSet.insertConstant(
                             nodeIndex + 1, node->origin, JSValue(node->structure()));
-                        m_insertionSet.insertNode(
-                            nodeIndex + 1, SpecNone, PutStructureHint, node->origin,
-                            Edge(node, KnownCellUse), Edge(structure, KnownCellUse));
+                        m_insertionSet.insert(
+                            nodeIndex + 1,
+                            PromotedHeapLocation(StructurePLoc, node).createHint(
+                                m_graph, node->origin, structure));
                         node->convertToPhantomNewObject();
                     }
                     break;
@@ -537,13 +538,19 @@ private:
                     
                 case MaterializeNewObject: {
                     if (m_sinkCandidates.contains(node)) {
-                        m_insertionSet.insertNode(
-                            nodeIndex + 1, SpecNone, PutStructureHint, node->origin,
-                            Edge(node, KnownCellUse), m_graph.varArgChild(node, 0));
+                        m_insertionSet.insert(
+                            nodeIndex + 1,
+                            PromotedHeapLocation(StructurePLoc, node).createHint(
+                                m_graph, node->origin, m_graph.varArgChild(node, 0).node()));
                         for (unsigned i = 0; i < node->objectMaterializationData().m_properties.size(); ++i) {
-                            m_insertionSet.insertNode(
-                                nodeIndex + 1, SpecNone, PutByOffsetHint, node->origin,
-                                Edge(node, KnownCellUse), m_graph.varArgChild(node, i + 1));
+                            unsigned identifierNumber =
+                                node->objectMaterializationData().m_properties[i].m_identifierNumber;
+                            m_insertionSet.insert(
+                                nodeIndex + 1,
+                                PromotedHeapLocation(
+                                    NamedPropertyPLoc, node, identifierNumber).createHint(
+                                    m_graph, node->origin,
+                                    m_graph.varArgChild(node, i + 1).node()));
                         }
                         node->convertToPhantomNewObject();
                     }
@@ -762,7 +769,7 @@ private:
         case HardPhantom:
         case StoreBarrier:
         case StoreBarrierWithNullCheck:
-        case PutByOffsetHint:
+        case PutHint:
             break;
             
         case PutByOffset:
index 947251c..de7fbd8 100644 (file)
@@ -542,9 +542,8 @@ private:
         case Identity:
         case BooleanToNumber:
         case PhantomNewObject:
-        case PutByOffsetHint:
+        case PutHint:
         case CheckStructureImmediate:
-        case PutStructureHint:
         case MaterializeNewObject:
         case PutStack:
         case KillStack:
index 10fdef6..9551bf2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * 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
@@ -33,8 +33,6 @@
 
 namespace JSC { namespace DFG {
 
-// Note that the write functor is really the useful thing here. The read functor is only useful
-// for the object allocation sinking phase.
 template<typename WriteFunctor, typename ReadFunctor>
 void promoteHeapAccess(Node* node, const WriteFunctor& write, const ReadFunctor& read)
 {
@@ -61,18 +59,11 @@ void promoteHeapAccess(Node* node, const WriteFunctor& write, const ReadFunctor&
         }
         break;
     }
-
-    case PutStructureHint: {
-        ASSERT(node->child1()->isPhantomObjectAllocation());
-        write(PromotedHeapLocation(StructurePLoc, node->child1()), node->child2());
-        break;
-    }
-
-    case PutByOffsetHint: {
+        
+    case PutHint: {
         ASSERT(node->child1()->isPhantomObjectAllocation());
-        unsigned identifierNumber = node->identifierNumber();
         write(
-            PromotedHeapLocation(NamedPropertyPLoc, node->child1(), identifierNumber),
+            PromotedHeapLocation(node->child1().node(), node->promotedLocationDescriptor()),
             node->child2());
         break;
     }
index cf745d6..5a57a13 100644 (file)
@@ -40,23 +40,9 @@ void PromotedLocationDescriptor::dump(PrintStream& out) const
 
 Node* PromotedHeapLocation::createHint(Graph& graph, NodeOrigin origin, Node* value)
 {
-    switch (kind()) {
-    case StructurePLoc:
-        return graph.addNode(
-            SpecNone, PutStructureHint, origin,
-            Edge(base(), KnownCellUse), Edge(value, KnownCellUse));
-        
-    case NamedPropertyPLoc:
-        return graph.addNode(
-            SpecNone, PutByOffsetHint, origin,
-            OpInfo(info()), Edge(base(), KnownCellUse), Edge(value, UntypedUse));
-        
-    case InvalidPromotedLocationKind:
-        return nullptr;
-    }
-    
-    RELEASE_ASSERT_NOT_REACHED();
-    return nullptr;
+    return graph.addNode(
+        SpecNone, PutHint, origin, OpInfo(descriptor().imm1()), OpInfo(descriptor().imm2()),
+        base()->defaultEdge(), value->defaultEdge());
 }
 
 void PromotedHeapLocation::dump(PrintStream& out) const
index 894c173..bbd52e1 100644 (file)
@@ -54,6 +54,9 @@ public:
     PromotedLocationKind kind() const { return m_kind; }
     unsigned info() const { return m_info; }
     
+    OpInfo imm1() const { return OpInfo(static_cast<uint32_t>(m_kind)); }
+    OpInfo imm2() const { return OpInfo(static_cast<uint32_t>(m_info)); }
+    
     unsigned hash() const
     {
         return m_kind + m_info;
index 6e62b73..f5dbfcb 100644 (file)
@@ -277,9 +277,8 @@ bool safeToExecute(AbstractStateType& state, Graph& graph, Node* node)
     case GetEnumeratorPname:
     case ToIndexString:
     case PhantomNewObject:
-    case PutByOffsetHint:
+    case PutHint:
     case CheckStructureImmediate:
-    case PutStructureHint:
     case MaterializeNewObject:
         return true;
 
index fa3bd0d..44e8b26 100644 (file)
@@ -5092,9 +5092,8 @@ void SpeculativeJIT::compile(Node* node)
     case CheckBadCell:
     case BottomValue:
     case PhantomNewObject:
-    case PutByOffsetHint:
+    case PutHint:
     case CheckStructureImmediate:
-    case PutStructureHint:
     case MaterializeNewObject:
     case PutStack:
     case KillStack:
index 8c859af..17b7eed 100644 (file)
@@ -5163,9 +5163,8 @@ void SpeculativeJIT::compile(Node* node)
     case CheckBadCell:
     case BottomValue:
     case PhantomNewObject:
-    case PutByOffsetHint:
+    case PutHint:
     case CheckStructureImmediate:
-    case PutStructureHint:
     case MaterializeNewObject:
     case PutStack:
     case KillStack:
index fb1b929..3fe1998 100644 (file)
@@ -438,9 +438,8 @@ private:
                 case Upsilon:
                 case CheckInBounds:
                 case PhantomNewObject:
-                case PutByOffsetHint:
+                case PutHint:
                 case CheckStructureImmediate:
-                case PutStructureHint:
                 case MaterializeNewObject:
                 case PutStack:
                 case KillStack:
index 5e36767..c2b1c16 100644 (file)
@@ -177,9 +177,8 @@ inline CapabilityLevel canCompile(Node* node)
     case ToIndexString:
     case BottomValue:
     case PhantomNewObject:
-    case PutByOffsetHint:
+    case PutHint:
     case CheckStructureImmediate:
-    case PutStructureHint:
     case MaterializeNewObject:
         // These are OK.
         break;
index e0c5a34..95b1e6f 100644 (file)
@@ -829,8 +829,7 @@ private:
         case MovHint:
         case ZombieHint:
         case PhantomNewObject:
-        case PutByOffsetHint:
-        case PutStructureHint:
+        case PutHint:
         case BottomValue:
         case KillStack:
             break;