diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-09-12 22:47:07 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-09-14 19:21:25 +0000 |
commit | 6982d0d6290c137468749bb8ab2f2e20dfa453fd (patch) | |
tree | 62b0c22c5bbff0b2da8031930b355815b88a0c8a /src/qml/jit/qv4baselinejit.cpp | |
parent | 2beb77c81a1f3585c15099a09ba8b2192c6da824 (diff) |
Optimize the JIT helpers
Match the argument order to the lookup functions being
called to minimize register shuffling that needs to be
done inside the function.
Change-Id: I0c55234d0c86b524dad021a519c6416d62d34c52
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jit/qv4baselinejit.cpp')
-rw-r--r-- | src/qml/jit/qv4baselinejit.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/qml/jit/qv4baselinejit.cpp b/src/qml/jit/qv4baselinejit.cpp index 1e77c1a001..f8be5fb140 100644 --- a/src/qml/jit/qv4baselinejit.cpp +++ b/src/qml/jit/qv4baselinejit.cpp @@ -205,8 +205,8 @@ void BaselineJIT::generate_LoadGlobalLookup(int index) { as->prepareCallWithArgCount(3); as->passInt32AsArg(index, 2); - as->passFunctionAsArg(1); - as->passEngineAsArg(0); + as->passEngineAsArg(1); + as->passFunctionAsArg(0); BASELINEJIT_GENERATE_RUNTIME_CALL(Helpers::loadGlobalLookup, CallResultDestination::InAccumulator); as->checkException(); } @@ -277,10 +277,10 @@ void BaselineJIT::generate_GetLookup(int index) STORE_IP(); STORE_ACC(); as->prepareCallWithArgCount(4); - as->passAccumulatorAsArg(3); - as->passInt32AsArg(index, 2); - as->passFunctionAsArg(1); - as->passEngineAsArg(0); + as->passInt32AsArg(index, 3); + as->passAccumulatorAsArg(2); + as->passEngineAsArg(1); + as->passFunctionAsArg(0); BASELINEJIT_GENERATE_RUNTIME_CALL(Helpers::getLookup, CallResultDestination::InAccumulator); as->checkException(); } @@ -307,7 +307,8 @@ void BaselineJIT::generate_SetLookup(int index, int base) as->passJSSlotAsArg(base, 2); as->passInt32AsArg(index, 1); as->passFunctionAsArg(0); - BASELINEJIT_GENERATE_RUNTIME_CALL(Helpers::setLookup, CallResultDestination::InAccumulator); + BASELINEJIT_GENERATE_RUNTIME_CALL((function->isStrict() ? Helpers::setLookupStrict : Helpers::setLookupSloppy), + CallResultDestination::InAccumulator); as->checkException(); } |