aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-08-15 10:36:41 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-08-15 13:56:07 +0200
commit4b0765da3e2842612ed5464bb750505f0d355b87 (patch)
treedc19ee6b99956619337280ce1db3c1c230cf74be /src/qml/jsruntime/qv4script.cpp
parent2aee966baa76f55d9061ed22af7bb0abe4f3541e (diff)
Prepare MASM for better runtime string handling
Keep the run-time functions as-is by taking String pointers and use a little bit of inline assembly to resolve the string ids to string pointers, by adding a runtimeStrings array pointer next to the lookups in the context (similar mechanism). Change-Id: Ib5a70bdf47fef7c447d646ccfe03f3dc30d39f20 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r--src/qml/jsruntime/qv4script.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index 448d63860d..59b52c395b 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -201,17 +201,20 @@ Value Script::run()
TemporaryAssignment<Function*> savedGlobalCode(engine->globalCode, vmFunction);
bool strict = scope->strictMode;
- Lookup *lookups = scope->lookups;
+ Lookup *oldLookups = scope->lookups;
+ String **oldRuntimeStrings = scope->runtimeStrings;
scope->strictMode = vmFunction->isStrict();
scope->lookups = vmFunction->lookups;
+ scope->runtimeStrings = vmFunction->compilationUnit->runtimeStrings;
QV4::Value result;
try {
result = vmFunction->code(scope, vmFunction->codeData);
} catch (Exception &e) {
scope->strictMode = strict;
- scope->lookups = lookups;
+ scope->lookups = oldLookups;
+ scope->runtimeStrings = oldRuntimeStrings;
throw;
}