diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-05-31 15:53:08 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-06-27 10:04:32 +0000 |
commit | e62826fd6a40f2c41e8c252181bf3ab7d460bc50 (patch) | |
tree | b19379fe26bb36453f72b89e6db888b17dda64c1 /src/qml/jit | |
parent | 0ec2c4720c47282109b618370bf8397bb1d13a56 (diff) |
Simplify storeProperty 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: I5689babe4873c0bc3e7c85ca2d15a33f8ccb8794
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 9046926196..ed4434d4a0 100644 --- a/src/qml/jit/qv4baselinejit.cpp +++ b/src/qml/jit/qv4baselinejit.cpp @@ -301,13 +301,6 @@ void BaselineJIT::generate_GetLookupA(int index) as->checkException(); } -static void storePropertyHelper(QV4::Function *f, const Value &base, int name, const Value &value) -{ - auto engine = f->internalClass->engine; - if (!Runtime::method_storeProperty(engine, base, name, value) && f->isStrict()) - engine->throwTypeError(); -} - void BaselineJIT::generate_StoreProperty(int name, int base) { STORE_IP(); @@ -316,8 +309,8 @@ void BaselineJIT::generate_StoreProperty(int name, int base) as->passAccumulatorAsArg(3); as->passInt32AsArg(name, 2); as->passRegAsArg(base, 1); - as->passFunctionAsArg(0); - JIT_GENERATE_RUNTIME_CALL(storePropertyHelper, Assembler::IgnoreResult); + as->passEngineAsArg(0); + JIT_GENERATE_RUNTIME_CALL(Runtime::method_storeProperty, Assembler::IgnoreResult); as->checkException(); } |