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

Unified Diff: src/compiler/js-native-context-specialization.cc

Issue 2675793002: [turbofan] Properly ensure that deoptimization is enabled. (Closed)
Patch Set: Created 3 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 | « no previous file | test/mjsunit/regress/regress-crbug-687990.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-native-context-specialization.cc
diff --git a/src/compiler/js-native-context-specialization.cc b/src/compiler/js-native-context-specialization.cc
index 3c7aacab15ccb4aed449d724f99d9b31c41f0acb..39f88f806fbaf3c6ae50fafa1aa19507a3941524 100644
--- a/src/compiler/js-native-context-specialization.cc
+++ b/src/compiler/js-native-context-specialization.cc
@@ -757,11 +757,13 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccessFromNexus(
Node* const receiver = NodeProperties::GetValueInput(node, 0);
Node* const effect = NodeProperties::GetEffectInput(node);
- // Check if we are accessing the current native contexts' global proxy.
- HeapObjectMatcher m(receiver);
- if (m.HasValue() && m.Value().is_identical_to(global_proxy())) {
- // Optimize accesses to the current native contexts' global proxy.
- return ReduceGlobalAccess(node, nullptr, value, name, access_mode);
+ if (flags() & kDeoptimizationEnabled) {
+ // Check if we are accessing the current native contexts' global proxy.
+ HeapObjectMatcher m(receiver);
+ if (m.HasValue() && m.Value().is_identical_to(global_proxy())) {
+ // Optimize accesses to the current native contexts' global proxy.
+ return ReduceGlobalAccess(node, nullptr, value, name, access_mode);
+ }
}
// Check if the {nexus} reports type feedback for the IC.
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-687990.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698