Ignore:
Timestamp:
Jan 6, 2012, 2:15:31 PM (13 years ago)
Author:
[email protected]
Message:

Default HashTraits for Opcode don't work for Opcode = 0
https://bugs.webkit.org/show_bug.cgi?id=75595

Reviewed by Oliver Hunt.

Removed the populating of the m_opcodeIDTable table in the
case where the OpcodeID and Opcode are the same (m_enabled is false).
Instead we just cast the one type to the other.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::initialize):
(JSC::Interpreter::isOpcode):

  • interpreter/Interpreter.h:

(JSC::Interpreter::getOpcodeID):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r103292 r104338  
    557557            Opcode opcode = bitwise_cast<void*>(static_cast<uintptr_t>(i));
    558558            m_opcodeTable[i] = opcode;
    559             m_opcodeIDTable.add(opcode, static_cast<OpcodeID>(i));
    560559        }
    561560    } else {
     
    670669{
    671670#if ENABLE(COMPUTED_GOTO_INTERPRETER)
     671    if (!m_enabled)
     672        return opcode >= 0 && static_cast<OpcodeID>(bitwise_cast<uintptr_t>(opcode)) <= op_end;
    672673    return opcode != HashTraits<Opcode>::emptyValue()
    673674        && !HashTraits<Opcode>::isDeletedValue(opcode)
Note: See TracChangeset for help on using the changeset viewer.