Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (197872 => 197873)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2016-03-09 20:36:35 UTC (rev 197872)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2016-03-09 20:36:40 UTC (rev 197873)
@@ -769,6 +769,19 @@
out.printf("%s", registerName(operand).data());
}
+void CodeBlock::dumpFunctionExpr(PrintStream& out, int funcExprIndex)
+{
+ out.printf("f%d", funcExprIndex);
+ if (!isCompilationThread()) {
+ FunctionExecutable* executable = functionExpr(funcExprIndex);
+ String name = executable->inferredName().string();
+ if (name.isEmpty())
+ out.print(":<anon>");
+ else
+ out.print(":", name.utf8());
+ }
+}
+
void CodeBlock::dumpBytecode(
PrintStream& out, ExecState* exec, const Instruction* begin, const Instruction*& it,
const StubInfoMap& stubInfos, const CallLinkInfoMap& callLinkInfos)
@@ -1336,7 +1349,8 @@
int r1 = (++it)->u.operand;
int f0 = (++it)->u.operand;
printLocationAndOp(out, exec, location, it, "new_func");
- out.printf("%s, %s, f%d", registerName(r0).data(), registerName(r1).data(), f0);
+ out.printf("%s, %s, ", registerName(r0).data(), registerName(r1).data());
+ dumpFunctionExpr(out, f0);
break;
}
case op_new_generator_func: {
@@ -1344,7 +1358,8 @@
int r1 = (++it)->u.operand;
int f0 = (++it)->u.operand;
printLocationAndOp(out, exec, location, it, "new_generator_func");
- out.printf("%s, %s, f%d", registerName(r0).data(), registerName(r1).data(), f0);
+ out.printf("%s, %s, ", registerName(r0).data(), registerName(r1).data());
+ dumpFunctionExpr(out, f0);
break;
}
case op_new_arrow_func_exp: {
@@ -1352,7 +1367,8 @@
int r1 = (++it)->u.operand;
int f0 = (++it)->u.operand;
printLocationAndOp(out, exec, location, it, "op_new_arrow_func_exp");
- out.printf("%s, %s, f%d", registerName(r0).data(), registerName(r1).data(), f0);
+ out.printf("%s, %s, ", registerName(r0).data(), registerName(r1).data());
+ dumpFunctionExpr(out, f0);
break;
}
case op_new_func_exp: {
@@ -1360,7 +1376,8 @@
int r1 = (++it)->u.operand;
int f0 = (++it)->u.operand;
printLocationAndOp(out, exec, location, it, "new_func_exp");
- out.printf("%s, %s, f%d", registerName(r0).data(), registerName(r1).data(), f0);
+ out.printf("%s, %s, ", registerName(r0).data(), registerName(r1).data());
+ dumpFunctionExpr(out, f0);
break;
}
case op_new_generator_func_exp: {
@@ -1368,7 +1385,8 @@
int r1 = (++it)->u.operand;
int f0 = (++it)->u.operand;
printLocationAndOp(out, exec, location, it, "new_generator_func_exp");
- out.printf("%s, %s, f%d", registerName(r0).data(), registerName(r1).data(), f0);
+ out.printf("%s, %s", registerName(r0).data(), registerName(r1).data());
+ dumpFunctionExpr(out, f0);
break;
}
case op_call: {
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.h (197872 => 197873)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2016-03-09 20:36:35 UTC (rev 197872)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2016-03-09 20:36:40 UTC (rev 197873)
@@ -958,6 +958,7 @@
m_constantRegisters[index - FirstConstantRegisterIndex].set(m_globalObject->vm(), this, value);
}
+ void dumpFunctionExpr(PrintStream&, int funcExprIndex);
void dumpBytecode(
PrintStream&, ExecState*, const Instruction* begin, const Instruction*&,
const StubInfoMap& = StubInfoMap(), const CallLinkInfoMap& = CallLinkInfoMap());