Changeset 106314 in webkit


Ignore:
Timestamp:
Jan 30, 2012 6:22:37 PM (12 years ago)
Author:
oliver@apple.com
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):

Location:
trunk/Source/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r106297 r106314  
     12012-01-30  Oliver Hunt  <oliver@apple.com>
     2
     3        get_by_val_arguments is broken in the interpreter
     4        https://bugs.webkit.org/show_bug.cgi?id=77389
     5
     6        Reviewed by Gavin Barraclough.
     7
     8        When get_by_val had wad a value profile added, the same slot was not added to
     9        get_by_val_arguments.  This broke the interpreter as the interpreter falls
     10        back on its regular get_by_val implementation.
     11
     12        No tests are added as the interpreter is fairly broken in its
     13        current state (multiple tests fail due to this bug).
     14
     15        * bytecode/CodeBlock.cpp:
     16        (JSC::CodeBlock::dump):
     17        * bytecode/Opcode.h:
     18        (JSC):
     19        ():
     20        * bytecompiler/BytecodeGenerator.cpp:
     21        (JSC::BytecodeGenerator::emitGetArgumentByVal):
     22
    1232012-01-30  Oliver Hunt  <oliver@apple.com>
    224
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r106276 r106314  
    935935            int r2 = (++it)->u.operand;
    936936            printf("[%4d] get_argument_by_val\t %s, %s, %s\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data());
     937            ++it;
    937938            break;
    938939        }
  • trunk/Source/JavaScriptCore/bytecode/Opcode.h

    r106255 r106314  
    128128        macro(op_del_by_id, 4) \
    129129        macro(op_get_by_val, 5) /* has value profiling */ \
    130         macro(op_get_argument_by_val, 4) \
     130        macro(op_get_argument_by_val, 5) /* must be the same size as op_get_by_val */ \
    131131        macro(op_get_by_pname, 7) \
    132132        macro(op_put_by_val, 4) \
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r106255 r106314  
    15941594RegisterID* BytecodeGenerator::emitGetArgumentByVal(RegisterID* dst, RegisterID* base, RegisterID* property)
    15951595{
    1596     emitOpcode(op_get_argument_by_val);
     1596    ValueProfile* profile = emitProfiledOpcode(op_get_argument_by_val);
    15971597    instructions().append(dst->index());
    15981598    ASSERT(base->index() == m_codeBlock->argumentsRegister());
    15991599    instructions().append(base->index());
    16001600    instructions().append(property->index());
     1601    instructions().append(profile);
    16011602    return dst;
    16021603}
Note: See TracChangeset for help on using the changeset viewer.