Ignore:
Timestamp:
Dec 1, 2015, 5:37:19 PM (10 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r192914.
https://bugs.webkit.org/show_bug.cgi?id=151734

JSC tests for this change are failing on 32 and 64-bit bots
(Requested by ryanhaddad on #webkit).

Reverted changeset:

"[ES6] Implement LLInt/Baseline Support for ES6 Generators and
enable this feature"
https://bugs.webkit.org/show_bug.cgi?id=150792
http://trac.webkit.org/changeset/192914

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r192914 r192935  
    586586        static_cast<unsigned long>(instructions().size()),
    587587        static_cast<unsigned long>(instructions().size() * sizeof(Instruction)),
    588         m_numParameters, m_numCalleeLocals, m_numVars);
     588        m_numParameters, m_numCalleeRegisters, m_numVars);
    589589    if (needsActivation() && codeType() == FunctionCode)
    590590        out.printf("; lexical environment in r%d", activationRegister().offset());
     
    681681    }
    682682
    683     if (m_rareData && !m_rareData->m_liveCalleeLocalsAtYield.isEmpty()) {
    684         out.printf("\nLive Callee Locals:\n");
    685         unsigned i = 0;
    686         do {
    687             const FastBitVector& liveness = m_rareData->m_liveCalleeLocalsAtYield[i];
    688             out.printf("  live%1u = ", i);
    689             liveness.dump(out);
    690             out.printf("\n");
    691             ++i;
    692         } while (i < m_rareData->m_liveCalleeLocalsAtYield.size());
    693     }
    694 
    695683    out.printf("\n");
    696684}
     
    13161304            break;
    13171305        }
    1318         case op_new_generator_func: {
    1319             int r0 = (++it)->u.operand;
    1320             int r1 = (++it)->u.operand;
    1321             int f0 = (++it)->u.operand;
    1322             printLocationAndOp(out, exec, location, it, "new_generator_func");
    1323             out.printf("%s, %s, f%d", registerName(r0).data(), registerName(r1).data(), f0);
    1324             break;
    1325         }
    13261306        case op_new_arrow_func_exp: {
    13271307            int r0 = (++it)->u.operand;
     
    13381318            int f0 = (++it)->u.operand;
    13391319            printLocationAndOp(out, exec, location, it, "new_func_exp");
    1340             out.printf("%s, %s, f%d", registerName(r0).data(), registerName(r1).data(), f0);
    1341             break;
    1342         }
    1343         case op_new_generator_func_exp: {
    1344             int r0 = (++it)->u.operand;
    1345             int r1 = (++it)->u.operand;
    1346             int f0 = (++it)->u.operand;
    1347             printLocationAndOp(out, exec, location, it, "new_generator_func_exp");
    13481320            out.printf("%s, %s, f%d", registerName(r0).data(), registerName(r1).data(), f0);
    13491321            break;
     
    15371509            break;
    15381510        }
    1539         case op_save: {
    1540             int generator = (++it)->u.operand;
    1541             unsigned liveCalleeLocalsIndex = (++it)->u.unsignedValue;
    1542             int offset = (++it)->u.operand;
    1543             const FastBitVector& liveness = m_rareData->m_liveCalleeLocalsAtYield[liveCalleeLocalsIndex];
    1544             printLocationAndOp(out, exec, location, it, "save");
    1545             out.printf("%s, ", registerName(generator).data());
    1546             liveness.dump(out);
    1547             out.printf("(@live%1u), %d(->%d)", liveCalleeLocalsIndex, offset, location + offset);
    1548             break;
    1549         }
    1550         case op_resume: {
    1551             int generator = (++it)->u.operand;
    1552             unsigned liveCalleeLocalsIndex = (++it)->u.unsignedValue;
    1553             const FastBitVector& liveness = m_rareData->m_liveCalleeLocalsAtYield[liveCalleeLocalsIndex];
    1554             printLocationAndOp(out, exec, location, it, "resume");
    1555             out.printf("%s, ", registerName(generator).data());
    1556             liveness.dump(out);
    1557             out.printf("(@live%1u)", liveCalleeLocalsIndex);
    1558             break;
    1559         }
    15601511        case op_assert: {
    15611512            int condition = (++it)->u.operand;
     
    17221673    , m_globalObject(other.m_globalObject)
    17231674    , m_heap(other.m_heap)
    1724     , m_numCalleeLocals(other.m_numCalleeLocals)
     1675    , m_numCalleeRegisters(other.m_numCalleeRegisters)
    17251676    , m_numVars(other.m_numVars)
    17261677    , m_isConstructor(other.m_isConstructor)
     
    17791730        m_rareData->m_switchJumpTables = other.m_rareData->m_switchJumpTables;
    17801731        m_rareData->m_stringSwitchJumpTables = other.m_rareData->m_stringSwitchJumpTables;
    1781         m_rareData->m_liveCalleeLocalsAtYield = other.m_rareData->m_liveCalleeLocalsAtYield;
    17821732    }
    17831733   
     
    17901740    , m_globalObject(scope->globalObject()->vm(), this, scope->globalObject())
    17911741    , m_heap(&m_globalObject->vm().heap)
    1792     , m_numCalleeLocals(unlinkedCodeBlock->m_numCalleeLocals)
     1742    , m_numCalleeRegisters(unlinkedCodeBlock->m_numCalleeRegisters)
    17931743    , m_numVars(unlinkedCodeBlock->m_numVars)
    17941744    , m_isConstructor(unlinkedCodeBlock->isConstructor())
     
    19601910    HashSet<JSModuleEnvironment*> stronglyReferencedModuleEnvironments;
    19611911
    1962     // Bookkeep the merge point bytecode offsets.
    1963     Vector<size_t> mergePointBytecodeOffsets;
    1964 
    19651912    RefCountedArray<Instruction> instructions(instructionCount);
    19661913
     
    22512198        }
    22522199
    2253         case op_save: {
    2254             unsigned liveCalleeLocalsIndex = pc[2].u.index;
    2255             int offset = pc[3].u.operand;
    2256             if (liveCalleeLocalsIndex >= mergePointBytecodeOffsets.size())
    2257                 mergePointBytecodeOffsets.resize(liveCalleeLocalsIndex + 1);
    2258             mergePointBytecodeOffsets[liveCalleeLocalsIndex] = i + offset;
    2259             break;
    2260         }
    2261 
    22622200        default:
    22632201            break;
     
    22702208
    22712209    m_instructions = WTF::move(instructions);
    2272 
    2273     // Perform bytecode liveness analysis to determine which locals are live and should be resumed when executing op_resume.
    2274     if (unlinkedCodeBlock->parseMode() == SourceParseMode::GeneratorBodyMode) {
    2275         if (size_t count = mergePointBytecodeOffsets.size()) {
    2276             createRareDataIfNecessary();
    2277             BytecodeLivenessAnalysis liveness(this);
    2278             m_rareData->m_liveCalleeLocalsAtYield.grow(count);
    2279             size_t liveCalleeLocalsIndex = 0;
    2280             for (size_t bytecodeOffset : mergePointBytecodeOffsets) {
    2281                 m_rareData->m_liveCalleeLocalsAtYield[liveCalleeLocalsIndex] = liveness.getLivenessInfoAtBytecodeOffset(bytecodeOffset);
    2282                 ++liveCalleeLocalsIndex;
    2283             }
    2284         }
    2285     }
    22862210
    22872211    // Set optimization thresholds only after m_instructions is initialized, since these
     
    23082232    , m_globalObject(globalObject->vm(), this, globalObject)
    23092233    , m_heap(&m_globalObject->vm().heap)
    2310     , m_numCalleeLocals(0)
     2234    , m_numCalleeRegisters(0)
    23112235    , m_numVars(0)
    23122236    , m_isConstructor(false)
     
    31353059            m_rareData->m_switchJumpTables.shrinkToFit();
    31363060            m_rareData->m_stringSwitchJumpTables.shrinkToFit();
    3137             m_rareData->m_liveCalleeLocalsAtYield.shrinkToFit();
    31383061        }
    31393062    } // else don't shrink these, because we would have already pointed pointers into these tables.
     
    41074030    FastBitVector liveAtHead = liveness.getLivenessInfoAtBytecodeOffset(0);
    41084031   
    4109     if (liveAtHead.numBits() != static_cast<size_t>(m_numCalleeLocals)) {
     4032    if (liveAtHead.numBits() != static_cast<size_t>(m_numCalleeRegisters)) {
    41104033        beginValidationDidFail();
    41114034        dataLog("    Wrong number of bits in result!\n");
     
    41154038    }
    41164039   
    4117     for (unsigned i = m_numCalleeLocals; i--;) {
     4040    for (unsigned i = m_numCalleeRegisters; i--;) {
    41184041        VirtualRegister reg = virtualRegisterForLocal(i);
    41194042       
Note: See TracChangeset for help on using the changeset viewer.