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

Unified Diff: src/objects.h

Issue 2601643002: [runtime] Add MapUpdater class that manages all kinds of map updates. (Closed)
Patch Set: Addressing comments Created 3 years, 11 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 | « src/map-updater.cc ('k') | 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 3eda230a939a1b5163516c1bdec461972e117a34..fc194ac79d4bc669c1eea45f915cdebf2b29bfc2 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -6054,17 +6054,19 @@ class Map: public HeapObject {
MUST_USE_RESULT static Handle<FieldType> GeneralizeFieldType(
Representation rep1, Handle<FieldType> type1, Representation rep2,
Handle<FieldType> type2, Isolate* isolate);
- static void GeneralizeFieldType(Handle<Map> map, int modify_index,
- Representation new_representation,
- Handle<FieldType> new_field_type);
+ static void GeneralizeField(Handle<Map> map, int modify_index,
+ Representation new_representation,
+ Handle<FieldType> new_field_type);
- static inline Handle<Map> ReconfigureProperty(
- Handle<Map> map, int modify_index, PropertyKind new_kind,
- PropertyAttributes new_attributes, Representation new_representation,
- Handle<FieldType> new_field_type, StoreMode store_mode);
+ static Handle<Map> ReconfigureProperty(Handle<Map> map, int modify_index,
+ PropertyKind new_kind,
+ PropertyAttributes new_attributes,
+ Representation new_representation,
+ Handle<FieldType> new_field_type,
+ StoreMode store_mode);
- static inline Handle<Map> ReconfigureElementsKind(
- Handle<Map> map, ElementsKind new_elements_kind);
+ static Handle<Map> ReconfigureElementsKind(Handle<Map> map,
+ ElementsKind new_elements_kind);
static Handle<Map> PrepareForDataProperty(Handle<Map> old_map,
int descriptor_number,
@@ -6187,6 +6189,8 @@ class Map: public HeapObject {
Descriptor* descriptor,
TransitionFlag flag);
+ static Handle<Object> WrapType(Handle<FieldType> type);
+
MUST_USE_RESULT static MaybeHandle<Map> CopyWithField(
Handle<Map> map, Handle<Name> name, Handle<FieldType> type,
PropertyAttributes attributes, Representation representation,
@@ -6499,14 +6503,7 @@ class Map: public HeapObject {
static Handle<Map> CopyNormalized(Handle<Map> map,
PropertyNormalizationMode mode);
- static Handle<Map> Reconfigure(Handle<Map> map,
- ElementsKind new_elements_kind,
- int modify_index, PropertyKind new_kind,
- PropertyAttributes new_attributes,
- Representation new_representation,
- Handle<FieldType> new_field_type,
- StoreMode store_mode);
-
+ // TODO(ishell): Move to MapUpdater.
static Handle<Map> CopyGeneralizeAllRepresentations(
Handle<Map> map, ElementsKind elements_kind, int modify_index,
StoreMode store_mode, PropertyKind kind, PropertyAttributes attributes,
@@ -6523,8 +6520,6 @@ class Map: public HeapObject {
LayoutDescriptor* new_layout_descriptor);
- Map* FindLastMatchMap(int verbatim, int length, DescriptorArray* descriptors);
-
// Update field type of the given descriptor to new representation and new
// type. The type must be prepared for storing in descriptor array:
// it must be either a simple type or a map wrapped in a weak cell.
@@ -6532,8 +6527,10 @@ class Map: public HeapObject {
Representation new_representation,
Handle<Object> new_wrapped_type);
+ // TODO(ishell): Move to MapUpdater.
void PrintReconfiguration(FILE* file, int modify_index, PropertyKind kind,
PropertyAttributes attributes);
+ // TODO(ishell): Move to MapUpdater.
void PrintGeneralization(FILE* file, const char* reason, int modify_index,
int split, int descriptors, bool constant_to_field,
Representation old_representation,
@@ -6542,10 +6539,11 @@ class Map: public HeapObject {
MaybeHandle<Object> old_value,
MaybeHandle<FieldType> new_field_type,
MaybeHandle<Object> new_value);
-
static const int kFastPropertiesSoftLimit = 12;
static const int kMaxFastProperties = 128;
+ friend class MapUpdater;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(Map);
};
« no previous file with comments | « src/map-updater.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698