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

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

Issue 1842853002: VM: Fix --no-use-field-guards. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | runtime/vm/raw_object_snapshot.cc » ('j') | 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 3100 matching lines...) Expand 10 before | Expand all | Expand 10 after
3111 const String& field_name = 3111 const String& field_name =
3112 String::Handle(Z, Field::NameFromSetter(instr->function_name())); 3112 String::Handle(Z, Field::NameFromSetter(instr->function_name()));
3113 const Field& field = 3113 const Field& field =
3114 Field::ZoneHandle(Z, GetField(class_id, field_name)); 3114 Field::ZoneHandle(Z, GetField(class_id, field_name));
3115 ASSERT(!field.IsNull()); 3115 ASSERT(!field.IsNull());
3116 3116
3117 if (InstanceCallNeedsClassCheck(instr, RawFunction::kImplicitSetter)) { 3117 if (InstanceCallNeedsClassCheck(instr, RawFunction::kImplicitSetter)) {
3118 AddReceiverCheck(instr); 3118 AddReceiverCheck(instr);
3119 } 3119 }
3120 if (field.guarded_cid() != kDynamicCid) { 3120 if (field.guarded_cid() != kDynamicCid) {
3121 ASSERT(!FLAG_use_field_guards);
3121 InsertBefore(instr, 3122 InsertBefore(instr,
3122 new(Z) GuardFieldClassInstr( 3123 new(Z) GuardFieldClassInstr(
3123 new(Z) Value(instr->ArgumentAt(1)), 3124 new(Z) Value(instr->ArgumentAt(1)),
3124 field, 3125 field,
3125 instr->deopt_id()), 3126 instr->deopt_id()),
3126 instr->env(), 3127 instr->env(),
3127 FlowGraph::kEffect); 3128 FlowGraph::kEffect);
3128 } 3129 }
3129 3130
3130 if (field.needs_length_check()) { 3131 if (field.needs_length_check()) {
3132 ASSERT(!FLAG_use_field_guards);
3131 InsertBefore(instr, 3133 InsertBefore(instr,
3132 new(Z) GuardFieldLengthInstr( 3134 new(Z) GuardFieldLengthInstr(
3133 new(Z) Value(instr->ArgumentAt(1)), 3135 new(Z) Value(instr->ArgumentAt(1)),
3134 field, 3136 field,
3135 instr->deopt_id()), 3137 instr->deopt_id()),
3136 instr->env(), 3138 instr->env(),
3137 FlowGraph::kEffect); 3139 FlowGraph::kEffect);
3138 } 3140 }
3139 3141
3140 // Field guard was detached. 3142 // Field guard was detached.
(...skipping 10 matching lines...) Expand all
3151 3153
3152 // Discard the environment from the original instruction because the store 3154 // Discard the environment from the original instruction because the store
3153 // can't deoptimize. 3155 // can't deoptimize.
3154 instr->RemoveEnvironment(); 3156 instr->RemoveEnvironment();
3155 ReplaceCall(instr, store); 3157 ReplaceCall(instr, store);
3156 return true; 3158 return true;
3157 } 3159 }
3158 3160
3159 3161
3160 } // namespace dart 3162 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698