summaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-05-27 22:58:32 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-28 10:40:08 +0000
commit3ccd529e350fdf20ad3fb7b296220d63f8bcc747 (patch)
treec755f0c029543fbf2afd510156e1d51c28a8b28b /src/qml/jsruntime/qv4engine_p.h
parent23aa9d58d006dd50adb3f582df9b7dab4f64be0b (diff)
Implement toPrimitive() the way the ES7 spec wants it
Add Dat.prototype[Symbol.toPrimitive] and make use of those methods in the toPrimitive implementation. Change-Id: I82a9a94dcae6822100de364373b3f4de1e3d749b Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Diffstat (limited to 'src/qml/jsruntime/qv4engine_p.h')
-rw-r--r--src/qml/jsruntime/qv4engine_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index 9206fdc0bb..155383c55d 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -304,6 +304,7 @@ public:
String_boolean,
String_number,
String_string,
+ String_default,
String_symbol,
String_object,
String_function,
@@ -365,6 +366,7 @@ public:
String *id_boolean() const { return reinterpret_cast<String *>(jsStrings + String_boolean); }
String *id_number() const { return reinterpret_cast<String *>(jsStrings + String_number); }
String *id_string() const { return reinterpret_cast<String *>(jsStrings + String_string); }
+ String *id_default() const { return reinterpret_cast<String *>(jsStrings + String_default); }
String *id_symbol() const { return reinterpret_cast<String *>(jsStrings + String_symbol); }
String *id_object() const { return reinterpret_cast<String *>(jsStrings + String_object); }
String *id_function() const { return reinterpret_cast<String *>(jsStrings + String_function); }