summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-31 08:15:35 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-08-31 08:39:34 (GMT)
commite42379ebf53a41807791ee243bcebb83c3e2faed (patch)
treeaf8607d446808d703764e035ada5445eaaaf39f2 /src/script
parent37da3aefc073ea3a27c8bb5293b27faa4dcb5cc0 (diff)
downloadQt-e42379ebf53a41807791ee243bcebb83c3e2faed.zip
Qt-e42379ebf53a41807791ee243bcebb83c3e2faed.tar.gz
Qt-e42379ebf53a41807791ee243bcebb83c3e2faed.tar.bz2
implement functionExit() callbacks on the JIT
The return value is not reported (we need a separate callback for that, just like in the interpreter), but that isn't important to get our tools (i.e. the debugger) working.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/qscriptengineagent.cpp11
-rw-r--r--src/script/api/qscriptengineagent_p.h7
2 files changed, 12 insertions, 6 deletions
diff --git a/src/script/api/qscriptengineagent.cpp b/src/script/api/qscriptengineagent.cpp
index 193ee21..cf60bcb 100644
--- a/src/script/api/qscriptengineagent.cpp
+++ b/src/script/api/qscriptengineagent.cpp
@@ -142,6 +142,17 @@ void QScriptEngineAgentPrivate::detach()
JSC::Debugger::detach(engine->originalGlobalObject());
}
+void QScriptEngineAgentPrivate::returnEvent(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, int lineno)
+{
+ Q_UNUSED(frame);
+ Q_UNUSED(lineno);
+#if ENABLE(JIT)
+ functionExit(JSC::JSValue(), sourceID);
+#else
+ Q_UNUSED(sourceID);
+#endif
+}
+
void QScriptEngineAgentPrivate::exceptionThrow(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, bool hasHandler)
{
JSC::CallFrame *oldFrame = engine->currentFrame;
diff --git a/src/script/api/qscriptengineagent_p.h b/src/script/api/qscriptengineagent_p.h
index 9ef1eaf..ba49af5 100644
--- a/src/script/api/qscriptengineagent_p.h
+++ b/src/script/api/qscriptengineagent_p.h
@@ -110,12 +110,7 @@ public:
q_ptr->contextPush();
q_ptr->functionEntry(sourceID);
};
- virtual void returnEvent(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, int lineno)
- {
- Q_UNUSED(frame);
- Q_UNUSED(sourceID);
- Q_UNUSED(lineno);
- }
+ virtual void returnEvent(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, int lineno);
virtual void willExecuteProgram(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, int lineno)
{
Q_UNUSED(frame);