diff options
author | Lars Knoll <lars.knoll@digia.com> | 2012-10-29 15:37:02 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-31 16:57:24 +0100 |
commit | ddba8f6bb06f0f2312a8c070f8cf4a9e079c9ca7 (patch) | |
tree | f0553cd7dd4f8498f01788b4280709a1e9ef9669 /main.cpp | |
parent | 950e4f70a31b5ab220a1d36cb492f8a22921ee84 (diff) |
Conformant implementation of the object internal methods
See section 8.12 of the standard. This implements
8.12.1 - 8.12.7 and 8.12.9
Also gave these methods standard conformant names.
They are marked as [[foo]] in the standard, which
translates to __foo__ in our code.
Change-Id: I1990d6c6dd24e929c23d5c51d36f1e2e0a0a3b63
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
@@ -247,7 +247,7 @@ static void evaluate(QQmlJS::VM::Context *ctx, const QString &fileName, const QS ctx->activation = VM::Value::fromObject(new QQmlJS::VM::Object()); foreach (const QString *local, globalCode->locals) { - ctx->activation.objectValue()->setProperty(ctx, *local, QQmlJS::VM::Value::undefinedValue()); + ctx->activation.objectValue()->__put__(ctx, *local, QQmlJS::VM::Value::undefinedValue()); } void * buf = __qmljs_create_exception_handler(ctx); @@ -297,10 +297,10 @@ int main(int argc, char *argv[]) QQmlJS::VM::Context *ctx = vm.rootContext; QQmlJS::VM::Object *globalObject = vm.globalObject.objectValue(); - globalObject->setProperty(ctx, vm.identifier(QStringLiteral("print")), + globalObject->__put__(ctx, vm.identifier(QStringLiteral("print")), QQmlJS::VM::Value::fromObject(new builtins::Print(ctx))); - globalObject->setProperty(ctx, vm.identifier(QStringLiteral("eval")), + globalObject->__put__(ctx, vm.identifier(QStringLiteral("eval")), QQmlJS::VM::Value::fromObject(new builtins::Eval(ctx))); foreach (const QString &fn, args) { |