aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4argumentsobject_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-07 10:10:47 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-10 08:18:13 +0000
commitde8a6fd034e740e09c7385523026bc17d769edd3 (patch)
tree9ac9aa98116dfca7f7ab439e1558d9ee3ce54cf2 /src/qml/jsruntime/qv4argumentsobject_p.h
parentb960c796b741b3831b5eaafe583d92f362fdd498 (diff)
Create separate instructions to create both types of arguments objects
We know at compile time whether an arguments object should be strict or non strict (unmapped/mapped in ecmascript 6), use separate instructions for both cases. Change-Id: Ia23e68003beeda41a1f3597c0ba0980954c80ec7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4argumentsobject_p.h')
-rw-r--r--src/qml/jsruntime/qv4argumentsobject_p.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4argumentsobject_p.h b/src/qml/jsruntime/qv4argumentsobject_p.h
index 228e79c33b..da88a44fee 100644
--- a/src/qml/jsruntime/qv4argumentsobject_p.h
+++ b/src/qml/jsruntime/qv4argumentsobject_p.h
@@ -78,7 +78,8 @@ DECLARE_HEAP_OBJECT(ArgumentsSetterFunction, FunctionObject) {
#define ArgumentsObjectMembers(class, Member) \
Member(class, Pointer, CallContext *, context) \
Member(class, Pointer, MemberData *, mappedArguments) \
- Member(class, NoMark, bool, fullyCreated)
+ Member(class, NoMark, bool, fullyCreated) \
+ Member(class, NoMark, bool, isStrict)
DECLARE_HEAP_OBJECT(ArgumentsObject, Object) {
DECLARE_MARK_TABLE(ArgumentsObject);
@@ -87,7 +88,7 @@ DECLARE_HEAP_OBJECT(ArgumentsObject, Object) {
CalleePropertyIndex = 1,
CallerPropertyIndex = 3
};
- void init(QV4::CallContext *context);
+ void init(QV4::CallContext *context, bool strict);
};
}
@@ -132,7 +133,7 @@ struct ArgumentsObject: Object {
static bool isNonStrictArgumentsObject(Managed *m) {
return m->d()->vtable()->type == Type_ArgumentsObject &&
- !static_cast<ArgumentsObject *>(m)->context()->strictMode;
+ !static_cast<ArgumentsObject *>(m)->d()->isStrict;
}
bool defineOwnProperty(ExecutionEngine *engine, uint index, const Property *desc, PropertyAttributes attrs);