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

Unified Diff: src/objects.h

Issue 1108583002: Revert of Lazily register prototype users (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index efa0caed6759fc6087836b85afba8902ef8edc87..bfec7726786dabf54fdf89f122988b02df40f7f3 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1841,11 +1841,9 @@
static void OptimizeAsPrototype(Handle<JSObject> object,
PrototypeOptimizationMode mode);
static void ReoptimizeIfPrototype(Handle<JSObject> object);
- static void LazyRegisterPrototypeUser(Handle<Map> user, Isolate* isolate);
- static bool RegisterPrototypeUserIfNotRegistered(Handle<JSObject> prototype,
- Handle<HeapObject> user,
- Isolate* isolate);
- static bool UnregisterPrototypeUser(Handle<JSObject> prototype,
+ static void RegisterPrototypeUser(Handle<JSObject> prototype,
+ Handle<HeapObject> user);
+ static void UnregisterPrototypeUser(Handle<JSObject> prototype,
Handle<HeapObject> user);
static void InvalidatePrototypeChains(Map* map);
@@ -2623,11 +2621,9 @@
// If |maybe_array| is not a WeakFixedArray, a fresh one will be allocated.
static Handle<WeakFixedArray> Add(
Handle<Object> maybe_array, Handle<HeapObject> value,
- SearchForDuplicates search_for_duplicates = kAlwaysAdd,
- bool* was_present = NULL);
-
- // Returns true if an entry was found and removed.
- bool Remove(Handle<HeapObject> value);
+ SearchForDuplicates search_for_duplicates = kAlwaysAdd);
+
+ void Remove(Handle<HeapObject> value);
void Compact();
@@ -5848,9 +5844,6 @@
};
-class PrototypeInfo;
-
-
// All heap objects have a Map that describes their structure.
// A Map contains information about:
// - Size information about the object
@@ -6058,10 +6051,6 @@
// [prototype_info]: Per-prototype metadata. Aliased with transitions
// (which prototype maps don't have).
DECL_ACCESSORS(prototype_info, Object)
- // PrototypeInfo is created lazily using this helper (which installs it on
- // the given prototype's map).
- static Handle<PrototypeInfo> GetOrCreatePrototypeInfo(
- Handle<JSObject> prototype, Isolate* isolate);
// [prototype chain validity cell]: Associated with a prototype object,
// stored in that object's map's PrototypeInfo, indicates that prototype
@@ -6134,6 +6123,9 @@
static void SetPrototype(
Handle<Map> map, Handle<Object> prototype,
PrototypeOptimizationMode proto_mode = FAST_PROTOTYPE);
+ static bool ShouldRegisterAsPrototypeUser(Handle<Map> map,
+ Handle<JSObject> prototype);
+ bool CanUseOptimizationsBasedOnPrototypeRegistry();
// [constructor]: points back to the function responsible for this map.
// The field overlaps with the back pointer. All maps in a transition tree
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698