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.h

    r103292 r104338  
    115115#if ENABLE(COMPUTED_GOTO_INTERPRETER)
    116116            ASSERT(isOpcode(opcode));
    117             if (!m_enabled) {
    118                 OpcodeID result = static_cast<OpcodeID>(bitwise_cast<uintptr_t>(opcode));
    119                 ASSERT(result == m_opcodeIDTable.get(opcode));
    120                 return result;
    121             }
     117            if (!m_enabled)
     118                return static_cast<OpcodeID>(bitwise_cast<uintptr_t>(opcode));
     119
    122120            return m_opcodeIDTable.get(opcode);
    123121#else
Note: See TracChangeset for help on using the changeset viewer.