Changeset 104338 in webkit
- Timestamp:
- Jan 6, 2012 2:15:31 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r104333 r104338 1 2012-01-05 Michael Saboff <msaboff@apple.com> 2 3 Default HashTraits for Opcode don't work for Opcode = 0 4 https://bugs.webkit.org/show_bug.cgi?id=75595 5 6 Reviewed by Oliver Hunt. 7 8 Removed the populating of the m_opcodeIDTable table in the 9 case where the OpcodeID and Opcode are the same (m_enabled is false). 10 Instead we just cast the one type to the other. 11 12 * interpreter/Interpreter.cpp: 13 (JSC::Interpreter::initialize): 14 (JSC::Interpreter::isOpcode): 15 * interpreter/Interpreter.h: 16 (JSC::Interpreter::getOpcodeID): 17 1 18 2012-01-06 Sam Weinig <sam@webkit.org> 2 19 -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r103292 r104338 557 557 Opcode opcode = bitwise_cast<void*>(static_cast<uintptr_t>(i)); 558 558 m_opcodeTable[i] = opcode; 559 m_opcodeIDTable.add(opcode, static_cast<OpcodeID>(i));560 559 } 561 560 } else { … … 670 669 { 671 670 #if ENABLE(COMPUTED_GOTO_INTERPRETER) 671 if (!m_enabled) 672 return opcode >= 0 && static_cast<OpcodeID>(bitwise_cast<uintptr_t>(opcode)) <= op_end; 672 673 return opcode != HashTraits<Opcode>::emptyValue() 673 674 && !HashTraits<Opcode>::isDeletedValue(opcode) -
trunk/Source/JavaScriptCore/interpreter/Interpreter.h
r103292 r104338 115 115 #if ENABLE(COMPUTED_GOTO_INTERPRETER) 116 116 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 122 120 return m_opcodeIDTable.get(opcode); 123 121 #else
Note: See TracChangeset
for help on using the changeset viewer.