diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2012-11-29 14:41:26 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2012-11-29 22:05:49 +0100 |
commit | a14e7549c4a3faece3474f059b2d04005cfc7cbf (patch) | |
tree | 3ce4903154e98aec5d952e5cdd067a7cb1b33aff /qmljs_objects.h | |
parent | 36356a4b273e19ca599bf2a0cbfb02fda69e6c0a (diff) |
Add some debugging infrastructure to the interpreter.
This currently mainly intended to be useful in a C++ debugger. The
infrastructure makes it a lot easier to access (parent) contexts, find
function names, etc.
Change-Id: I0493d3a3bd4bf5c3a03379c1a2b545ed76862cd5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'qmljs_objects.h')
-rw-r--r-- | qmljs_objects.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qmljs_objects.h b/qmljs_objects.h index 957a562d97..4e0af583d1 100644 --- a/qmljs_objects.h +++ b/qmljs_objects.h @@ -516,6 +516,8 @@ struct FunctionObject: Object { Value construct(ExecutionContext *context, Value *args, int argc); virtual Value call(ExecutionContext *context, Value thisObject, Value *args, int argc); + virtual struct ScriptFunction *asScriptFunction() { return 0; } + protected: virtual Value call(ExecutionContext *ctx); virtual Value construct(ExecutionContext *ctx); @@ -537,6 +539,8 @@ struct ScriptFunction: FunctionObject { virtual Value call(ExecutionContext *ctx); virtual Value construct(ExecutionContext *ctx); + + virtual ScriptFunction *asScriptFunction() { return this; } }; struct EvalFunction : FunctionObject |