Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (104769 => 104770)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2012-01-12 01:00:17 UTC (rev 104769)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2012-01-12 01:00:58 UTC (rev 104770)
@@ -183,6 +183,15 @@
it += 4;
}
+void CodeBlock::printCallOp(ExecState* exec, int location, Vector<Instruction>::const_iterator& it, const char* op) const
+{
+ int func = (++it)->u.operand;
+ int argCount = (++it)->u.operand;
+ int registerOffset = (++it)->u.operand;
+ printf("[%4d] %s\t %s, %d, %d\n", location, op, registerName(exec, func).data(), argCount, registerOffset);
+ it += 2;
+}
+
void CodeBlock::printPutByIdOp(ExecState* exec, int location, Vector<Instruction>::const_iterator& it, const char* op) const
{
int r0 = (++it)->u.operand;
@@ -522,7 +531,7 @@
}
case op_convert_this: {
int r0 = (++it)->u.operand;
- printf("[%4d] convert_this %s\n", location, registerName(exec, r0).data());
+ printf("[%4d] convert_this\t %s\n", location, registerName(exec, r0).data());
break;
}
case op_new_object: {
@@ -1119,17 +1128,11 @@
break;
}
case op_call: {
- int func = (++it)->u.operand;
- int argCount = (++it)->u.operand;
- int registerOffset = (++it)->u.operand;
- printf("[%4d] call\t\t %s, %d, %d\n", location, registerName(exec, func).data(), argCount, registerOffset);
+ printCallOp(exec, location, it, "call");
break;
}
case op_call_eval: {
- int func = (++it)->u.operand;
- int argCount = (++it)->u.operand;
- int registerOffset = (++it)->u.operand;
- printf("[%4d] call_eval\t %s, %d, %d\n", location, registerName(exec, func).data(), argCount, registerOffset);
+ printCallOp(exec, location, it, "call_eval");
break;
}
case op_call_varargs: {
@@ -1148,7 +1151,7 @@
}
case op_tear_off_arguments: {
int r0 = (++it)->u.operand;
- printf("[%4d] tear_off_arguments\t %s\n", location, registerName(exec, r0).data());
+ printf("[%4d] tear_off_arguments %s\n", location, registerName(exec, r0).data());
break;
}
case op_ret: {
@@ -1168,10 +1171,7 @@
break;
}
case op_construct: {
- int func = (++it)->u.operand;
- int argCount = (++it)->u.operand;
- int registerOffset = (++it)->u.operand;
- printf("[%4d] construct\t %s, %d, %d\n", location, registerName(exec, func).data(), argCount, registerOffset);
+ printCallOp(exec, location, it, "construct");
break;
}
case op_strcat: {
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.h (104769 => 104770)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2012-01-12 01:00:17 UTC (rev 104769)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2012-01-12 01:00:58 UTC (rev 104770)
@@ -989,6 +989,7 @@
void printBinaryOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op) const;
void printConditionalJump(ExecState*, const Vector<Instruction>::const_iterator&, Vector<Instruction>::const_iterator&, int location, const char* op) const;
void printGetByIdOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op) const;
+ void printCallOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op) const;
void printPutByIdOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op) const;
#endif
void visitStructures(SlotVisitor&, Instruction* vPC) const;