diff options
| author | Lars Knoll <lars.knoll@digia.com> | 2014-01-17 12:19:34 +0100 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-20 21:14:35 +0100 |
| commit | 393108500832dcefa4c4def442a08f20d3fbc4cd (patch) | |
| tree | 64676214630008b9f5434c933590d9adf9baf094 /src/qml/compiler/qv4isel_masm.cpp | |
| parent | bf6191f090b326eb0776cd4e921ddb56c8daa8a9 (diff) | |
Use lookups for indexed accesses
This speeds up reading array data from objects significantly.
Change-Id: I5d17a7b3e7583a16dc76d1ee6cbc1d7134e4c2fa
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_masm.cpp')
| -rw-r--r-- | src/qml/compiler/qv4isel_masm.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4isel_masm.cpp b/src/qml/compiler/qv4isel_masm.cpp index 415fdad8e9..6df94e713d 100644 --- a/src/qml/compiler/qv4isel_masm.cpp +++ b/src/qml/compiler/qv4isel_masm.cpp @@ -1015,6 +1015,14 @@ void InstructionSelection::setQObjectProperty(V4IR::Expr *source, V4IR::Expr *ta void InstructionSelection::getElement(V4IR::Expr *base, V4IR::Expr *index, V4IR::Temp *target) { + if (useFastLookups) { + uint lookup = registerIndexedGetterLookup(); + generateLookupCall(target, lookup, qOffsetOf(QV4::Lookup, indexedGetter), + Assembler::PointerToValue(base), + Assembler::PointerToValue(index)); + return; + } + #if 0 // QT_POINTER_SIZE == 8 V4IR::Temp *tbase = base->asTemp(); V4IR::Temp *tindex = index->asTemp(); |
