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

Side by Side Diff: src/objects.h

Issue 2146293003: [builtins] implement Array.prototype.includes in TurboFan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: debug fixup Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 // ES6 [[OwnPropertyKeys]] (modulo return type) 1997 // ES6 [[OwnPropertyKeys]] (modulo return type)
1998 MUST_USE_RESULT static inline MaybeHandle<FixedArray> OwnPropertyKeys( 1998 MUST_USE_RESULT static inline MaybeHandle<FixedArray> OwnPropertyKeys(
1999 Handle<JSReceiver> object); 1999 Handle<JSReceiver> object);
2000 2000
2001 MUST_USE_RESULT static MaybeHandle<FixedArray> GetOwnValues( 2001 MUST_USE_RESULT static MaybeHandle<FixedArray> GetOwnValues(
2002 Handle<JSReceiver> object, PropertyFilter filter); 2002 Handle<JSReceiver> object, PropertyFilter filter);
2003 2003
2004 MUST_USE_RESULT static MaybeHandle<FixedArray> GetOwnEntries( 2004 MUST_USE_RESULT static MaybeHandle<FixedArray> GetOwnEntries(
2005 Handle<JSReceiver> object, PropertyFilter filter); 2005 Handle<JSReceiver> object, PropertyFilter filter);
2006 2006
2007 MUST_USE_RESULT static Maybe<bool> IncludesValue(Isolate* isolate,
2008 Handle<JSReceiver> object,
2009 Handle<Object> value,
2010 Handle<Object> start_from);
2011
2007 // Layout description. 2012 // Layout description.
2008 static const int kPropertiesOffset = HeapObject::kHeaderSize; 2013 static const int kPropertiesOffset = HeapObject::kHeaderSize;
2009 static const int kHeaderSize = HeapObject::kHeaderSize + kPointerSize; 2014 static const int kHeaderSize = HeapObject::kHeaderSize + kPointerSize;
2010 2015
2011 bool HasProxyInPrototype(Isolate* isolate); 2016 bool HasProxyInPrototype(Isolate* isolate);
2012 2017
2013 private: 2018 private:
2014 DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver); 2019 DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver);
2015 }; 2020 };
2016 2021
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
2188 static void ReoptimizeIfPrototype(Handle<JSObject> object); 2193 static void ReoptimizeIfPrototype(Handle<JSObject> object);
2189 static void MakePrototypesFast(Handle<Object> receiver, 2194 static void MakePrototypesFast(Handle<Object> receiver,
2190 WhereToStart where_to_start, Isolate* isolate); 2195 WhereToStart where_to_start, Isolate* isolate);
2191 static void LazyRegisterPrototypeUser(Handle<Map> user, Isolate* isolate); 2196 static void LazyRegisterPrototypeUser(Handle<Map> user, Isolate* isolate);
2192 static void UpdatePrototypeUserRegistration(Handle<Map> old_map, 2197 static void UpdatePrototypeUserRegistration(Handle<Map> old_map,
2193 Handle<Map> new_map, 2198 Handle<Map> new_map,
2194 Isolate* isolate); 2199 Isolate* isolate);
2195 static bool UnregisterPrototypeUser(Handle<Map> user, Isolate* isolate); 2200 static bool UnregisterPrototypeUser(Handle<Map> user, Isolate* isolate);
2196 static void InvalidatePrototypeChains(Map* map); 2201 static void InvalidatePrototypeChains(Map* map);
2197 2202
2203 // Utility used by many Array builtins and runtime functions
2204 static inline bool PrototypeHasNoElements(Isolate* isolate, JSObject* object);
2205
2198 // Alternative implementation of WeakFixedArray::NullCallback. 2206 // Alternative implementation of WeakFixedArray::NullCallback.
2199 class PrototypeRegistryCompactionCallback { 2207 class PrototypeRegistryCompactionCallback {
2200 public: 2208 public:
2201 static void Callback(Object* value, int old_index, int new_index); 2209 static void Callback(Object* value, int old_index, int new_index);
2202 }; 2210 };
2203 2211
2204 // Retrieve interceptors. 2212 // Retrieve interceptors.
2205 inline InterceptorInfo* GetNamedInterceptor(); 2213 inline InterceptorInfo* GetNamedInterceptor();
2206 inline InterceptorInfo* GetIndexedInterceptor(); 2214 inline InterceptorInfo* GetIndexedInterceptor();
2207 2215
(...skipping 8803 matching lines...) Expand 10 before | Expand all | Expand 10 after
11011 } 11019 }
11012 return value; 11020 return value;
11013 } 11021 }
11014 }; 11022 };
11015 11023
11016 11024
11017 } // NOLINT, false-positive due to second-order macros. 11025 } // NOLINT, false-positive due to second-order macros.
11018 } // NOLINT, false-positive due to second-order macros. 11026 } // NOLINT, false-positive due to second-order macros.
11019 11027
11020 #endif // V8_OBJECTS_H_ 11028 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698