Title: [99265] trunk/Source/_javascript_Core
Revision
99265
Author
[email protected]
Date
2011-11-04 00:45:37 -0700 (Fri, 04 Nov 2011)

Log Message

More code clean-up in DFG 32_64
https://bugs.webkit.org/show_bug.cgi?id=71540

Remove unnecessary code duplications, and fix compilation warnings.

Patch by Yuqiang Xian <[email protected]> on 2011-11-04
Reviewed by Gavin Barraclough.

* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::emitCount):
(JSC::DFG::JITCompiler::setSamplingFlag):
(JSC::DFG::JITCompiler::clearSamplingFlag):
(JSC::DFG::JITCompiler::jitAssertIsCell):
* dfg/DFGJITCompiler32_64.cpp:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (99264 => 99265)


--- trunk/Source/_javascript_Core/ChangeLog	2011-11-04 07:35:18 UTC (rev 99264)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-11-04 07:45:37 UTC (rev 99265)
@@ -1,3 +1,21 @@
+2011-11-04  Yuqiang Xian  <[email protected]>
+
+        More code clean-up in DFG 32_64
+        https://bugs.webkit.org/show_bug.cgi?id=71540
+
+        Remove unnecessary code duplications, and fix compilation warnings.
+
+        Reviewed by Gavin Barraclough.
+
+        * dfg/DFGJITCompiler.cpp:
+        (JSC::DFG::JITCompiler::emitCount):
+        (JSC::DFG::JITCompiler::setSamplingFlag):
+        (JSC::DFG::JITCompiler::clearSamplingFlag):
+        (JSC::DFG::JITCompiler::jitAssertIsCell):
+        * dfg/DFGJITCompiler32_64.cpp:
+        * dfg/DFGSpeculativeJIT32_64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+
 2011-11-04  Csaba Osztrogonác  <[email protected]>
 
         De-virtualize JSObject::hasInstance

Modified: trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp (99264 => 99265)


--- trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp	2011-11-04 07:35:18 UTC (rev 99264)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp	2011-11-04 07:45:37 UTC (rev 99265)
@@ -289,6 +289,38 @@
     entry = JITCode(linkBuffer.finalizeCode(), JITCode::DFGJIT);
 }
 
+#if ENABLE(SAMPLING_COUNTERS) && CPU(X86_64) // Or any other 64-bit platform!
+void JITCompiler::emitCount(MacroAssembler& jit, AbstractSamplingCounter& counter, uint32_t increment)
+{
+    jit.addPtr(TrustedImm32(increment), AbsoluteAddress(counter.addressOfCounter()));
+}
+#endif
+
+#if ENABLE(SAMPLING_COUNTERS) && CPU(X86) // Or any other little-endian 32-bit platform!
+void JITCompiler::emitCount(MacroAsembler& jit, AbstractSamplingCounter& counter, uint32_t increment)
+{
+    intptr_t hiWord = reinterpret_cast<intptr_t>(counter.addressOfCounter()) + sizeof(int32_t);
+    jit.add32(TrustedImm32(increment), AbsoluteAddress(counter.addressOfCounter()));
+    jit.addWithCarry32(TrustedImm32(0), AbsoluteAddress(reinterpret_cast<void*>(hiWord)));
+}
+#endif
+
+#if ENABLE(SAMPLING_FLAGS)
+void JITCompiler::setSamplingFlag(int32_t flag)
+{
+    ASSERT(flag >= 1);
+    ASSERT(flag <= 32);
+    or32(TrustedImm32(1u << (flag - 1)), AbsoluteAddress(SamplingFlags::addressOfFlags()));
+}
+
+void JITCompiler::clearSamplingFlag(int32_t flag)
+{
+    ASSERT(flag >= 1);
+    ASSERT(flag <= 32);
+    and32(TrustedImm32(~(1u << (flag - 1))), AbsoluteAddress(SamplingFlags::addressOfFlags()));
+}
+#endif
+
 #if USE(JSVALUE64)
 
 void JITCompiler::exitSpeculativeWithOSR(const OSRExit& exit, SpeculationRecovery* recovery)
