Changeset 88866 in webkit


Ignore:
Timestamp:
Jun 14, 2011 4:05:40 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-14 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r88841.
http://trac.webkit.org/changeset/88841
https://bugs.webkit.org/show_bug.cgi?id=62672

Caused many tests to crash (Requested by rniwa on #webkit).

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::dump):
  • bytecode/CodeBlock.h:
  • bytecode/Opcode.h:
  • bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::emitNewArray):
  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp: (JSC::ArrayNode::emitBytecode):
  • interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute):
  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass):
  • jit/JIT.h:
  • jit/JITOpcodes.cpp: (JSC::JIT::emit_op_new_array):
  • jit/JITOpcodes32_64.cpp: (JSC::JIT::emit_op_new_array):
  • jit/JITStubs.cpp:
  • jit/JITStubs.h:
Location:
trunk/Source/JavaScriptCore
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r88841 r88866  
     12011-06-14  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r88841.
     4        http://trac.webkit.org/changeset/88841
     5        https://bugs.webkit.org/show_bug.cgi?id=62672
     6
     7        Caused many tests to crash (Requested by rniwa on #webkit).
     8
     9        * bytecode/CodeBlock.cpp:
     10        (JSC::CodeBlock::dump):
     11        * bytecode/CodeBlock.h:
     12        * bytecode/Opcode.h:
     13        * bytecompiler/BytecodeGenerator.cpp:
     14        (JSC::BytecodeGenerator::emitNewArray):
     15        * bytecompiler/BytecodeGenerator.h:
     16        * bytecompiler/NodesCodegen.cpp:
     17        (JSC::ArrayNode::emitBytecode):
     18        * interpreter/Interpreter.cpp:
     19        (JSC::Interpreter::privateExecute):
     20        * jit/JIT.cpp:
     21        (JSC::JIT::privateCompileMainPass):
     22        * jit/JIT.h:
     23        * jit/JITOpcodes.cpp:
     24        (JSC::JIT::emit_op_new_array):
     25        * jit/JITOpcodes32_64.cpp:
     26        (JSC::JIT::emit_op_new_array):
     27        * jit/JITStubs.cpp:
     28        * jit/JITStubs.h:
     29
    1302011-06-14  Oliver Hunt  <oliver@apple.com>
    231
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r88841 r88866  
    531531            break;
    532532        }
    533         case op_new_array_buffer: {
    534             int dst = (++it)->u.operand;
    535             int argv = (++it)->u.operand;
    536             int argc = (++it)->u.operand;
    537             printf("[%4d] new_array_buffer %s, %d, %d\n", location, registerName(exec, dst).data(), argv, argc);
    538             break;
    539         }
    540533        case op_new_regexp: {
    541534            int r0 = (++it)->u.operand;
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.h

    r88841 r88866  
    457457        RegExp* regexp(int index) const { ASSERT(m_rareData); return m_rareData->m_regexps[index].get(); }
    458458
    459         unsigned addImmediateBuffer(unsigned length)
    460         {
    461             createRareDataIfNecessary();
    462             unsigned size = m_rareData->m_immediateBuffers.size();
    463             m_rareData->m_immediateBuffers.append(Vector<JSValue>(length));
    464             return size;
    465         }
    466 
    467         JSValue* immediateBuffer(unsigned index)
    468         {
    469             ASSERT(m_rareData);
    470             return m_rareData->m_immediateBuffers[index].data();
    471         }
    472 
    473459        JSGlobalObject* globalObject() { return m_globalObject.get(); }
    474460
     
    574560            Vector<WriteBarrier<RegExp> > m_regexps;
    575561
    576             // Buffers used for large array literals
    577             Vector<Vector<JSValue> > m_immediateBuffers;
    578            
    579562            // Jump Tables
    580563            Vector<SimpleJumpTable> m_immediateSwitchJumpTables;
  • trunk/Source/JavaScriptCore/bytecode/Opcode.h

    r88841 r88866  
    5050        macro(op_new_object, 2) \
    5151        macro(op_new_array, 4) \
    52         macro(op_new_array_buffer, 4) \
    5352        macro(op_new_regexp, 3) \
    5453        macro(op_mov, 3) \
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r88841 r88866  
    15421542}
    15431543
    1544 unsigned BytecodeGenerator::addImmediateBuffer(unsigned length)
    1545 {
    1546     return m_codeBlock->addImmediateBuffer(length);
    1547 }
    1548 
    1549 RegisterID* BytecodeGenerator::emitNewArray(RegisterID* dst, ElementNode* elements, unsigned length)
    1550 {
    1551 #if !ASSERT_DISABLED
    1552     unsigned checkLength = 0;
    1553 #endif
    1554     bool hadNonNumber = false;
    1555     for (ElementNode* n = elements; n; n = n->next()) {
    1556 #if !ASSERT_DISABLED
    1557         checkLength++;
    1558 #endif
    1559         if (!n->value()->isNumber()) {
    1560             hadNonNumber = true;
    1561             break;
    1562         }
    1563     }
    1564     if (!hadNonNumber) {
    1565         ASSERT(length == checkLength);
    1566         unsigned immediateBufferIndex = addImmediateBuffer(length);
    1567         JSValue* immediateBuffer = m_codeBlock->immediateBuffer(immediateBufferIndex);
    1568         unsigned index = 0;
    1569         for (ElementNode* n = elements; n; n = n->next())
    1570             immediateBuffer[index++] = jsNumber(static_cast<NumberNode*>(n->value())->value());
    1571         emitOpcode(op_new_array_buffer);
    1572         instructions().append(dst->index());
    1573         instructions().append(immediateBufferIndex);
    1574         instructions().append(length);
    1575         return dst;
    1576     }
    1577 
     1544RegisterID* BytecodeGenerator::emitNewArray(RegisterID* dst, ElementNode* elements)
     1545{
    15781546    Vector<RefPtr<RegisterID>, 16> argv;
    15791547    for (ElementNode* n = elements; n; n = n->next()) {
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h

    r88841 r88866  
    286286
    287287        RegisterID* emitNewObject(RegisterID* dst);
    288         RegisterID* emitNewArray(RegisterID* dst, ElementNode*, unsigned length); // stops at first elision
     288        RegisterID* emitNewArray(RegisterID* dst, ElementNode*); // stops at first elision
    289289
    290290        RegisterID* emitNewFunction(RegisterID* dst, FunctionBodyNode* body);
     
    478478        unsigned addRegExp(RegExp*);
    479479
    480         unsigned addImmediateBuffer(unsigned length);
    481        
    482480        FunctionExecutable* makeFunction(ExecState* exec, FunctionBodyNode* body)
    483481        {
  • trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp

    r88841 r88866  
    172172
    173173    if (!firstPutElement && !m_elision)
    174         return generator.emitNewArray(generator.finalDestination(dst), m_element, length);
    175 
    176     RefPtr<RegisterID> array = generator.emitNewArray(generator.tempDestination(dst), m_element, length);
     174        return generator.emitNewArray(generator.finalDestination(dst), m_element);
     175
     176    RefPtr<RegisterID> array = generator.emitNewArray(generator.tempDestination(dst), m_element);
    177177
    178178    for (ElementNode* n = firstPutElement; n; n = n->next()) {
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r88841 r88866  
    15521552        callFrame->uncheckedR(dst) = JSValue(constructArray(callFrame, args));
    15531553
    1554         vPC += OPCODE_LENGTH(op_new_array);
    1555         NEXT_INSTRUCTION();
    1556     }
    1557     DEFINE_OPCODE(op_new_array_buffer) {
    1558         /* new_array_buffer dst(r) index(n) argCount(n)
    1559          
    1560          Constructs a new Array instance using the original
    1561          constructor, and puts the result in register dst.
    1562          The array be initialized with the values from immediateBuffer[index]
    1563          */
    1564         int dst = vPC[1].u.operand;
    1565         int firstArg = vPC[2].u.operand;
    1566         int argCount = vPC[3].u.operand;
    1567         ArgList args(codeBlock->immediateBuffer(firstArg), argCount);
    1568         callFrame->uncheckedR(dst) = JSValue(constructArray(callFrame, args));
    1569        
    15701554        vPC += OPCODE_LENGTH(op_new_array);
    15711555        NEXT_INSTRUCTION();
  • trunk/Source/JavaScriptCore/jit/JIT.cpp

    r88841 r88866  
    273273        DEFINE_OP(op_neq_null)
    274274        DEFINE_OP(op_new_array)
    275         DEFINE_OP(op_new_array_buffer)
    276275        DEFINE_OP(op_new_func)
    277276        DEFINE_OP(op_new_func_exp)
  • trunk/Source/JavaScriptCore/jit/JIT.h

    r88841 r88866  
    779779        void emit_op_neq_null(Instruction*);
    780780        void emit_op_new_array(Instruction*);
    781         void emit_op_new_array_buffer(Instruction*);
    782781        void emit_op_new_func(Instruction*);
    783782        void emit_op_new_func_exp(Instruction*);
  • trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp

    r88841 r88866  
    580580}
    581581
     582void JIT::emit_op_new_array(Instruction* currentInstruction)
     583{
     584    JITStubCall stubCall(this, cti_op_new_array);
     585    stubCall.addArgument(Imm32(currentInstruction[2].u.operand));
     586    stubCall.addArgument(Imm32(currentInstruction[3].u.operand));
     587    stubCall.call(currentInstruction[1].u.operand);
     588}
     589
    582590void JIT::emit_op_resolve(Instruction* currentInstruction)
    583591{
     
    17271735}
    17281736
    1729 void JIT::emit_op_new_array(Instruction* currentInstruction)
    1730 {
    1731     JITStubCall stubCall(this, cti_op_new_array);
    1732     stubCall.addArgument(Imm32(currentInstruction[2].u.operand));
    1733     stubCall.addArgument(Imm32(currentInstruction[3].u.operand));
    1734     stubCall.call(currentInstruction[1].u.operand);
    1735 }
    1736 
    1737 void JIT::emit_op_new_array_buffer(Instruction* currentInstruction)
    1738 {
    1739     JITStubCall stubCall(this, cti_op_new_array_buffer);
    1740     stubCall.addArgument(Imm32(currentInstruction[2].u.operand));
    1741     stubCall.addArgument(Imm32(currentInstruction[3].u.operand));
    1742     stubCall.call(currentInstruction[1].u.operand);
    1743 }
    1744 
    17451737} // namespace JSC
    17461738
  • trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp

    r88841 r88866  
    734734}
    735735
     736void JIT::emit_op_new_array(Instruction* currentInstruction)
     737{
     738    JITStubCall stubCall(this, cti_op_new_array);
     739    stubCall.addArgument(Imm32(currentInstruction[2].u.operand));
     740    stubCall.addArgument(Imm32(currentInstruction[3].u.operand));
     741    stubCall.call(currentInstruction[1].u.operand);
     742}
     743
    736744void JIT::emit_op_resolve(Instruction* currentInstruction)
    737745{
  • trunk/Source/JavaScriptCore/jit/JITStubs.cpp

    r88841 r88866  
    22582258
    22592259    ArgList argList(&stackFrame.callFrame->registers()[stackFrame.args[0].int32()], stackFrame.args[1].int32());
    2260     return constructArray(stackFrame.callFrame, argList);
    2261 }
    2262 
    2263 DEFINE_STUB_FUNCTION(JSObject*, op_new_array_buffer)
    2264 {
    2265     STUB_INIT_STACK_FRAME(stackFrame);
    2266    
    2267     ArgList argList(stackFrame.callFrame->codeBlock()->immediateBuffer(stackFrame.args[0].int32()), stackFrame.args[1].int32());
    22682260    return constructArray(stackFrame.callFrame, argList);
    22692261}
  • trunk/Source/JavaScriptCore/jit/JITStubs.h

    r88841 r88866  
    381381    EncodedJSValue JIT_STUB cti_to_object(STUB_ARGS_DECLARATION);
    382382    JSObject* JIT_STUB cti_op_new_array(STUB_ARGS_DECLARATION);
    383     JSObject* JIT_STUB cti_op_new_array_buffer(STUB_ARGS_DECLARATION);
    384383    JSObject* JIT_STUB cti_op_new_func(STUB_ARGS_DECLARATION);
    385384    JSObject* JIT_STUB cti_op_new_func_exp(STUB_ARGS_DECLARATION);
Note: See TracChangeset for help on using the changeset viewer.