aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4isel_moth.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/compiler/qv4isel_moth.cpp')
-rw-r--r--src/qml/compiler/qv4isel_moth.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp
index 7d62d71e98..24fbe3c680 100644
--- a/src/qml/compiler/qv4isel_moth.cpp
+++ b/src/qml/compiler/qv4isel_moth.cpp
@@ -1219,15 +1219,16 @@ void InstructionSelection::callBuiltinDefineObjectLiteral(IR::Expr *result, int
{
int argLocation = outgoingArgumentTempStart();
- const int classId = registerJSClass(keyValuePairCount, keyValuePairs);
+ QVector<Compiler::JSUnitGenerator::MemberInfo> members;
// Process key/value pairs first
IR::ExprList *it = keyValuePairs;
for (int i = 0; i < keyValuePairCount; ++i, it = it->next) {
- // Skip name
+ QString key = *it->expr->asName()->id;
it = it->next;
bool isData = it->expr->asConst()->value;
+ members.append({ key, !isData });
it = it->next;
if (IR::Const *c = it->expr->asConst()) {
@@ -1254,6 +1255,8 @@ void InstructionSelection::callBuiltinDefineObjectLiteral(IR::Expr *result, int
}
}
+ const int classId = registerJSClass(members);
+
// Process array values
uint arrayValueCount = 0;
it = arrayEntries;