diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-11-13 11:45:51 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-22 14:54:05 +0100 |
commit | 9bf5e87ef0abd3c4612baca66c79e2d33f8fbfb9 (patch) | |
tree | 17d22dec37edea8e2d01fc686285055e712113c8 /src/qml/compiler/qv4isel_masm.cpp | |
parent | 1a76a4926a7cfecbe2bf4d75589af54e98c201c5 (diff) |
Use lookups for create_property (ie. new foo.bar)
This is not used that often, but it removes one more place
where we do lookups by name.
Change-Id: I9f798b8b4a64be3fdf3e53090e4288724c9d2b22
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 | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4isel_masm.cpp b/src/qml/compiler/qv4isel_masm.cpp index 9d470c417d..91cc5a9b4e 100644 --- a/src/qml/compiler/qv4isel_masm.cpp +++ b/src/qml/compiler/qv4isel_masm.cpp @@ -1777,9 +1777,18 @@ void InstructionSelection::constructActivationProperty(V4IR::Name *func, V4IR::E void InstructionSelection::constructProperty(V4IR::Temp *base, const QString &name, V4IR::ExprList *args, V4IR::Temp *result) { - prepareCallData(args, 0); + prepareCallData(args, base); + if (useFastLookups) { + uint index = registerGetterLookup(name); + generateFunctionCall(result, __qmljs_construct_property_lookup, + Assembler::ContextRegister, + Assembler::TrustedImm32(index), + baseAddressForCallData()); + return; + } + generateFunctionCall(result, __qmljs_construct_property, Assembler::ContextRegister, - Assembler::Reference(base), Assembler::PointerToString(name), + Assembler::PointerToString(name), baseAddressForCallData()); } |