aboutsummaryrefslogtreecommitdiffstats
path: root/qmljs_runtime.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2012-12-01 14:05:07 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-12-02 15:50:37 +0100
commit2104e7fdcb9c16cabc58e93f0cd1d11e36bdca34 (patch)
treeebd2686e7cf8f0e4b561394f28e0aa4cc5b35eb4 /qmljs_runtime.cpp
parentb589811f735ffde5dd1272bd9dd69599de421000 (diff)
Remove the DeclarativeEnvironment class again
The class is a specification detail that we can implement in a more performant way. ExecutionContext now contains everything needed again. Change-Id: Ideb5f04eeeecaf2b8543676c626e3943e4d6d7a1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'qmljs_runtime.cpp')
-rw-r--r--qmljs_runtime.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/qmljs_runtime.cpp b/qmljs_runtime.cpp
index 6779f86d11..5aacc79ca3 100644
--- a/qmljs_runtime.cpp
+++ b/qmljs_runtime.cpp
@@ -721,7 +721,7 @@ Value __qmljs_call_property(ExecutionContext *context, Value base, String *name,
Value thisObject;
if (base.isUndefined()) {
- baseObject = context->lexicalEnvironment->activation;
+ baseObject = context->activation;
thisObject = Value::nullValue();
} else {
if (!base.isObject())
@@ -788,10 +788,10 @@ void __qmljs_throw(Value value, ExecutionContext *context)
context->leaveCallContext();
context = context->parent;
}
- DeclarativeEnvironment *env = context->lexicalEnvironment;
- while (env->withObject != handler.with) {
- DeclarativeEnvironment::With *w = env->withObject;
- env->withObject = w->next;
+
+ while (context->withObject != handler.with) {
+ ExecutionContext::With *w = context->withObject;
+ context->withObject = w->next;
delete w;
}
@@ -806,7 +806,7 @@ void *__qmljs_create_exception_handler(ExecutionContext *context)
context->engine->unwindStack.append(ExecutionEngine::ExceptionHandler());
ExecutionEngine::ExceptionHandler &handler = context->engine->unwindStack.last();
handler.context = context;
- handler.with = context->lexicalEnvironment->withObject;
+ handler.with = context->withObject;
return handler.stackFrame;
}
@@ -835,17 +835,17 @@ void __qmljs_builtin_throw(Value val, ExecutionContext *context)
void __qmljs_builtin_push_with(Value o, ExecutionContext *ctx)
{
Object *obj = __qmljs_to_object(o, ctx).asObject();
- ctx->lexicalEnvironment->pushWithObject(obj);
+ ctx->pushWithObject(obj);
}
void __qmljs_builtin_pop_with(ExecutionContext *ctx)
{
- ctx->lexicalEnvironment->popWithObject();
+ ctx->popWithObject();
}
void __qmljs_builtin_declare_var(ExecutionContext *ctx, bool deletable, String *name)
{
- ctx->lexicalEnvironment->createMutableBinding(ctx, name, deletable);
+ ctx->createMutableBinding(ctx, name, deletable);
}
} // extern "C"