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

Side by Side Diff: runtime/vm/jit_optimizer.cc

Issue 2002583002: Background compiler should validate CHA decisions before committing the code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/jit_optimizer.h" 5 #include "vm/jit_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/branch_optimizer.h" 8 #include "vm/branch_optimizer.h"
9 #include "vm/cha.h" 9 #include "vm/cha.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 2373 matching lines...) Expand 10 before | Expand all | Expand 10 after
2384 2384
2385 // Private classes cannot be subclassed by later loaded libs. 2385 // Private classes cannot be subclassed by later loaded libs.
2386 if (!type_class.IsPrivate()) { 2386 if (!type_class.IsPrivate()) {
2387 if (FLAG_use_cha_deopt || isolate()->all_classes_finalized()) { 2387 if (FLAG_use_cha_deopt || isolate()->all_classes_finalized()) {
2388 if (FLAG_trace_cha) { 2388 if (FLAG_trace_cha) {
2389 THR_Print(" **(CHA) Typecheck as class equality since no " 2389 THR_Print(" **(CHA) Typecheck as class equality since no "
2390 "subclasses: %s\n", 2390 "subclasses: %s\n",
2391 type_class.ToCString()); 2391 type_class.ToCString());
2392 } 2392 }
2393 if (FLAG_use_cha_deopt) { 2393 if (FLAG_use_cha_deopt) {
2394 thread()->cha()->AddToLeafClasses(type_class); 2394 thread()->cha()->AddToGuardedClasses(type_class, /*subclass_count=*/0);
2395 } 2395 }
2396 } else { 2396 } else {
2397 return false; 2397 return false;
2398 } 2398 }
2399 } 2399 }
2400 const intptr_t num_type_args = type_class.NumTypeArguments(); 2400 const intptr_t num_type_args = type_class.NumTypeArguments();
2401 if (num_type_args > 0) { 2401 if (num_type_args > 0) {
2402 // Only raw types can be directly compared, thus disregarding type 2402 // Only raw types can be directly compared, thus disregarding type
2403 // arguments. 2403 // arguments.
2404 const intptr_t num_type_params = type_class.NumTypeParameters(); 2404 const intptr_t num_type_params = type_class.NumTypeParameters();
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
3081 3081
3082 // Discard the environment from the original instruction because the store 3082 // Discard the environment from the original instruction because the store
3083 // can't deoptimize. 3083 // can't deoptimize.
3084 instr->RemoveEnvironment(); 3084 instr->RemoveEnvironment();
3085 ReplaceCall(instr, store); 3085 ReplaceCall(instr, store);
3086 return true; 3086 return true;
3087 } 3087 }
3088 3088
3089 3089
3090 } // namespace dart 3090 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698