From ef5d5a989a344ba812a91b365cd54ace65f27f26 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 3 Aug 2017 08:57:03 +0200 Subject: Get rid of the compilation unit related members in ExecutionContext And change the signature for VME::exec to take the QV4::Function that should be executed. This is in preparation to being able to run functions that will not need to allocate an execution context on their own. Change-Id: I34538a8723006f4ec24583805e88a66e750100c3 Reviewed-by: Erik Verbruggen --- src/qml/jsruntime/qv4script_p.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/qml/jsruntime/qv4script_p.h') diff --git a/src/qml/jsruntime/qv4script_p.h b/src/qml/jsruntime/qv4script_p.h index 75045dda9c..ef48dde6db 100644 --- a/src/qml/jsruntime/qv4script_p.h +++ b/src/qml/jsruntime/qv4script_p.h @@ -66,17 +66,13 @@ namespace QV4 { struct ContextStateSaver { Value *savedContext; bool strictMode; - Lookup *lookups; - const QV4::Value *constantTable; - CompiledData::CompilationUnitBase *compilationUnit; + QV4::Function *v4Function; int lineNumber; ContextStateSaver(const Scope &scope, ExecutionContext *context) : savedContext(scope.alloc(1)) , strictMode(context->d()->strictMode) - , lookups(context->d()->lookups) - , constantTable(context->d()->constantTable) - , compilationUnit(context->d()->compilationUnit) + , v4Function(context->d()->v4Function) , lineNumber(context->d()->lineNumber) { savedContext->setM(context->d()); @@ -84,9 +80,7 @@ struct ContextStateSaver { ContextStateSaver(const Scope &scope, Heap::ExecutionContext *context) : savedContext(scope.alloc(1)) , strictMode(context->strictMode) - , lookups(context->lookups) - , constantTable(context->constantTable) - , compilationUnit(context->compilationUnit) + , v4Function(context->v4Function) , lineNumber(context->lineNumber) { savedContext->setM(context); @@ -96,9 +90,7 @@ struct ContextStateSaver { { Heap::ExecutionContext *ctx = static_cast(savedContext->m()); ctx->strictMode = strictMode; - ctx->lookups = lookups; - ctx->constantTable = constantTable; - ctx->compilationUnit = compilationUnit; + ctx->v4Function = v4Function; ctx->lineNumber = lineNumber; } }; -- cgit v1.2.3