]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - dfg/DFGArgumentPosition.h
JavaScriptCore-7600.1.4.9.tar.gz
[apple/javascriptcore.git] / dfg / DFGArgumentPosition.h
index 822b454746635de7d0bf7d9d530015e4b43c47a3..b4e4ade1531a2a515d6da7cadc21d39552f2f58d 100644 (file)
@@ -48,6 +48,20 @@ public:
         m_variables.append(variable);
     }
     
         m_variables.append(variable);
     }
     
+    VariableAccessData* someVariable() const
+    {
+        if (m_variables.isEmpty())
+            return 0;
+        return m_variables[0]->find();
+    }
+    
+    FlushFormat flushFormat() const
+    {
+        if (VariableAccessData* variable = someVariable())
+            return variable->flushFormat();
+        return DeadFlush;
+    }
+    
     bool mergeShouldNeverUnbox(bool shouldNeverUnbox)
     {
         return checkAndSet(m_shouldNeverUnbox, m_shouldNeverUnbox | shouldNeverUnbox);
     bool mergeShouldNeverUnbox(bool shouldNeverUnbox)
     {
         return checkAndSet(m_shouldNeverUnbox, m_shouldNeverUnbox | shouldNeverUnbox);
@@ -104,15 +118,15 @@ public:
     {
         for (unsigned i = 0; i < m_variables.size(); ++i) {
             VariableAccessData* variable = m_variables[i]->find();
     {
         for (unsigned i = 0; i < m_variables.size(); ++i) {
             VariableAccessData* variable = m_variables[i]->find();
-            int operand = variable->operand();
+            VirtualRegister operand = variable->local();
 
             if (i)
                 out.print(" ");
 
 
             if (i)
                 out.print(" ");
 
-            if (operandIsArgument(operand))
-                out.print("arg", operandToArgument(operand), "(", VariableAccessDataDump(*graph, variable), ")");
+            if (operand.isArgument())
+                out.print("arg", operand.toArgument(), "(", VariableAccessDataDump(*graph, variable), ")");
             else
             else
-                out.print("r", operand, "(", VariableAccessDataDump(*graph, variable), ")");
+                out.print("r", operand.toLocal(), "(", VariableAccessDataDump(*graph, variable), ")");
         }
         out.print("\n");
     }
         }
         out.print("\n");
     }