Changeset 162390 in webkit
- Timestamp:
- Jan 20, 2014 4:46:17 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r162389 r162390 1 2014-01-20 Filip Pizlo <fpizlo@apple.com> 2 3 op_captured_mov and op_new_captured_func in UnlinkedCodeBlocks should use the IdentifierMap instead of the strings directly 4 https://bugs.webkit.org/show_bug.cgi?id=127311 5 <rdar://problem/15853958> 6 7 Reviewed by Andreas Kling. 8 9 This makes UnlinkedCodeBlocks use 32-bit instruction streams again. 10 11 * bytecode/CodeBlock.cpp: 12 (JSC::CodeBlock::CodeBlock): 13 * bytecode/UnlinkedCodeBlock.h: 14 (JSC::UnlinkedInstruction::UnlinkedInstruction): 15 * bytecompiler/BytecodeGenerator.cpp: 16 (JSC::BytecodeGenerator::addVar): 17 (JSC::BytecodeGenerator::emitInitLazyRegister): 18 (JSC::BytecodeGenerator::createArgumentsIfNecessary): 19 * bytecompiler/BytecodeGenerator.h: 20 (JSC::BytecodeGenerator::watchableVariable): 21 (JSC::BytecodeGenerator::hasWatchableVariable): 22 1 23 2014-01-20 Mark Lam <mark.lam@apple.com> 2 24 -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r162389 r162390 1816 1816 case op_captured_mov: 1817 1817 case op_new_captured_func: { 1818 StringImpl* uid = pc[i + 3].u.uid;1819 if (!uid)1818 if (pc[i + 3].u.index == UINT_MAX) { 1819 instructions[i + 3].u.watchpointSet = 0; 1820 1820 break; 1821 } 1822 StringImpl* uid = identifier(pc[i + 3].u.index).impl(); 1821 1823 RELEASE_ASSERT(didCloneSymbolTable); 1822 1824 ConcurrentJITLocker locker(m_symbolTable->m_lock); -
trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h
r162389 r162390 229 229 UnlinkedInstruction(OpcodeID opcode) { u.opcode = opcode; } 230 230 UnlinkedInstruction(int operand) { u.operand = operand; } 231 UnlinkedInstruction(StringImpl* uid) { u.uid = uid; }232 231 union { 233 232 OpcodeID opcode; 234 233 int32_t operand; 235 StringImpl* uid;234 unsigned index; 236 235 } u; 237 236 }; -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r162270 r162390 133 133 if (watchMode == IsWatchable) { 134 134 while (m_watchableVariables.size() < static_cast<size_t>(m_codeBlock->m_numVars)) 135 m_watchableVariables.append( nullptr);136 m_watchableVariables.append(ident .impl());135 m_watchableVariables.append(Identifier()); 136 m_watchableVariables.append(ident); 137 137 } 138 138 … … 470 470 emitOpcode(op_init_lazy_reg); 471 471 instructions().append(reg->index()); 472 ASSERT(! watchableVariable(reg->index()));472 ASSERT(!hasWatchableVariable(reg->index())); 473 473 return reg; 474 474 } … … 1629 1629 emitOpcode(op_create_arguments); 1630 1630 instructions().append(m_codeBlock->argumentsRegister().offset()); 1631 ASSERT(! watchableVariable(m_codeBlock->argumentsRegister().offset()));1631 ASSERT(!hasWatchableVariable(m_codeBlock->argumentsRegister().offset())); 1632 1632 } 1633 1633 -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r160109 r162390 592 592 RegisterID* createLazyRegisterIfNecessary(RegisterID*); 593 593 594 StringImpl*watchableVariable(int operand)594 unsigned watchableVariable(int operand) 595 595 { 596 596 VirtualRegister reg(operand); 597 597 if (!reg.isLocal()) 598 return 0;598 return UINT_MAX; 599 599 if (static_cast<size_t>(reg.toLocal()) >= m_watchableVariables.size()) 600 return 0; 601 return m_watchableVariables[reg.toLocal()]; 600 return UINT_MAX; 601 Identifier& ident = m_watchableVariables[reg.toLocal()]; 602 if (ident.isNull()) 603 return UINT_MAX; 604 return addConstant(ident); 605 } 606 607 bool hasWatchableVariable(int operand) 608 { 609 return watchableVariable(operand) != UINT_MAX; 602 610 } 603 611 … … 621 629 RegisterID* m_emptyValueRegister; 622 630 RegisterID* m_globalObjectRegister; 623 Vector< StringImpl*, 16> m_watchableVariables;631 Vector<Identifier, 16> m_watchableVariables; 624 632 SegmentedVector<RegisterID, 32> m_constantPoolRegisters; 625 633 SegmentedVector<RegisterID, 32> m_calleeRegisters;
Note: See TracChangeset
for help on using the changeset viewer.