aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2012-12-18 10:59:54 +0100
committerLars Knoll <lars.knoll@digia.com>2012-12-18 11:42:06 +0100
commit256b8e60ef1690abdfcbf9a75ec302c4ae3d9e36 (patch)
tree5a443c00c7db85a2954ee02ded8633961a00d51e
parentdaab2673cf1d3ee0948fd123290bc4c76978bf27 (diff)
Fix instruction tracing.
Change-Id: Ie2ff005e2914bc372e4c6d08dd28d34efdde8da3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rw-r--r--debugging.cpp2
-rw-r--r--moth/qv4vme_moth.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/debugging.cpp b/debugging.cpp
index 4376d0a736..64fd940f16 100644
--- a/debugging.cpp
+++ b/debugging.cpp
@@ -150,7 +150,7 @@ void Debugger::enterFunction(FunctionState *state)
#ifdef DO_TRACE_INSTR
QString n = name(_callStack[callIndex(state->context())].function);
- std::cerr << "*** Entering \"" << qPrintable(n) << "\" with " << state->context()->variableEnvironment->argumentCount << " args" << std::endl;
+ std::cerr << "*** Entering \"" << qPrintable(n) << "\" with " << state->context()->argumentCount << " args" << std::endl;
// for (unsigned i = 0; i < state->context()->variableEnvironment->argumentCount; ++i)
// std::cerr << " " << i << ": " << currentArg(i) << std::endl;
#endif // DO_TRACE_INSTR
diff --git a/moth/qv4vme_moth.cpp b/moth/qv4vme_moth.cpp
index b8404bc550..2a1302f423 100644
--- a/moth/qv4vme_moth.cpp
+++ b/moth/qv4vme_moth.cpp
@@ -60,15 +60,15 @@ static inline VM::Value *tempValue(QQmlJS::VM::ExecutionContext *context, VM::Va
if (index < 0) {
kind = "arg";
pos = -index - 1;
- } else if (index < (int) varEnv->varCount) {
+ } else if (index < (int) context->variableCount()) {
kind = "local";
pos = index;
} else {
kind = "temp";
- pos = index - varEnv->varCount;
+ pos = index - context->variableCount();
}
- fprintf(stderr, " tempValue: index = %d : %s = %d, stack size = %d\n",
- index, kind, pos, stack.size());
+ fprintf(stderr, " tempValue: index = %d : %s = %d\n",
+ index, kind, pos);
#endif // DO_TRACE_INSTR
if (index < 0) {