@@ -855,38 +887,6 @@
 }
 #endif
 
-#if ENABLE(SAMPLING_COUNTERS) && CPU(X86_64) // Or any other 64-bit platform!
-void JITCompiler::emitCount(MacroAssembler& jit, AbstractSamplingCounter& counter, uint32_t increment)
-{
-    jit.addPtr(TrustedImm32(increment), AbsoluteAddress(counter.addressOfCounter()));
-}
-#endif
-
-#if ENABLE(SAMPLING_COUNTERS) && CPU(X86) // Or any other little-endian 32-bit platform!
-void JITCompiler::emitCount(MacroAsembler& jit, AbstractSamplingCounter& counter, uint32_t increment)
-{
-    intptr_t hiWord = reinterpret_cast<intptr_t>(counter.addressOfCounter()) + sizeof(int32_t);
-    jit.add32(TrustedImm32(increment), AbsoluteAddress(counter.addressOfCounter()));
-    jit.addWithCarry32(TrustedImm32(0), AbsoluteAddress(reinterpret_cast<void*>(hiWord)));
-}
-#endif
-
-#if ENABLE(SAMPLING_FLAGS)
-void JITCompiler::setSamplingFlag(int32_t flag)
-{
-    ASSERT(flag >= 1);
-    ASSERT(flag <= 32);
-    or32(TrustedImm32(1u << (flag - 1)), AbsoluteAddress(SamplingFlags::addressOfFlags()));
-}
-
-void JITCompiler::clearSamplingFlag(int32_t flag)
-{
-    ASSERT(flag >= 1);
-    ASSERT(flag <= 32);
-    and32(TrustedImm32(~(1u << (flag - 1))), AbsoluteAddress(SamplingFlags::addressOfFlags()));
-}
-#endif
-
 #endif // USE(JSVALUE64)
 
 } } // namespace JSC::DFG

Modified: trunk/Source/_javascript_Core/dfg/DFGJITCompiler32_64.cpp (99264 => 99265)


--- trunk/Source/_javascript_Core/dfg/DFGJITCompiler32_64.cpp	2011-11-04 07:35:18 UTC (rev 99264)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCompiler32_64.cpp	2011-11-04 07:45:37 UTC (rev 99265)
@@ -595,31 +595,6 @@
 }
 #endif
 
-#if ENABLE(SAMPLING_COUNTERS) && CPU(X86) // Or any other little-endian 32-bit platform!
-void JITCompiler::emitCount(MacroAsembler& jit, AbstractSamplingCounter& counter, uint32_t increment)
-{
-    intptr_t hiWord = reinterpret_cast<intptr_t>(counter.addressOfCounter()) + sizeof(int32_t);
-    jit.add32(TrustedImm32(increment), AbsoluteAddress(counter.addressOfCounter()));
-    jit.addWithCarry32(TrustedImm32(0), AbsoluteAddress(reinterpret_cast<void*>(hiWord)));
-}
-#endif
-
-#if ENABLE(SAMPLING_FLAGS)
-void JITCompiler::setSamplingFlag(int32_t flag)
-{
-    ASSERT(flag >= 1);
-    ASSERT(flag <= 32);
-    or32(TrustedImm32(1u << (flag - 1)), AbsoluteAddress(SamplingFlags::addressOfFlags()));
-}
-
-void JITCompiler::clearSamplingFlag(int32_t flag)
-{
-    ASSERT(flag >= 1);
-    ASSERT(flag <= 32);
-    and32(TrustedImm32(~(1u << (flag - 1))), AbsoluteAddress(SamplingFlags::addressOfFlags()));
-}
-#endif
-
 } } // namespace JSC::DFG
 
 #endif

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp (99264 => 99265)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp	2011-11-04 07:35:18 UTC (rev 99264)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp	2011-11-04 07:45:37 UTC (rev 99265)
@@ -2508,6 +2508,10 @@
         // This is a no-op.
         noResult(m_compileIndex);
         break;
+
+    case InlineStart:
+        ASSERT_NOT_REACHED();
+        break;
     }
 
     if (node.hasResult() && node.mustGenerate())
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to