diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-10-28 17:02:54 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-31 18:55:14 +0100 |
commit | f0ad3a5943804e9eb8e03434a4584eaafa5c5aea (patch) | |
tree | 8d2cb4402d63ced4e89c6c610fc839e0260d8e92 /src/qml/compiler/qv4isel_moth.cpp | |
parent | b0afac3daf1cbb9daacbeac0183ef6254de6cc95 (diff) |
Implement loading of resolved imported scripts
We can resolve the use of names that refer to imported scripts at compile
time and load them at run-time by index through context->importedScripts.
Change-Id: I681b19e7d68dbf3b9a68af00b4cea2a9254c2d78
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_moth.cpp')
-rw-r--r-- | src/qml/compiler/qv4isel_moth.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp index 954c4f532e..a8d8d7454f 100644 --- a/src/qml/compiler/qv4isel_moth.cpp +++ b/src/qml/compiler/qv4isel_moth.cpp @@ -454,7 +454,7 @@ void InstructionSelection::loadThisObject(V4IR::Temp *temp) addInstruction(load); } -void InstructionSelection::loadIdObject(int id, V4IR::Temp *temp) +void InstructionSelection::loadQmlIdObject(int id, V4IR::Temp *temp) { Instruction::LoadQmlIdObject load; load.result = getResultParam(temp); @@ -462,6 +462,14 @@ void InstructionSelection::loadIdObject(int id, V4IR::Temp *temp) addInstruction(load); } +void InstructionSelection::loadQmlImportedScript(int index, V4IR::Temp *temp) +{ + Instruction::LoadQmlImportedScript load; + load.result = getResultParam(temp); + load.index = index; + addInstruction(load); +} + void InstructionSelection::loadQmlContextObject(V4IR::Temp *temp) { Instruction::LoadQmlContextObject load; |