From 0b6bc89c61d6fc10bd09dfb7374314d993f0c3c5 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 27 Jun 2018 12:19:04 +0200 Subject: Remove ExecutionEngine::setCurrentContext() It's unused and shouldn't exist. Also de-inline currentContext() to avoid a dependency on the CppStackFrame in the header. Change-Id: I44724f8097883dc1b1064430778f45f7811460df Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4engine.cpp | 5 +++++ src/qml/jsruntime/qv4engine_p.h | 10 +--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index e3a99e9ddb..64d6583f60 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -611,6 +611,11 @@ ExecutionEngine::~ExecutionEngine() delete [] argumentsAccessors; } +ExecutionContext *ExecutionEngine::currentContext() const +{ + return static_cast(¤tStackFrame->jsFrame->context); +} + #if QT_CONFIG(qml_debug) void ExecutionEngine::setDebugger(Debugging::Debugger *debugger) { diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h index abd363adcb..a1bd321412 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -477,10 +477,7 @@ public: void setProfiler(Profiling::Profiler *profiler); #endif // QT_CONFIG(qml_debug) - void setCurrentContext(Heap::ExecutionContext *context); - ExecutionContext *currentContext() const { - return static_cast(¤tStackFrame->jsFrame->context); - } + ExecutionContext *currentContext() const; // ensure we always get odd prototype IDs. This helps make marking in QV4::Lookup fast quintptr newProtoId() { return (protoIdCount += 2); } @@ -613,11 +610,6 @@ struct NoThrowEngine; #endif -inline void ExecutionEngine::setCurrentContext(Heap::ExecutionContext *context) -{ - currentStackFrame->jsFrame->context = context; -} - #define CHECK_STACK_LIMITS(v4) if ((v4)->checkStackLimits()) return Encode::undefined(); \ ExecutionEngineCallDepthRecorder _executionEngineCallDepthRecorder(v4); -- cgit v1.2.3