Changeset 122640 in webkit


Ignore:
Timestamp:
Jul 13, 2012 4:12:14 PM (12 years ago)
Author:
oliver@apple.com
Message:

LLInt fails to mark structures stored in the bytecode
https://bugs.webkit.org/show_bug.cgi?id=91296

Reviewed by Geoffrey Garen.

LLInt stores structures in the bytecode, so we need to visit the appropriate
instructions as we would if we were running in the classic interpreter.
This requires adding additional checks for the LLInt specific opcodes, and
the lint specific variants of operand ordering.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::visitStructures):
(JSC::CodeBlock::stronglyVisitStrongReferences):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r122624 r122640  
     12012-07-13  Oliver Hunt  <oliver@apple.com>
     2
     3        LLInt fails to mark structures stored in the bytecode
     4        https://bugs.webkit.org/show_bug.cgi?id=91296
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        LLInt stores structures in the bytecode, so we need to visit the appropriate
     9        instructions as we would if we were running in the classic interpreter.
     10        This requires adding additional checks for the LLInt specific opcodes, and
     11        the lint specific variants of operand ordering.
     12
     13        * bytecode/CodeBlock.cpp:
     14        (JSC::CodeBlock::visitStructures):
     15        (JSC::CodeBlock::stronglyVisitStrongReferences):
     16
    1172012-07-13  Yong Li  <yoli@rim.com>
    218
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r122544 r122640  
    18411841    Interpreter* interpreter = m_globalData->interpreter;
    18421842
    1843     if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id) && vPC[4].u.structure) {
     1843    if ((vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_out_of_line)) && vPC[4].u.structure) {
    18441844        visitor.append(&vPC[4].u.structure);
    18451845        return;
    18461846    }
    1847 
     1847   
    18481848    if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_self) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_custom_self)) {
    18491849        visitor.append(&vPC[4].u.structure);
     
    18611861        return;
    18621862    }
     1863#if ENABLE(LLINT)
     1864    if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_transition_direct) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_transition_direct_out_of_line) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_transition_normal) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_transition_normal_out_of_line)) {
     1865        visitor.append(&vPC[4].u.structure);
     1866        visitor.append(&vPC[6].u.structure);
     1867        if (vPC[7].u.structureChain)
     1868            visitor.append(&vPC[7].u.structureChain);
     1869        return;
     1870    }
     1871#endif
     1872       
    18631873    if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_transition)) {
    18641874        visitor.append(&vPC[4].u.structure);
     
    18681878        return;
    18691879    }
    1870     if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id) && vPC[4].u.structure) {
     1880    if ((vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_out_of_line)) && vPC[4].u.structure) {
    18711881        visitor.append(&vPC[4].u.structure);
    18721882        return;
     
    22392249    }
    22402250#endif
     2251#if ENABLE(LLINT)
     2252    if (!m_globalData->interpreter->classicEnabled() && !!numberOfInstructions() && getJITType() < JITCode::bottomTierJIT()) {
     2253        for (size_t size = m_propertyAccessInstructions.size(), i = 0; i < size; ++i)
     2254            visitStructures(visitor, &instructions()[m_propertyAccessInstructions[i]]);
     2255        for (size_t size = m_globalResolveInstructions.size(), i = 0; i < size; ++i)
     2256            visitStructures(visitor, &instructions()[m_globalResolveInstructions[i]]);
     2257    }
     2258#endif
    22412259
    22422260    updateAllPredictions(Collection);
Note: See TracChangeset for help on using the changeset viewer.