Commit 123b0ba2 authored by Georg Schmid's avatar Georg Schmid Committed by Commit Bot

Show constness when debug-printing generalizations

R=bmeurer@chromium.org

Change-Id: I88f3300d34b185e88f8b6f391346630a7c22ecb4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631422Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Schmid <gsps@google.com>
Cr-Commit-Position: refs/heads/master@{#61869}
parent f71cba99
...@@ -229,6 +229,7 @@ MapUpdater::State MapUpdater::TryReconfigureToDataFieldInplace() { ...@@ -229,6 +229,7 @@ MapUpdater::State MapUpdater::TryReconfigureToDataFieldInplace() {
old_map_->PrintGeneralization( old_map_->PrintGeneralization(
isolate_, stdout, "uninitialized field", modified_descriptor_, old_nof_, isolate_, stdout, "uninitialized field", modified_descriptor_, old_nof_,
old_nof_, false, old_representation, new_representation_, old_nof_, false, old_representation, new_representation_,
old_details.constness(), new_constness_,
handle(old_descriptors_->GetFieldType(modified_descriptor_), isolate_), handle(old_descriptors_->GetFieldType(modified_descriptor_), isolate_),
MaybeHandle<Object>(), new_field_type_, MaybeHandle<Object>()); MaybeHandle<Object>(), new_field_type_, MaybeHandle<Object>());
} }
...@@ -755,7 +756,8 @@ MapUpdater::State MapUpdater::ConstructNewMap() { ...@@ -755,7 +756,8 @@ MapUpdater::State MapUpdater::ConstructNewMap() {
isolate_, stdout, "", modified_descriptor_, split_nof, old_nof_, isolate_, stdout, "", modified_descriptor_, split_nof, old_nof_,
old_details.location() == kDescriptor && new_location_ == kField, old_details.location() == kDescriptor && new_location_ == kField,
old_details.representation(), new_details.representation(), old_details.representation(), new_details.representation(),
old_field_type, old_value, new_field_type, new_value); old_details.constness(), new_details.constness(), old_field_type,
old_value, new_field_type, new_value);
} }
Handle<LayoutDescriptor> new_layout_descriptor = Handle<LayoutDescriptor> new_layout_descriptor =
......
...@@ -349,6 +349,7 @@ void Map::PrintGeneralization( ...@@ -349,6 +349,7 @@ void Map::PrintGeneralization(
Isolate* isolate, FILE* file, const char* reason, int modify_index, Isolate* isolate, FILE* file, const char* reason, int modify_index,
int split, int descriptors, bool descriptor_to_field, int split, int descriptors, bool descriptor_to_field,
Representation old_representation, Representation new_representation, Representation old_representation, Representation new_representation,
PropertyConstness old_constness, PropertyConstness new_constness,
MaybeHandle<FieldType> old_field_type, MaybeHandle<Object> old_value, MaybeHandle<FieldType> old_field_type, MaybeHandle<Object> old_value,
MaybeHandle<FieldType> new_field_type, MaybeHandle<Object> new_value) { MaybeHandle<FieldType> new_field_type, MaybeHandle<Object> new_value) {
OFStream os(file); OFStream os(file);
...@@ -369,7 +370,7 @@ void Map::PrintGeneralization( ...@@ -369,7 +370,7 @@ void Map::PrintGeneralization(
} else { } else {
old_field_type.ToHandleChecked()->PrintTo(os); old_field_type.ToHandleChecked()->PrintTo(os);
} }
os << "}"; os << ";" << old_constness << "}";
} }
os << "->" << new_representation.Mnemonic() << "{"; os << "->" << new_representation.Mnemonic() << "{";
if (new_field_type.is_null()) { if (new_field_type.is_null()) {
...@@ -377,7 +378,7 @@ void Map::PrintGeneralization( ...@@ -377,7 +378,7 @@ void Map::PrintGeneralization(
} else { } else {
new_field_type.ToHandleChecked()->PrintTo(os); new_field_type.ToHandleChecked()->PrintTo(os);
} }
os << "} ("; os << ";" << new_constness << "} (";
if (strlen(reason) > 0) { if (strlen(reason) > 0) {
os << reason; os << reason;
} else { } else {
...@@ -612,8 +613,9 @@ Handle<Map> Map::CopyGeneralizeAllFields(Isolate* isolate, Handle<Map> map, ...@@ -612,8 +613,9 @@ Handle<Map> Map::CopyGeneralizeAllFields(Isolate* isolate, Handle<Map> map,
isolate, stdout, reason, modify_index, isolate, stdout, reason, modify_index,
new_map->NumberOfOwnDescriptors(), new_map->NumberOfOwnDescriptors(), new_map->NumberOfOwnDescriptors(), new_map->NumberOfOwnDescriptors(),
details.location() == kDescriptor, details.representation(), details.location() == kDescriptor, details.representation(),
Representation::Tagged(), field_type, MaybeHandle<Object>(), Representation::Tagged(), details.constness(), details.constness(),
FieldType::Any(isolate), MaybeHandle<Object>()); field_type, MaybeHandle<Object>(), FieldType::Any(isolate),
MaybeHandle<Object>());
} }
} }
new_map->set_elements_kind(elements_kind); new_map->set_elements_kind(elements_kind);
...@@ -813,8 +815,9 @@ void Map::GeneralizeField(Isolate* isolate, Handle<Map> map, int modify_index, ...@@ -813,8 +815,9 @@ void Map::GeneralizeField(Isolate* isolate, Handle<Map> map, int modify_index,
map->PrintGeneralization( map->PrintGeneralization(
isolate, stdout, "field type generalization", modify_index, isolate, stdout, "field type generalization", modify_index,
map->NumberOfOwnDescriptors(), map->NumberOfOwnDescriptors(), false, map->NumberOfOwnDescriptors(), map->NumberOfOwnDescriptors(), false,
details.representation(), details.representation(), old_field_type, details.representation(), details.representation(), old_constness,
MaybeHandle<Object>(), new_field_type, MaybeHandle<Object>()); new_constness, old_field_type, MaybeHandle<Object>(), new_field_type,
MaybeHandle<Object>());
} }
} }
......
...@@ -961,6 +961,7 @@ class Map : public HeapObject { ...@@ -961,6 +961,7 @@ class Map : public HeapObject {
Isolate* isolate, FILE* file, const char* reason, int modify_index, Isolate* isolate, FILE* file, const char* reason, int modify_index,
int split, int descriptors, bool constant_to_field, int split, int descriptors, bool constant_to_field,
Representation old_representation, Representation new_representation, Representation old_representation, Representation new_representation,
PropertyConstness old_constness, PropertyConstness new_constness,
MaybeHandle<FieldType> old_field_type, MaybeHandle<Object> old_value, MaybeHandle<FieldType> old_field_type, MaybeHandle<Object> old_value,
MaybeHandle<FieldType> new_field_type, MaybeHandle<Object> new_value); MaybeHandle<FieldType> new_field_type, MaybeHandle<Object> new_value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment