Title: [99627] trunk/Source/_javascript_Core
Revision
99627
Author
[email protected]
Date
2011-11-08 16:12:35 -0800 (Tue, 08 Nov 2011)

Log Message

Basic DFG definitions should be moved out of DFGNode.h
https://bugs.webkit.org/show_bug.cgi?id=71861

Rubber-stamped by Gavin Barraclough.

* _javascript_Core.xcodeproj/project.pbxproj:
* dfg/DFGCommon.h: Added.
(JSC::DFG::NodeIndexTraits::defaultValue):
* dfg/DFGNode.h:
* dfg/DFGOSRExit.h:
* dfg/DFGRegisterBank.h:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (99626 => 99627)


--- trunk/Source/_javascript_Core/ChangeLog	2011-11-08 23:57:23 UTC (rev 99626)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-11-09 00:12:35 UTC (rev 99627)
@@ -1,3 +1,17 @@
+2011-11-08  Filip Pizlo  <[email protected]>
+
+        Basic DFG definitions should be moved out of DFGNode.h
+        https://bugs.webkit.org/show_bug.cgi?id=71861
+
+        Rubber-stamped by Gavin Barraclough.
+
+        * _javascript_Core.xcodeproj/project.pbxproj:
+        * dfg/DFGCommon.h: Added.
+        (JSC::DFG::NodeIndexTraits::defaultValue):
+        * dfg/DFGNode.h:
+        * dfg/DFGOSRExit.h:
+        * dfg/DFGRegisterBank.h:
+
 2011-11-08  Michael Saboff  <[email protected]>
 
         Towards 8 Bit Strings: Templatize JSC::Parser class by Lexer type

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (99626 => 99627)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2011-11-08 23:57:23 UTC (rev 99626)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2011-11-09 00:12:35 UTC (rev 99627)
@@ -839,6 +839,7 @@
 		0FC097681468A6EF00CF2442 /* DFGOSRExit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGOSRExit.h; path = dfg/DFGOSRExit.h; sourceTree = "<group>"; };
 		0FC0976B1468AB4A00CF2442 /* DFGAssemblyHelpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGAssemblyHelpers.cpp; path = dfg/DFGAssemblyHelpers.cpp; sourceTree = "<group>"; };
 		0FC0976C1468AB4A00CF2442 /* DFGAssemblyHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGAssemblyHelpers.h; path = dfg/DFGAssemblyHelpers.h; sourceTree = "<group>"; };
+		0FC0977E1469EBC400CF2442 /* DFGCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGCommon.h; path = dfg/DFGCommon.h; sourceTree = "<group>"; };
 		0FC8150814043BCA00CFA603 /* WriteBarrierSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WriteBarrierSupport.cpp; sourceTree = "<group>"; };
 		0FC8150914043BD200CFA603 /* WriteBarrierSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WriteBarrierSupport.h; sourceTree = "<group>"; };
 		0FC815121405118600CFA603 /* VTableSpectrum.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VTableSpectrum.cpp; sourceTree = "<group>"; };
@@ -2298,6 +2299,7 @@
 		86EC9DB31328DF44002B2AD7 /* dfg */ = {
 			isa = PBXGroup;
 			children = (
+				0FC0977E1469EBC400CF2442 /* DFGCommon.h */,
 				0FC0976B1468AB4A00CF2442 /* DFGAssemblyHelpers.cpp */,
 				0FC0976C1468AB4A00CF2442 /* DFGAssemblyHelpers.h */,
 				0FC097681468A6EF00CF2442 /* DFGOSRExit.h */,

Added: trunk/Source/_javascript_Core/dfg/DFGCommon.h (0 => 99627)


--- trunk/Source/_javascript_Core/dfg/DFGCommon.h	                        (rev 0)
+++ trunk/Source/_javascript_Core/dfg/DFGCommon.h	2011-11-09 00:12:35 UTC (rev 99627)
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2011 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 DFGCommon_h
+#define DFGCommon_h
+
+#include <wtf/Platform.h>
+
+#if ENABLE(DFG_JIT)
+
+#include "CodeOrigin.h"
+#include "VirtualRegister.h"
+
+/* DFG_ENABLE() - turn on a specific features in the DFG JIT */
+#define DFG_ENABLE(DFG_FEATURE) (defined DFG_ENABLE_##DFG_FEATURE && DFG_ENABLE_##DFG_FEATURE)
+
+// Emit various logging information for debugging, including dumping the dataflow graphs.
+#define DFG_ENABLE_DEBUG_VERBOSE 0
+// Emit dumps during propagation, in addition to just after.
+#define DFG_ENABLE_DEBUG_PROPAGATION_VERBOSE 0
+// Emit logging for OSR exit value recoveries at every node, not just nodes that
+// actually has speculation checks.
+#define DFG_ENABLE_VERBOSE_VALUE_RECOVERIES 0
+// Enable generation of dynamic checks into the instruction stream.
+#if !ASSERT_DISABLED
+#define DFG_ENABLE_JIT_ASSERT 1
+#else
+#define DFG_ENABLE_JIT_ASSERT 0
+#endif
+// Consistency check contents compiler data structures.
+#define DFG_ENABLE_CONSISTENCY_CHECK 0
+// Emit a breakpoint into the head of every generated function, to aid debugging in GDB.
+#define DFG_ENABLE_JIT_BREAK_ON_EVERY_FUNCTION 0
+// Emit a breakpoint into the head of every generated node, to aid debugging in GDB.
+#define DFG_ENABLE_JIT_BREAK_ON_EVERY_BLOCK 0
+// Emit a breakpoint into the head of every generated node, to aid debugging in GDB.
+#define DFG_ENABLE_JIT_BREAK_ON_EVERY_NODE 0
+// Emit a breakpoint into the speculation failure code.
+#define DFG_ENABLE_JIT_BREAK_ON_SPECULATION_FAILURE 0
+// Log every speculation failure.
+#define DFG_ENABLE_VERBOSE_SPECULATION_FAILURE 0
+// Disable the DFG JIT without having to touch Platform.h
+#define DFG_DEBUG_LOCAL_DISBALE 0
+// Enable OSR entry from baseline JIT.
+#define DFG_ENABLE_OSR_ENTRY ENABLE(DFG_JIT)
+// Generate stats on how successful we were in making use of the DFG jit, and remaining on the hot path.
+#define DFG_ENABLE_SUCCESS_STATS 0
+// Used to enable conditionally supported opcodes that currently result in performance regressions.
+#define DFG_ENABLE_RESTRICTIONS 1
+
+namespace JSC { namespace DFG {
+
+// Type for a reference to another node in the graph.
+typedef uint32_t NodeIndex;
+static const NodeIndex NoNode = UINT_MAX;
+
+typedef uint32_t BlockIndex;
+static const BlockIndex NoBlock = UINT_MAX;
+
+struct NodeIndexTraits {
+    static NodeIndex defaultValue() { return NoNode; }
+};
+
+} } // namespace JSC::DFG
+
+#endif // ENABLE(DFG_JIT)
+
+#endif // DFGCommon_h
+

Modified: trunk/Source/_javascript_Core/dfg/DFGNode.h (99626 => 99627)


--- trunk/Source/_javascript_Core/dfg/DFGNode.h	2011-11-08 23:57:23 UTC (rev 99626)
+++ trunk/Source/_javascript_Core/dfg/DFGNode.h	2011-11-09 00:12:35 UTC (rev 99627)
@@ -26,47 +26,13 @@
 #ifndef DFGNode_h
 #define DFGNode_h
 
+#include <wtf/Platform.h>
+
 #if ENABLE(DFG_JIT)
 
-/* DFG_ENABLE() - turn on a specific features in the DFG JIT */
-#define DFG_ENABLE(DFG_FEATURE) (defined DFG_ENABLE_##DFG_FEATURE && DFG_ENABLE_##DFG_FEATURE)
-
-// Emit various logging information for debugging, including dumping the dataflow graphs.
-#define DFG_ENABLE_DEBUG_VERBOSE 0
-// Emit dumps during propagation, in addition to just after.
-#define DFG_ENABLE_DEBUG_PROPAGATION_VERBOSE 0
-// Emit logging for OSR exit value recoveries at every node, not just nodes that
-// actually has speculation checks.
-#define DFG_ENABLE_VERBOSE_VALUE_RECOVERIES 0
-// Enable generation of dynamic checks into the instruction stream.
-#if !ASSERT_DISABLED
-#define DFG_ENABLE_JIT_ASSERT 1
-#else
-#define DFG_ENABLE_JIT_ASSERT 0
-#endif
-// Consistency check contents compiler data structures.
-#define DFG_ENABLE_CONSISTENCY_CHECK 0
-// Emit a breakpoint into the head of every generated function, to aid debugging in GDB.
-#define DFG_ENABLE_JIT_BREAK_ON_EVERY_FUNCTION 0
-// Emit a breakpoint into the head of every generated node, to aid debugging in GDB.
-#define DFG_ENABLE_JIT_BREAK_ON_EVERY_BLOCK 0
-// Emit a breakpoint into the head of every generated node, to aid debugging in GDB.
-#define DFG_ENABLE_JIT_BREAK_ON_EVERY_NODE 0
-// Emit a breakpoint into the speculation failure code.
-#define DFG_ENABLE_JIT_BREAK_ON_SPECULATION_FAILURE 0
-// Log every speculation failure.
-#define DFG_ENABLE_VERBOSE_SPECULATION_FAILURE 0
-// Disable the DFG JIT without having to touch Platform.h
-#define DFG_DEBUG_LOCAL_DISBALE 0
-// Enable OSR entry from baseline JIT.
-#define DFG_ENABLE_OSR_ENTRY ENABLE(DFG_JIT)
-// Generate stats on how successful we were in making use of the DFG jit, and remaining on the hot path.
-#define DFG_ENABLE_SUCCESS_STATS 0
-// Used to enable conditionally supported opcodes that currently result in performance regressions.
-#define DFG_ENABLE_RESTRICTIONS 1
-
 #include "CodeBlock.h"
 #include "CodeOrigin.h"
+#include "DFGCommon.h"
 #include "DFGOperands.h"
 #include "DFGVariableAccessData.h"
 #include "JSValue.h"
@@ -77,17 +43,6 @@
 
 namespace JSC { namespace DFG {
 
-// Type for a reference to another node in the graph.
-typedef uint32_t NodeIndex;
-static const NodeIndex NoNode = UINT_MAX;
-
-typedef uint32_t BlockIndex;
-static const BlockIndex NoBlock = UINT_MAX;
-
-struct NodeIndexTraits {
-    static NodeIndex defaultValue() { return NoNode; }
-};
-
 struct StructureTransitionData {
     Structure* previousStructure;
     Structure* newStructure;

Modified: trunk/Source/_javascript_Core/dfg/DFGOSRExit.h (99626 => 99627)


--- trunk/Source/_javascript_Core/dfg/DFGOSRExit.h	2011-11-08 23:57:23 UTC (rev 99626)
+++ trunk/Source/_javascript_Core/dfg/DFGOSRExit.h	2011-11-09 00:12:35 UTC (rev 99627)
@@ -30,6 +30,7 @@
 
 #if ENABLE(DFG_JIT)
 
+#include "DFGCommon.h"
 #include "DFGGPRInfo.h"
 #include "MacroAssembler.h"
 #include "ValueProfile.h"

Modified: trunk/Source/_javascript_Core/dfg/DFGRegisterBank.h (99626 => 99627)


--- trunk/Source/_javascript_Core/dfg/DFGRegisterBank.h	2011-11-08 23:57:23 UTC (rev 99626)
+++ trunk/Source/_javascript_Core/dfg/DFGRegisterBank.h	2011-11-09 00:12:35 UTC (rev 99627)
@@ -28,7 +28,7 @@
 
 #if ENABLE(DFG_JIT)
 
-#include <dfg/DFGNode.h>
+#include <dfg/DFGCommon.h>
 
 namespace JSC { namespace DFG {
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to