aboutsummaryrefslogtreecommitdiffstats
path: root/debugging.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2012-11-30 09:48:46 +0100
committerErik Verbruggen <erik.verbruggen@digia.com>2012-11-30 12:30:14 +0100
commitd63043df6fa8e8624b4ab9c7a70f320df8156a4a (patch)
tree46b6e51027635c08d253f29af128122e00bd8ebc /debugging.cpp
parentf26d5c36cff33cc8a968c87a69e9dddbb4278855 (diff)
Clean up the DeclarativeEnvironment
Add a pointer to the FunctionObject in there, and remove the duplication of the formal and local variable names. Change-Id: Id8017b3e167228292b5d351e02b8927f0bfb41eb Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'debugging.cpp')
-rw-r--r--debugging.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/debugging.cpp b/debugging.cpp
index e55660e16c..a54c1a0678 100644
--- a/debugging.cpp
+++ b/debugging.cpp
@@ -58,10 +58,9 @@ VM::Value *FunctionState::argument(unsigned idx)
VM::Value *FunctionState::local(unsigned idx)
{
- if (idx < _context->lexicalEnvironment->varCount)
+ if (idx < _context->lexicalEnvironment->variableCount())
return _context->lexicalEnvironment->locals + idx;
- else
- return 0;
+ return 0;
}
Debugger::Debugger(VM::ExecutionEngine *engine)