Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: src/elements.h

Issue 2146293003: [builtins] implement Array.prototype.includes in TurboFan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add a basic impl in ElementsAccessor, cleanup %ArrayIncludes_Slow, lots of new tests Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/elements.h
diff --git a/src/elements.h b/src/elements.h
index 9f70f2a0c753864e72ddb5f84754304a42ddfa8a..c3a7d8259a893e9e3d6fe42d9fecb0fceb02463c 100644
--- a/src/elements.h
+++ b/src/elements.h
@@ -152,6 +152,12 @@ class ElementsAccessor {
virtual uint32_t GetCapacity(JSObject* holder,
FixedArrayBase* backing_store) = 0;
+ // Check an Object's own elements for an element (using SameValueZero
+ // semantics)
+ virtual Maybe<bool> IncludesValue(Isolate* isolate, Handle<JSObject> receiver,
+ Handle<Object> value, uint32_t start,
+ uint32_t length) = 0;
+
protected:
friend class LookupIterator;

Powered by Google App Engine
This is Rietveld 408576698