aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jit/qv4assembler.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-01-27 09:05:54 +0100
committerLars Knoll <lars.knoll@qt.io>2017-03-09 08:58:12 +0000
commit58b882ad42f99e03ac8dca13ff9c0d39fcafbaa0 (patch)
treee518e549f6410ac521ec0506bfca3dc918381e49 /src/qml/jit/qv4assembler.cpp
parent4de7e48ab160dacc7a09360e80264eac4945a8f4 (diff)
Avoid one indirection when looking up local variables
Simple CallContext's never have locals, as they get converted to temps in the compiler. For regular CallContext's, local variables always got appended to the callcontext. So there was no need to have an additional indirect pointer to them in the CallContext. This speeds up v8-bench by 1-2%. Change-Id: I3def7ba653aea5bc5761076f398450ae30c62823 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jit/qv4assembler.cpp')
-rw-r--r--src/qml/jit/qv4assembler.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/jit/qv4assembler.cpp b/src/qml/jit/qv4assembler.cpp
index e658977da1..0b3d0bd0cc 100644
--- a/src/qml/jit/qv4assembler.cpp
+++ b/src/qml/jit/qv4assembler.cpp
@@ -286,8 +286,7 @@ typename Assembler<TargetConfiguration>::Pointer Assembler<TargetConfiguration>:
} break;
case IR::ArgLocal::Local:
case IR::ArgLocal::ScopedLocal: {
- loadPtr(Address(baseReg, qOffsetOf(CallContext::Data, locals)), baseReg);
- offset = al->index * sizeof(Value);
+ offset = qOffsetOf(CallContext::Data, locals) + al->index * sizeof(Value);
} break;
default:
Q_UNREACHABLE();