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/jit | |
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/jit')
-rw-r--r-- | src/qml/jit/qv4baselinejit.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/qml/jit/qv4baselinejit.cpp b/src/qml/jit/qv4baselinejit.cpp index f2a52a6f97..764e75937e 100644 --- a/src/qml/jit/qv4baselinejit.cpp +++ b/src/qml/jit/qv4baselinejit.cpp @@ -585,16 +585,6 @@ void BaselineJIT::generate_CreateCallContext() void BaselineJIT::generate_PushCatchContext(int index, int name) { as->pushCatchContext(index, name); } -static void pushWithContextHelper(ExecutionEngine *engine, QV4::Value *stack) -{ - QV4::Value &accumulator = stack[CallData::Accumulator]; - accumulator = accumulator.toObject(engine); - if (engine->hasException) - return; - ExecutionContext *c = static_cast<ExecutionContext *>(stack + CallData::Context); - stack[CallData::Context] = Runtime::method_createWithContext(c, accumulator); -} - void BaselineJIT::generate_PushWithContext() { STORE_IP(); @@ -602,8 +592,9 @@ void BaselineJIT::generate_PushWithContext() as->prepareCallWithArgCount(2); as->passRegAsArg(0, 1); as->passEngineAsArg(0); - JIT_GENERATE_RUNTIME_CALL(pushWithContextHelper, Assembler::IgnoreResult); + JIT_GENERATE_RUNTIME_CALL(Runtime::method_createWithContext, Assembler::IgnoreResult); // keeps result in return value register as->checkException(); + as->storeHeapObject(CallData::Context); } static void pushBlockContextHelper(QV4::Value *stack, int index) |