Changeset 153962 in webkit for trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
- Timestamp:
- Aug 12, 2013, 3:39:13 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r153778 r153962 284 284 int r1 = (++it)->u.operand; 285 285 int id0 = (++it)->u.operand; 286 out.printf("[%4d] %s\t %s, %s, %s", location, op, registerName(r0).data(), registerName(r1).data(), idName(id0, m_identifiers[id0]).data());286 out.printf("[%4d] %s\t %s, %s, %s", location, op, registerName(r0).data(), registerName(r1).data(), idName(id0, identifier(id0)).data()); 287 287 it += 4; // Increment up to the value profiler. 288 288 } 289 289 290 290 #if ENABLE(JIT) || ENABLE(LLINT) // unused in some configurations 291 static void dumpStructure(PrintStream& out, const char* name, ExecState* exec, Structure* structure, Identifier& ident)291 static void dumpStructure(PrintStream& out, const char* name, ExecState* exec, Structure* structure, const Identifier& ident) 292 292 { 293 293 if (!structure) … … 303 303 304 304 #if ENABLE(JIT) // unused when not ENABLE(JIT), leading to silly warnings 305 static void dumpChain(PrintStream& out, ExecState* exec, StructureChain* chain, Identifier& ident)305 static void dumpChain(PrintStream& out, ExecState* exec, StructureChain* chain, const Identifier& ident) 306 306 { 307 307 out.printf("chain = %p: [", chain); … … 324 324 Instruction* instruction = instructions().begin() + location; 325 325 326 Identifier& ident = identifier(instruction[3].u.operand);326 const Identifier& ident = identifier(instruction[3].u.operand); 327 327 328 328 UNUSED_PARAM(ident); // tell the compiler to shut up in certain platform configurations. … … 471 471 int id0 = (++it)->u.operand; 472 472 int r1 = (++it)->u.operand; 473 out.printf("[%4d] %s\t %s, %s, %s", location, op, registerName(r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(r1).data());473 out.printf("[%4d] %s\t %s, %s, %s", location, op, registerName(r0).data(), idName(id0, identifier(id0)).data(), registerName(r1).data()); 474 474 it += 5; 475 475 } … … 511 511 dumpBytecode(out, exec, begin, it); 512 512 513 if ( !m_identifiers.isEmpty()) {513 if (numberOfIdentifiers()) { 514 514 out.printf("\nIdentifiers:\n"); 515 515 size_t i = 0; 516 516 do { 517 out.printf(" id%u = %s\n", static_cast<unsigned>(i), m_identifiers[i].string().utf8().data());517 out.printf(" id%u = %s\n", static_cast<unsigned>(i), identifier(i).string().utf8().data()); 518 518 ++i; 519 } while (i != m_identifiers.size());519 } while (i != numberOfIdentifiers()); 520 520 } 521 521 … … 973 973 int r1 = (++it)->u.operand; 974 974 int r2 = (++it)->u.operand; 975 out.printf("[%4d] put_getter_setter\t %s, %s, %s, %s", location, registerName(r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(r1).data(), registerName(r2).data());975 out.printf("[%4d] put_getter_setter\t %s, %s, %s, %s", location, registerName(r0).data(), idName(id0, identifier(id0)).data(), registerName(r1).data(), registerName(r2).data()); 976 976 break; 977 977 } … … 980 980 int r1 = (++it)->u.operand; 981 981 int id0 = (++it)->u.operand; 982 out.printf("[%4d] del_by_id\t %s, %s, %s", location, registerName(r0).data(), registerName(r1).data(), idName(id0, m_identifiers[id0]).data());982 out.printf("[%4d] del_by_id\t %s, %s, %s", location, registerName(r0).data(), registerName(r1).data(), idName(id0, identifier(id0)).data()); 983 983 break; 984 984 } … … 1247 1247 int r1 = (++it)->u.operand; 1248 1248 unsigned attributes = (++it)->u.operand; 1249 out.printf("[%4d] push_name_scope \t%s, %s, %u", location, idName(id0, m_identifiers[id0]).data(), registerName(r1).data(), attributes);1249 out.printf("[%4d] push_name_scope \t%s, %s, %u", location, idName(id0, identifier(id0)).data(), registerName(r1).data(), attributes); 1250 1250 break; 1251 1251 } … … 1294 1294 ++it; // ResolveType 1295 1295 ++it; // depth 1296 out.printf("[%4d] resolve_scope\t %s, %s", location, registerName(r0).data(), idName(id0, m_identifiers[id0]).data());1296 out.printf("[%4d] resolve_scope\t %s, %s", location, registerName(r0).data(), idName(id0, identifier(id0)).data()); 1297 1297 break; 1298 1298 } … … 1305 1305 ++it; // Operand 1306 1306 ++it; // Skip value profile. 1307 out.printf("[%4d] get_from_scope\t %s, %s, %s, %d", location, registerName(r0).data(), registerName(r1).data(), idName(id0, m_identifiers[id0]).data(), resolveModeAndType);1307 out.printf("[%4d] get_from_scope\t %s, %s, %s, %d", location, registerName(r0).data(), registerName(r1).data(), idName(id0, identifier(id0)).data(), resolveModeAndType); 1308 1308 break; 1309 1309 } … … 1315 1315 ++it; // Structure 1316 1316 ++it; // Operand 1317 out.printf("[%4d] put_to_scope\t %s, %s, %s, %d", location, registerName(r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(r1).data(), resolveModeAndType);1317 out.printf("[%4d] put_to_scope\t %s, %s, %s, %d", location, registerName(r0).data(), idName(id0, identifier(id0)).data(), registerName(r1).data(), resolveModeAndType); 1318 1318 break; 1319 1319 } … … 1492 1492 , m_firstLineColumnOffset(other.m_firstLineColumnOffset) 1493 1493 , m_codeType(other.m_codeType) 1494 , m_ identifiers(other.m_identifiers)1494 , m_additionalIdentifiers(other.m_additionalIdentifiers) 1495 1495 , m_constantRegisters(other.m_constantRegisters) 1496 1496 , m_functionDecls(other.m_functionDecls) … … 1552 1552 liveCodeBlockSet.add(this); 1553 1553 #endif 1554 setIdentifiers(unlinkedCodeBlock->identifiers()); 1554 1555 1555 setConstantRegisters(unlinkedCodeBlock->constantRegisters()); 1556 1556 if (unlinkedCodeBlock->usesGlobalObject()) … … 1765 1765 1766 1766 case op_resolve_scope: { 1767 Identifier& ident = identifier(pc[i + 2].u.operand);1767 const Identifier& ident = identifier(pc[i + 2].u.operand); 1768 1768 ResolveType type = static_cast<ResolveType>(pc[i + 3].u.operand); 1769 1769 … … 1783 1783 1784 1784 // get_from_scope dst, scope, id, ResolveModeAndType, Structure, Operand 1785 Identifier& ident = identifier(pc[i + 3].u.operand);1785 const Identifier& ident = identifier(pc[i + 3].u.operand); 1786 1786 ResolveModeAndType modeAndType = ResolveModeAndType(pc[i + 4].u.operand); 1787 1787 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), scope, ident, Get, modeAndType.type()); … … 1796 1796 case op_put_to_scope: { 1797 1797 // put_to_scope scope, id, value, ResolveModeAndType, Structure, Operand 1798 Identifier& ident = identifier(pc[i + 2].u.operand);1798 const Identifier& ident = identifier(pc[i + 2].u.operand); 1799 1799 ResolveModeAndType modeAndType = ResolveModeAndType(pc[i + 4].u.operand); 1800 1800 ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), scope, ident, Put, modeAndType.type()); … … 2455 2455 2456 2456 if (shrinkMode == EarlyShrink) { 2457 m_ identifiers.shrinkToFit();2457 m_additionalIdentifiers.shrinkToFit(); 2458 2458 m_functionDecls.shrinkToFit(); 2459 2459 m_functionExprs.shrinkToFit();
Note:
See TracChangeset
for help on using the changeset viewer.