Title: [106314] trunk/Source/_javascript_Core
Revision
106314
Author
[email protected]
Date
2012-01-30 18:22:37 -0800 (Mon, 30 Jan 2012)

Log Message

get_by_val_arguments is broken in the interpreter
https://bugs.webkit.org/show_bug.cgi?id=77389

Reviewed by Gavin Barraclough.

When get_by_val had wad a value profile added, the same slot was not added to
get_by_val_arguments.  This broke the interpreter as the interpreter falls
back on its regular get_by_val implementation.

No tests are added as the interpreter is fairly broken in its
current state (multiple tests fail due to this bug).

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecode/Opcode.h:
(JSC):
():
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitGetArgumentByVal):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (106313 => 106314)


--- trunk/Source/_javascript_Core/ChangeLog	2012-01-31 02:20:42 UTC (rev 106313)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-01-31 02:22:37 UTC (rev 106314)
@@ -1,5 +1,27 @@
 2012-01-30  Oliver Hunt  <[email protected]>
 
+        get_by_val_arguments is broken in the interpreter
+        https://bugs.webkit.org/show_bug.cgi?id=77389
+
+        Reviewed by Gavin Barraclough.
+
+        When get_by_val had wad a value profile added, the same slot was not added to
+        get_by_val_arguments.  This broke the interpreter as the interpreter falls
+        back on its regular get_by_val implementation.
+
+        No tests are added as the interpreter is fairly broken in its
+        current state (multiple tests fail due to this bug).
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::dump):
+        * bytecode/Opcode.h:
+        (JSC):
+        ():
+        * bytecompiler/BytecodeGenerator.cpp:
+        (JSC::BytecodeGenerator::emitGetArgumentByVal):
+
+2012-01-30  Oliver Hunt  <[email protected]>
+
         Unexpected syntax error
         https://bugs.webkit.org/show_bug.cgi?id=77340
 

Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (106313 => 106314)


--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2012-01-31 02:20:42 UTC (rev 106313)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2012-01-31 02:22:37 UTC (rev 106314)
@@ -934,6 +934,7 @@
             int r1 = (++it)->u.operand;
             int r2 = (++it)->u.operand;
             printf("[%4d] get_argument_by_val\t %s, %s, %s\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data());
+            ++it;
             break;
         }
         case op_get_by_pname: {

Modified: trunk/Source/_javascript_Core/bytecode/Opcode.h (106313 => 106314)


--- trunk/Source/_javascript_Core/bytecode/Opcode.h	2012-01-31 02:20:42 UTC (rev 106313)
+++ trunk/Source/_javascript_Core/bytecode/Opcode.h	2012-01-31 02:22:37 UTC (rev 106314)
@@ -127,7 +127,7 @@
         macro(op_put_by_id_generic, 9) \
         macro(op_del_by_id, 4) \
         macro(op_get_by_val, 5) /* has value profiling */ \
-        macro(op_get_argument_by_val, 4) \
+        macro(op_get_argument_by_val, 5) /* must be the same size as op_get_by_val */ \
         macro(op_get_by_pname, 7) \
         macro(op_put_by_val, 4) \
         macro(op_del_by_val, 4) \

Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (106313 => 106314)


--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp	2012-01-31 02:20:42 UTC (rev 106313)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp	2012-01-31 02:22:37 UTC (rev 106314)
@@ -1593,11 +1593,12 @@
 
 RegisterID* BytecodeGenerator::emitGetArgumentByVal(RegisterID* dst, RegisterID* base, RegisterID* property)
 {
-    emitOpcode(op_get_argument_by_val);
+    ValueProfile* profile = ""
     instructions().append(dst->index());
     ASSERT(base->index() == m_codeBlock->argumentsRegister());
     instructions().append(base->index());
     instructions().append(property->index());
+    instructions().append(profile);
     return dst;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to