aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4value_p.h
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2018-05-25 10:44:20 +0200
committerRobin Burchell <robin.burchell@crimson.no>2018-05-25 20:41:55 +0000
commit30b3b8a7603a9963d17cf8520fda7252841cda91 (patch)
tree0604f4dc8bf6df584be3b0a248be48f4c05f8ebb /src/qml/jsruntime/qv4value_p.h
parenta1ea2b8ec057bca58fdb5e9498e2f302ef0e61b4 (diff)
qv4arrayobject: Implement Array.prototype.includes from ES7
We also add a sameValueZero helper, to make life easier. Remaining failures: built-ins/Array/prototype/includes/get-prop.js fails (due to missing Proxy) built-ins/Array/prototype/includes/length-boundaries.js fails length-boundaries failure is due to strange treatment of edge number values in Value, I think, I haven't yet been able to rectify that one. Change-Id: Idacca528d88fb052d19a5d244662927f502f20d2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4value_p.h')
-rw-r--r--src/qml/jsruntime/qv4value_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h
index a27ae9c9a6..af956e84e1 100644
--- a/src/qml/jsruntime/qv4value_p.h
+++ b/src/qml/jsruntime/qv4value_p.h
@@ -478,8 +478,9 @@ public:
ReturnedValue asReturnedValue() const { return _val; }
static Value fromReturnedValue(ReturnedValue val) { Value v; v._val = val; return v; }
- // Section 9.12
+ // As per ES specs
bool sameValue(Value other) const;
+ bool sameValueZero(Value other) const;
inline void mark(MarkStack *markStack);