Chromium Code Reviews

Side by Side Diff: src/objects.h

Issue 2502393002: [ic] Invalidate prototype validity cell when a slow prototype becomes fast. (Closed)
Patch Set: Added JSObject::NotifyMapChange() Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « src/factory.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2335 matching lines...)
2346 static void ReoptimizeIfPrototype(Handle<JSObject> object); 2346 static void ReoptimizeIfPrototype(Handle<JSObject> object);
2347 static void MakePrototypesFast(Handle<Object> receiver, 2347 static void MakePrototypesFast(Handle<Object> receiver,
2348 WhereToStart where_to_start, Isolate* isolate); 2348 WhereToStart where_to_start, Isolate* isolate);
2349 static void LazyRegisterPrototypeUser(Handle<Map> user, Isolate* isolate); 2349 static void LazyRegisterPrototypeUser(Handle<Map> user, Isolate* isolate);
2350 static void UpdatePrototypeUserRegistration(Handle<Map> old_map, 2350 static void UpdatePrototypeUserRegistration(Handle<Map> old_map,
2351 Handle<Map> new_map, 2351 Handle<Map> new_map,
2352 Isolate* isolate); 2352 Isolate* isolate);
2353 static bool UnregisterPrototypeUser(Handle<Map> user, Isolate* isolate); 2353 static bool UnregisterPrototypeUser(Handle<Map> user, Isolate* isolate);
2354 static void InvalidatePrototypeChains(Map* map); 2354 static void InvalidatePrototypeChains(Map* map);
2355 2355
2356 // Updates prototype chain tracking information when an object changes its
2357 // map from |old_map| to |new_map|.
2358 static void NotifyMapChange(Handle<Map> old_map, Handle<Map> new_map,
2359 Isolate* isolate);
2360
2356 // Utility used by many Array builtins and runtime functions 2361 // Utility used by many Array builtins and runtime functions
2357 static inline bool PrototypeHasNoElements(Isolate* isolate, JSObject* object); 2362 static inline bool PrototypeHasNoElements(Isolate* isolate, JSObject* object);
2358 2363
2359 // Alternative implementation of WeakFixedArray::NullCallback. 2364 // Alternative implementation of WeakFixedArray::NullCallback.
2360 class PrototypeRegistryCompactionCallback { 2365 class PrototypeRegistryCompactionCallback {
2361 public: 2366 public:
2362 static void Callback(Object* value, int old_index, int new_index); 2367 static void Callback(Object* value, int old_index, int new_index);
2363 }; 2368 };
2364 2369
2365 // Retrieve interceptors. 2370 // Retrieve interceptors.
(...skipping 9495 matching lines...)
11861 } 11866 }
11862 return value; 11867 return value;
11863 } 11868 }
11864 }; 11869 };
11865 11870
11866 11871
11867 } // NOLINT, false-positive due to second-order macros. 11872 } // NOLINT, false-positive due to second-order macros.
11868 } // NOLINT, false-positive due to second-order macros. 11873 } // NOLINT, false-positive due to second-order macros.
11869 11874
11870 #endif // V8_OBJECTS_H_ 11875 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine