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

Unified Diff: runtime/vm/code_generator.cc

Issue 1685963002: Pass field to mutator thread so that it can be marked as boxed and all dependent code deoptimized (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address reviewer's comments Created 4 years, 10 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 | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 47d215c5936f9cd919edee13ceaa25c8f8c21447..b0af85d5962a7a5b43e7d499790085b2b964f203 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -65,6 +65,8 @@ DEFINE_FLAG(bool, trace_type_checks, false, "Trace runtime type checks.");
DECLARE_FLAG(int, max_deoptimization_counter_threshold);
DECLARE_FLAG(bool, enable_inlining_annotations);
DECLARE_FLAG(bool, trace_compiler);
+DECLARE_FLAG(bool, trace_field_guards);
+DECLARE_FLAG(bool, trace_optimization);
DECLARE_FLAG(bool, trace_optimizing_compiler);
DECLARE_FLAG(bool, warn_on_javascript_compatibility);
DECLARE_FLAG(int, max_polymorphic_checks);
@@ -1494,6 +1496,18 @@ DEFINE_RUNTIME_ENTRY(OptimizeInvokedFunction, 1) {
ASSERT(function.HasCode());
if (CanOptimizeFunction(function, thread)) {
+ if (FLAG_background_compilation) {
+ Field& field = Field::Handle(zone, isolate->GetDeoptimizingBoxedField());
+ while (!field.IsNull()) {
+ if (FLAG_trace_optimization || FLAG_trace_field_guards) {
+ THR_Print("Lazy disabling unboxing of %s\n", field.ToCString());
+ }
+ field.set_is_unboxing_candidate(false);
+ field.DeoptimizeDependentCode();
+ // Get next field.
+ field = isolate->GetDeoptimizingBoxedField();
+ }
+ }
// TODO(srdjan): Fix background compilation of regular expressions.
if (FLAG_background_compilation &&
(!function.IsIrregexpFunction() || FLAG_regexp_opt_in_background)) {
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698