Title: [135462] trunk/Source/_javascript_Core
Revision
135462
Author
fpi...@apple.com
Date
2012-11-21 19:05:34 -0800 (Wed, 21 Nov 2012)

Log Message

dumpOperands() claims that it needs a non-const Operands& when that is completely false
https://bugs.webkit.org/show_bug.cgi?id=103005

Reviewed by Eric Carlson.

* bytecode/Operands.h:
(JSC::dumpOperands):
(JSC):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (135461 => 135462)


--- trunk/Source/_javascript_Core/ChangeLog	2012-11-22 02:06:38 UTC (rev 135461)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-11-22 03:05:34 UTC (rev 135462)
@@ -1,3 +1,14 @@
+2012-11-21  Filip Pizlo  <fpi...@apple.com>
+
+        dumpOperands() claims that it needs a non-const Operands& when that is completely false
+        https://bugs.webkit.org/show_bug.cgi?id=103005
+
+        Reviewed by Eric Carlson.
+
+        * bytecode/Operands.h:
+        (JSC::dumpOperands):
+        (JSC):
+
 2012-11-20  Filip Pizlo  <fpi...@apple.com>
 
         Baseline JIT's disassembly should be just as pretty as the DFG's

Modified: trunk/Source/_javascript_Core/bytecode/Operands.h (135461 => 135462)


--- trunk/Source/_javascript_Core/bytecode/Operands.h	2012-11-22 02:06:38 UTC (rev 135461)
+++ trunk/Source/_javascript_Core/bytecode/Operands.h	2012-11-22 03:05:34 UTC (rev 135462)
@@ -190,7 +190,7 @@
 };
 
 template<typename T, typename Traits>
-void dumpOperands(Operands<T, Traits>& operands, FILE* out)
+void dumpOperands(const Operands<T, Traits>& operands, FILE* out)
 {
     for (size_t argument = 0; argument < operands.numberOfArguments(); ++argument) {
         if (argument)
@@ -205,16 +205,6 @@
     }
 }
 
-template<typename T, typename Traits>
-void dumpOperands(const Operands<T, Traits>& operands, FILE* out)
-{
-    // Use const-cast because:
-    // 1) I don't feel like writing this code twice, and
-    // 2) Some dump() methods may not be const, and I don't really care if that's
-    //    the case.
-    dumpOperands(*const_cast<Operands<T, Traits>*>(&operands), out);
-}
-
 } // namespace JSC
 
 #endif // Operands_h
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to