diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-08-16 08:53:47 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-17 09:26:24 +0200 |
commit | 51e7447481a472ef542e7c6e7b669574ba366a9d (patch) | |
tree | ccfb5f472ca0aa374d75b65f26625365d1580b3b /src/qml/jsruntime/qv4engine.cpp | |
parent | 65c024c04a1b8e3a69dba76b8ce99c5e75030d09 (diff) |
Optimize contruction of Arguments objects
Change-Id: If77bff28a25462a6069d646a2594dd903fefb9e5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index acaae460b5..ddeb20ad7d 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -124,6 +124,7 @@ ExecutionEngine::ExecutionEngine(QQmlJS::EvalISelFactory *factory) id_constructor = newIdentifier(QStringLiteral("constructor")); id_arguments = newIdentifier(QStringLiteral("arguments")); id_caller = newIdentifier(QStringLiteral("caller")); + id_callee = newIdentifier(QStringLiteral("callee")); id_this = newIdentifier(QStringLiteral("this")); id___proto__ = newIdentifier(QStringLiteral("__proto__")); id_enumerable = newIdentifier(QStringLiteral("enumerable")); @@ -137,6 +138,10 @@ ExecutionEngine::ExecutionEngine(QQmlJS::EvalISelFactory *factory) id_name = newIdentifier(QStringLiteral("name")); arrayClass = emptyClass->addMember(id_length, Attr_NotConfigurable|Attr_NotEnumerable); + InternalClass *argsClass = emptyClass->addMember(id_length, Attr_NotEnumerable); + argumentsObjectClass = argsClass->addMember(id_callee, Attr_Data|Attr_NotEnumerable); + strictArgumentsObjectClass = argsClass->addMember(id_callee, Attr_Accessor|Attr_NotConfigurable|Attr_NotEnumerable); + strictArgumentsObjectClass = strictArgumentsObjectClass->addMember(id_caller, Attr_Accessor|Attr_NotConfigurable|Attr_NotEnumerable); initRootContext(); objectPrototype = new (memoryManager) ObjectPrototype(this); |