Commit 00a379a0 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Don't report failed map check as failed instance migration.

Failed instance migration should only be reported if the map of the
object was originally marked as deprecated. Otherwise it's pretty
confusing to investigate deoptimizations.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2700143002
Cr-Commit-Position: refs/heads/master@{#43293}
parent 4dfd5e5e
......@@ -1102,16 +1102,14 @@ Node* EffectControlLinearizer::LowerCheckMaps(Node* node, Node* frame_state) {
// Perform the (deferred) instance migration.
__ Bind(&migrate);
{
auto migration_failed = __ MakeLabel<2>();
auto retry_check_maps = __ MakeLabel<2>();
// If map is not deprecated the migration attempt does not make sense.
Node* bitfield3 =
__ LoadField(AccessBuilder::ForMapBitField3(), value_map);
Node* if_not_deprecated = __ WordEqual(
__ Word32And(bitfield3, __ Int32Constant(Map::Deprecated::kMask)),
__ Int32Constant(0));
__ GotoIf(if_not_deprecated, &migration_failed);
__ DeoptimizeIf(DeoptimizeReason::kWrongMap, if_not_deprecated,
frame_state);
Operator::Properties properties = Operator::kNoDeopt | Operator::kNoThrow;
Runtime::FunctionId id = Runtime::kTryMigrateInstance;
......@@ -1122,15 +1120,8 @@ Node* EffectControlLinearizer::LowerCheckMaps(Node* node, Node* frame_state) {
__ ExternalConstant(ExternalReference(id, isolate())),
__ Int32Constant(1), __ NoContextConstant());
Node* check = ObjectIsSmi(result);
__ GotoIf(check, &retry_check_maps);
__ Goto(&migration_failed);
__ Bind(&migration_failed);
__ DeoptimizeIf(DeoptimizeReason::kInstanceMigrationFailed,
__ Int32Constant(1), frame_state);
__ Goto(&retry_check_maps);
__ Bind(&retry_check_maps);
__ DeoptimizeIf(DeoptimizeReason::kInstanceMigrationFailed, check,
frame_state);
}
// Reload the current map of the {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