Commit 8587c4ce authored by mvstanton's avatar mvstanton Committed by Commit bot

[Turbofan] Soft deopt if we only have deprecated maps on optimization.

In native context specialization, we attempt to use map-based feedback to do optimized named and element loads and stores. Tragically, it could happen that any maps we encounter for a load have been deprecated. The right thing to do here is reoptimize later, let the IC subsystem update the map.

BUG=

Review-Url: https://codereview.chromium.org/2187283002
Cr-Commit-Position: refs/heads/master@{#38143}
parent 1d2a1dd6
......@@ -130,7 +130,10 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccess(
}
// Nothing to do if we have no non-deprecated maps.
if (access_infos.empty()) return NoChange();
if (access_infos.empty()) {
return ReduceSoftDeoptimize(
node, DeoptimizeReason::kInsufficientTypeFeedbackForGenericNamedAccess);
}
// Ensure that {index} matches the specified {name} (if {index} is given).
if (index != nullptr) {
......@@ -426,7 +429,10 @@ Reduction JSNativeContextSpecialization::ReduceElementAccess(
}
// Nothing to do if we have no non-deprecated maps.
if (access_infos.empty()) return NoChange();
if (access_infos.empty()) {
return ReduceSoftDeoptimize(
node, DeoptimizeReason::kInsufficientTypeFeedbackForGenericKeyedAccess);
}
// The final states for every polymorphic branch. We join them with
// Merge+Phi+EffectPhi at the bottom.
......
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