Title: [97295] trunk/Source/_javascript_Core
Revision
97295
Author
[email protected]
Date
2011-10-12 13:47:40 -0700 (Wed, 12 Oct 2011)

Log Message

Unreviewed, re-land changes from #69890, #69903.

These were reverted due to bug #69897, but #69903 fixed this problem.

* dfg/DFGJITCodeGenerator.h:
(JSC::DFG::JITCodeGenerator::silentFillGPR):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (97294 => 97295)


--- trunk/Source/_javascript_Core/ChangeLog	2011-10-12 20:28:49 UTC (rev 97294)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-10-12 20:47:40 UTC (rev 97295)
@@ -1,3 +1,12 @@
+2011-10-12  Gavin Barraclough  <[email protected]>
+
+        Unreviewed, re-land changes from #69890, #69903.
+
+        These were reverted due to bug #69897, but #69903 fixed this problem.
+
+        * dfg/DFGJITCodeGenerator.h:
+        (JSC::DFG::JITCodeGenerator::silentFillGPR):
+
 2011-10-12  Filip Pizlo  <[email protected]>
 
         ValueProfile::computeUpdatedPrediction doesn't merge statistics correctly

Modified: trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator.h (97294 => 97295)


--- trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator.h	2011-10-12 20:28:49 UTC (rev 97294)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator.h	2011-10-12 20:47:40 UTC (rev 97295)
@@ -54,7 +54,9 @@
 class JITCodeGenerator {
 protected:
     typedef JITCompiler::TrustedImm32 TrustedImm32;
-    typedef MacroAssembler::Imm32 Imm32;
+    typedef JITCompiler::Imm32 Imm32;
+    typedef JITCompiler::TrustedImmPtr TrustedImmPtr;
+    typedef JITCompiler::ImmPtr ImmPtr;
 
     // These constants are used to set priorities for spill order for
     // the register allocator.
@@ -336,31 +338,40 @@
         ASSERT(info.registerFormat() != DataFormatDouble);
         DataFormat registerFormat = info.registerFormat();
 
-#if USE(JSVALUE64)
         if (registerFormat == DataFormatInteger) {
             if (node.hasConstant()) {
                 ASSERT(isInt32Constant(nodeIndex));
                 m_jit.move(Imm32(valueOfInt32Constant(nodeIndex)), info.gpr());
             } else
-                m_jit.load32(JITCompiler::addressFor(spillMe), info.gpr());
+                m_jit.load32(JITCompiler::payloadFor(spillMe), info.gpr());
             return;
         }
 
+        if (registerFormat == DataFormatCell) {
+            if (node.isConstant()) {
+                JSValue value = valueOfJSConstant(nodeIndex);
+                ASSERT(value.isCell());
+                m_jit.move(ImmPtr(value.asCell()), info.gpr());
+            } else
+                m_jit.loadPtr(JITCompiler::payloadFor(spillMe), info.gpr());
+            return;
+        }
+
+        if (registerFormat == DataFormatStorage) {
+            m_jit.loadPtr(JITCompiler::addressFor(spillMe), info.gpr());
+            return;
+        }
+
+        ASSERT(registerFormat & DataFormatJS);
+#if USE(JSVALUE64)
         if (node.hasConstant())
             m_jit.move(valueOfJSConstantAsImmPtr(nodeIndex), info.gpr());
-        else {
-            ASSERT(registerFormat & DataFormatJS || registerFormat == DataFormatCell || registerFormat == DataFormatStorage);
+        else
             m_jit.loadPtr(JITCompiler::addressFor(spillMe), info.gpr());
-        }
-#elif USE(JSVALUE32_64)
-        if (registerFormat == DataFormatInteger || registerFormat == DataFormatCell) {
-            if (node.isConstant())
-                m_jit.move(Imm32(valueOfInt32Constant(nodeIndex)), info.gpr());
-            else
-                m_jit.load32(JITCompiler::payloadFor(spillMe), info.gpr());
-        } else if (registerFormat == DataFormatStorage)
-            m_jit.load32(JITCompiler::addressFor(spillMe), info.gpr());
-        else 
+#else
+        if (node.hasConstant())
+            m_jit.emitLoad(valueOfJSConstant(nodeIndex), info.tagGPR(), info.payloadGPR());
+        else
             m_jit.emitLoad(nodeIndex, info.tagGPR(), info.payloadGPR());
 #endif
     }

Modified: trunk/Source/_javascript_Core/wtf/Platform.h (97294 => 97295)


--- trunk/Source/_javascript_Core/wtf/Platform.h	2011-10-12 20:28:49 UTC (rev 97294)
+++ trunk/Source/_javascript_Core/wtf/Platform.h	2011-10-12 20:47:40 UTC (rev 97295)
@@ -901,7 +901,7 @@
 #endif
 
 /* Currently only implemented for JSVALUE64, only tested on PLATFORM(MAC) */
-#if !defined(ENABLE_DFG_JIT) && ENABLE(JIT) && USE(JSVALUE64) && PLATFORM(MAC)
+#if !defined(ENABLE_DFG_JIT) && ENABLE(JIT) && PLATFORM(MAC)
 #define ENABLE_DFG_JIT 1
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to