Dumping of op_negate bytecode is broken.
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Oct 2016 17:53:40 +0000 (17:53 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Oct 2016 17:53:40 +0000 (17:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=163896

Reviewed by Darin Adler.

It thinks the bytecode consists of only 3 machine words, when it consists of 4.
This is now fixed.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207765 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/CodeBlock.cpp

index ed9e70d..04fdab1 100644 (file)
@@ -1,3 +1,16 @@
+2016-10-24  Mark Lam  <mark.lam@apple.com>
+
+        Dumping of op_negate bytecode is broken.
+        https://bugs.webkit.org/show_bug.cgi?id=163896
+
+        Reviewed by Darin Adler.
+
+        It thinks the bytecode consists of only 3 machine words, when it consists of 4.
+        This is now fixed.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::dumpBytecode):
+
 2016-10-24  Youenn Fablet  <youenn@apple.com>
 
         Activate WEB_RTC compilation flags for Mac bots
index b152112..5b7483c 100644 (file)
@@ -999,6 +999,7 @@ void CodeBlock::dumpBytecode(
         }
         case op_negate: {
             printUnaryOp(out, exec, location, it, "negate");
+            ++it; // op_negate has an extra operand for the ArithProfile.
             break;
         }
         case op_add: {