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

Unified Diff: src/objects.h

Issue 888623002: Property reconfiguring implemented. Tests added. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/lookup.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')
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 135280125e1d52ca55182348fcf9da62178934a9..cd1b9a10af47d2b64efef4aefe79e0bb5c52157c 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -5898,23 +5898,15 @@ class Map: public HeapObject {
static void GeneralizeFieldType(Handle<Map> map, int modify_index,
Representation new_representation,
Handle<HeapType> new_field_type);
- static Handle<Map> GeneralizeRepresentation(
- Handle<Map> map,
- int modify_index,
- Representation new_representation,
- Handle<HeapType> new_field_type,
- StoreMode store_mode);
- static Handle<Map> CopyGeneralizeAllRepresentations(
- Handle<Map> map,
- int modify_index,
- StoreMode store_mode,
- PropertyAttributes attributes,
- const char* reason);
+ static Handle<Map> ReconfigureProperty(Handle<Map> map, int modify_index,
+ PropertyKind new_kind,
+ PropertyAttributes new_attributes,
+ Representation new_representation,
+ Handle<HeapType> new_field_type,
+ StoreMode store_mode);
static Handle<Map> CopyGeneralizeAllRepresentations(
- Handle<Map> map,
- int modify_index,
- StoreMode store_mode,
- const char* reason);
+ Handle<Map> map, int modify_index, StoreMode store_mode,
+ PropertyKind kind, PropertyAttributes attributes, const char* reason);
static Handle<Map> PrepareForDataProperty(Handle<Map> old_map,
int descriptor_number,
@@ -6142,8 +6134,10 @@ class Map: public HeapObject {
static Handle<Map> TransitionToAccessorProperty(
Handle<Map> map, Handle<Name> name, AccessorComponent component,
Handle<Object> accessor, PropertyAttributes attributes);
- static Handle<Map> ReconfigureDataProperty(Handle<Map> map, int descriptor,
- PropertyAttributes attributes);
+ static Handle<Map> ReconfigureExistingProperty(Handle<Map> map,
+ int descriptor,
+ PropertyKind kind,
+ PropertyAttributes attributes);
inline void AppendDescriptor(Descriptor* desc);
@@ -6428,6 +6422,9 @@ class Map: public HeapObject {
Descriptor* descriptor,
int index,
TransitionFlag flag);
+ static MUST_USE_RESULT MaybeHandle<Map> TryReconfigureExistingProperty(
+ Handle<Map> map, int descriptor, PropertyKind kind,
+ PropertyAttributes attributes, const char** reason);
static Handle<Map> CopyNormalized(Handle<Map> map,
PropertyNormalizationMode mode);
@@ -6461,6 +6458,8 @@ class Map: public HeapObject {
Representation new_representation,
Handle<HeapType> new_type);
+ void PrintReconfiguration(FILE* file, int modify_index, PropertyKind kind,
+ PropertyAttributes attributes);
void PrintGeneralization(FILE* file,
const char* reason,
int modify_index,
@@ -6472,6 +6471,10 @@ class Map: public HeapObject {
HeapType* old_field_type,
HeapType* new_field_type);
+#ifdef OBJECT_PRINT
+ void PrintPrototypeTransitions(std::ostream& os); // NOLINT
+#endif
+
static inline void SetPrototypeTransitions(
Handle<Map> map,
Handle<FixedArray> prototype_transitions);
@@ -10495,6 +10498,14 @@ class AccessorPair: public Struct {
if (!setter->IsNull()) set_setter(setter);
}
+ bool Equals(AccessorPair* pair) {
+ return (this == pair) || pair->Equals(getter(), setter());
+ }
+
+ bool Equals(Object* getter_value, Object* setter_value) {
+ return (getter() == getter_value) && (setter() == setter_value);
+ }
+
bool ContainsAccessor() {
return IsJSAccessor(getter()) || IsJSAccessor(setter());
}
« no previous file with comments | « src/lookup.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698