diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-05-29 10:56:01 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-05-29 12:12:06 +0000 |
commit | 643329abd937108043886ccd7d2666570eb5bca3 (patch) | |
tree | 2464bdb0a362ef34fe73ef7fc2e5f38669591738 /src/qml/jsruntime/qv4vme_moth.cpp | |
parent | 8e5662dd7c7e346702734b856dc4692fa51c315d (diff) |
Simplify with context runtime handling
Instead of duplicating the accumulator-to-object conversion in moth as
well as the JIT, let's do that in one place in the runtime.
Change-Id: I6870567d3c4fe663e54fece024f1e5e9bde97c35
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4vme_moth.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4vme_moth.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index e71057fcd9..f9a56eb877 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -920,10 +920,9 @@ QV4::ReturnedValue VME::interpret(CppStackFrame &frame, const char *code) MOTH_BEGIN_INSTR(PushWithContext) STORE_IP(); STORE_ACC(); - accumulator = accumulator.toObject(engine); + auto ctx = Runtime::method_createWithContext(engine, stack); CHECK_EXCEPTION; - ExecutionContext *c = static_cast<ExecutionContext *>(stack + CallData::Context); - STACK_VALUE(CallData::Context) = Runtime::method_createWithContext(c, accumulator); + STACK_VALUE(CallData::Context) = ctx; MOTH_END_INSTR(PushWithContext) MOTH_BEGIN_INSTR(PushBlockContext) |