diff options
author | Simon Hausmann <[email protected]> | 2013-08-15 10:36:41 +0200 |
---|---|---|
committer | Simon Hausmann <[email protected]> | 2013-08-15 13:56:07 +0200 |
commit | 4b0765da3e2842612ed5464bb750505f0d355b87 (patch) | |
tree | dc19ee6b99956619337280ce1db3c1c230cf74be /src/qml/jsruntime/qv4context.cpp | |
parent | 2aee966baa76f55d9061ed22af7bb0abe4f3541e (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 <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4context.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp index 633ad2e067..f6ba986a27 100644 --- a/src/qml/jsruntime/qv4context.cpp +++ b/src/qml/jsruntime/qv4context.cpp @@ -138,6 +138,7 @@ void WithContext::initWithContext(ExecutionContext *p, Object *with) thisObject = p->thisObject; outer = p; lookups = p->lookups; + runtimeStrings = p->runtimeStrings; withObject = with; } @@ -149,6 +150,7 @@ void CatchContext::initCatchContext(ExecutionContext *p, String *exceptionVarNam thisObject = p->thisObject; outer = p; lookups = p->lookups; + runtimeStrings = p->runtimeStrings; this->exceptionVarName = exceptionVarName; this->exceptionValue = exceptionValue; @@ -172,8 +174,10 @@ void CallContext::initCallContext(ExecutionContext *parentContext, FunctionObjec activation = 0; - if (function->function) + if (function->function) { lookups = function->function->lookups; + runtimeStrings = function->function->compilationUnit->runtimeStrings; + } uint argc = argumentCount; @@ -220,6 +224,7 @@ void CallContext::initQmlContext(ExecutionContext *parentContext, Object *qml, F activation = qml; lookups = function->function->lookups; + runtimeStrings = function->function->compilationUnit->runtimeStrings; locals = (Value *)(this + 1); if (function->varCount) |