Commit 6bb6224e authored by ishell@chromium.org's avatar ishell@chromium.org Committed by Commit Bot

[ic] Always miss if the receiver map is deprecated to enforce instance migration.

... and revert "[runtime] Mark maps created as a result of field type or
representation generalization as migration targets." because it regresses
performance of too many map checks in optimized code.

BUG=v8:5444, chromium:680995

Change-Id: I84038d75425df3709a81e5fdcc6c0db32939060d
Reviewed-on: https://chromium-review.googlesource.com/442125Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43188}
parent 328ad0a7
......@@ -1453,6 +1453,7 @@ void AccessorAssembler::LoadIC(const LoadICParameters* p) {
miss(this /*, Label::kDeferred*/);
Node* receiver_map = LoadReceiverMap(p->receiver);
GotoIf(IsSetWord32<Map::Deprecated>(LoadMapBitField3(receiver_map)), &miss);
// Check monomorphic case.
Node* feedback =
......@@ -1595,6 +1596,7 @@ void AccessorAssembler::KeyedLoadIC(const LoadICParameters* p) {
miss(this /*, Label::kDeferred*/);
Node* receiver_map = LoadReceiverMap(p->receiver);
GotoIf(IsSetWord32<Map::Deprecated>(LoadMapBitField3(receiver_map)), &miss);
// Check monomorphic case.
Node* feedback =
......@@ -1690,6 +1692,7 @@ void AccessorAssembler::StoreIC(const StoreICParameters* p) {
miss(this /*, Label::kDeferred*/);
Node* receiver_map = LoadReceiverMap(p->receiver);
GotoIf(IsSetWord32<Map::Deprecated>(LoadMapBitField3(receiver_map)), &miss);
// Check monomorphic case.
Node* feedback =
......@@ -1742,6 +1745,7 @@ void AccessorAssembler::KeyedStoreIC(const StoreICParameters* p,
try_polymorphic_name(this /*, Label::kDeferred*/);
Node* receiver_map = LoadReceiverMap(p->receiver);
GotoIf(IsSetWord32<Map::Deprecated>(LoadMapBitField3(receiver_map)), &miss);
// Check monomorphic case.
Node* feedback =
......
......@@ -538,6 +538,7 @@ void Map::MapPrint(std::ostream& os) { // NOLINT
}
if (is_deprecated()) os << "\n - deprecated_map";
if (is_stable()) os << "\n - stable_map";
if (is_migration_target()) os << "\n - migration_target";
if (is_dictionary_map()) os << "\n - dictionary_map";
if (has_hidden_prototype()) os << "\n - has_hidden_prototype";
if (has_named_interceptor()) os << "\n - named_interceptor";
......
......@@ -9060,10 +9060,8 @@ Handle<Map> UpdateDescriptorForValue(Handle<Map> map, int descriptor,
Handle<FieldType> type = value->OptimalType(isolate, representation);
MapUpdater mu(isolate, map);
Handle<Map> new_map = mu.ReconfigureToDataField(
descriptor, attributes, constness, representation, type);
new_map->set_migration_target(true);
return new_map;
return mu.ReconfigureToDataField(descriptor, attributes, constness,
representation, type);
}
} // namespace
......
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