diff options
author | Lars Knoll <lars.knoll@digia.com> | 2012-11-15 12:23:39 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-15 13:40:55 +0100 |
commit | 4810e095b7940de875eb6d9d8a907e632ede561d (patch) | |
tree | 89df2e883a55073b70b7030f9442076acc05ec90 /main.cpp | |
parent | 1cbec5b889fb29732337c4db3f3f1fef1241f65b (diff) |
Store the activation object as a pointer, not as a Value.
The activation object inside the context is always an object,
or null. This avoids some needless conversions to and from
Value's.
Change-Id: Ibbd88c83fa073a4ed3cf03742129357dd9567cec
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -282,11 +282,11 @@ static int evaluate(QQmlJS::VM::Context *ctx, const QString &fileName, return EXIT_FAILURE; } - if (! ctx->activation.isObject()) - ctx->activation = VM::Value::fromObject(new QQmlJS::VM::Object()); + if (!ctx->activation) + ctx->activation = new QQmlJS::VM::Object(); foreach (const QString *local, globalCode->locals) { - ctx->activation.objectValue()->__put__(ctx, *local, QQmlJS::VM::Value::undefinedValue()); + ctx->activation->__put__(ctx, *local, QQmlJS::VM::Value::undefinedValue()); } void * buf = __qmljs_create_exception_handler(ctx); |