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_moth.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_moth.cpp')
-rw-r--r-- | src/qml/compiler/qv4isel_moth.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp index 6db8f11a9e..40ccc358f7 100644 --- a/src/qml/compiler/qv4isel_moth.cpp +++ b/src/qml/compiler/qv4isel_moth.cpp @@ -351,6 +351,16 @@ void InstructionSelection::constructActivationProperty(V4IR::Name *func, void InstructionSelection::constructProperty(V4IR::Temp *base, const QString &name, V4IR::ExprList *args, V4IR::Temp *result) { + if (useFastLookups) { + Instruction::ConstructPropertyLookup call; + call.base = getParam(base); + call.index = registerGetterLookup(name); + prepareCallArgs(args, call.argc); + call.callData = callDataStart(); + call.result = getResultParam(result); + addInstruction(call); + return; + } Instruction::CreateProperty create; create.base = getParam(base); create.name = registerString(name); |