Move back primary header includes next to config.h
[WebKit-https.git] / Source / JavaScriptCore / dfg / DFGNodeFlags.cpp
index 714675e..d6edd1a 100644 (file)
 
 #if ENABLE(DFG_JIT)
 
+#include "JSCInlines.h"
 #include <wtf/CommaPrinter.h>
+#include <wtf/StringPrintStream.h>
 
 namespace JSC { namespace DFG {
 
-void dumpNodeFlags(PrintStream& out, NodeFlags flags)
+void dumpNodeFlags(PrintStream& actualOut, NodeFlags flags)
 {
-    if (!((flags & ~NodeRelevantToOSR) ^ NodeDoesNotExit)) {
-        out.print("<empty>");
-        return;
-    }
-
+    StringPrintStream out;
     CommaPrinter comma("|");
     
     if (flags & NodeResultMask) {
@@ -52,6 +50,9 @@ void dumpNodeFlags(PrintStream& out, NodeFlags flags)
         case NodeResultInt32:
             out.print(comma, "Int32");
             break;
+        case NodeResultInt52:
+            out.print(comma, "Int52");
+            break;
         case NodeResultBoolean:
             out.print(comma, "Boolean");
             break;
@@ -77,13 +78,13 @@ void dumpNodeFlags(PrintStream& out, NodeFlags flags)
         out.print(comma, "MightClobber");
     
     if (flags & NodeResultMask) {
-        if (!(flags & NodeUsedAsNumber) && !(flags & NodeNeedsNegZero))
+        if (!(flags & NodeBytecodeUsesAsNumber) && !(flags & NodeBytecodeNeedsNegZero))
             out.print(comma, "PureInt");
-        else if (!(flags & NodeUsedAsNumber))
+        else if (!(flags & NodeBytecodeUsesAsNumber))
             out.print(comma, "PureInt(w/ neg zero)");
-        else if (!(flags & NodeNeedsNegZero))
+        else if (!(flags & NodeBytecodeNeedsNegZero))
             out.print(comma, "PureNum");
-        if (flags & NodeUsedAsOther)
+        if (flags & NodeBytecodeUsesAsOther)
             out.print(comma, "UseAsOther");
     }
     
@@ -93,14 +94,17 @@ void dumpNodeFlags(PrintStream& out, NodeFlags flags)
     if (flags & NodeMayNegZero)
         out.print(comma, "MayNegZero");
     
-    if (flags & NodeUsedAsInt)
+    if (flags & NodeBytecodeUsesAsInt)
         out.print(comma, "UseAsInt");
     
     if (!(flags & NodeDoesNotExit))
         out.print(comma, "CanExit");
     
-    if (flags & NodeExitsForward)
-        out.print(comma, "NodeExitsForward");
+    CString string = out.toCString();
+    if (!string.length())
+        actualOut.print("<empty>");
+    else
+        actualOut.print(string);
 }
 
 } } // namespace JSC::DFG