diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-05-31 14:06:22 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-06-27 10:04:28 +0000 |
commit | 0ec2c4720c47282109b618370bf8397bb1d13a56 (patch) | |
tree | 55cbcc6d4539fdfc262a360e24712fc95bd3a951 /src/qml/jit | |
parent | 1b35f7b706b97adbc1d8935b14144b51389c0484 (diff) |
Simplify storeElement runtime API
We can do the isStrict() check and throwTypeError() call in the runtime
function instead of doing it twice on the two call sites.
Change-Id: I70df3d7fe4333921a85c11b1573e234f7da2f47d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jit')
-rw-r--r-- | src/qml/jit/qv4baselinejit.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/qml/jit/qv4baselinejit.cpp b/src/qml/jit/qv4baselinejit.cpp index 87b6478e0d..9046926196 100644 --- a/src/qml/jit/qv4baselinejit.cpp +++ b/src/qml/jit/qv4baselinejit.cpp @@ -245,13 +245,6 @@ void BaselineJIT::generate_LoadElement(int base) as->checkException(); } -static void storeElementHelper(QV4::Function *f, const Value &base, const Value &index, const Value &value) -{ - auto engine = f->internalClass->engine; - if (!Runtime::method_storeElement(engine, base, index, value) && f->isStrict()) - engine->throwTypeError(); -} - void BaselineJIT::generate_StoreElement(int base, int index) { STORE_IP(); @@ -260,8 +253,8 @@ void BaselineJIT::generate_StoreElement(int base, int index) as->passAccumulatorAsArg(3); as->passRegAsArg(index, 2); as->passRegAsArg(base, 1); - as->passFunctionAsArg(0); - JIT_GENERATE_RUNTIME_CALL(storeElementHelper, Assembler::IgnoreResult); + as->passEngineAsArg(0); + JIT_GENERATE_RUNTIME_CALL(Runtime::method_storeElement, Assembler::IgnoreResult); as->checkException(); } |