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

Unified Diff: runtime/vm/jit_optimizer.cc

Issue 2704623003: VM: [Kernel] Ensure we record [FieldLoadInstr]s in the ParsedFunction when using field guards (Closed)
Patch Set: Moved the AddToGuardedFields call to the LoadFieldInstr constructor Created 3 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 | « runtime/vm/intermediate_language.h ('k') | runtime/vm/kernel_to_il.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/jit_optimizer.cc
diff --git a/runtime/vm/jit_optimizer.cc b/runtime/vm/jit_optimizer.cc
index d7ef3e31aed6e2a968ef3c31d04ac5a66485d27e..719f359c116b6fc679b2f6a9c0a1275ad2fa4b60 100644
--- a/runtime/vm/jit_optimizer.cc
+++ b/runtime/vm/jit_optimizer.cc
@@ -971,16 +971,11 @@ bool JitOptimizer::InlineImplicitInstanceGetter(InstanceCallInstr* call) {
RawFunction::kImplicitGetter)) {
AddReceiverCheck(call);
}
- LoadFieldInstr* load = new (Z) LoadFieldInstr(
- new (Z) Value(call->ArgumentAt(0)), &field,
- AbstractType::ZoneHandle(Z, field.type()), call->token_pos());
+ LoadFieldInstr* load = new (Z)
+ LoadFieldInstr(new (Z) Value(call->ArgumentAt(0)), &field,
+ AbstractType::ZoneHandle(Z, field.type()),
+ call->token_pos(), &flow_graph()->parsed_function());
load->set_is_immutable(field.is_final());
- if (field.guarded_cid() != kIllegalCid) {
- if (!field.is_nullable() || (field.guarded_cid() == kNullCid)) {
- load->set_result_cid(field.guarded_cid());
- }
- flow_graph()->parsed_function().AddToGuardedFields(&field);
- }
// Discard the environment from the original instruction because the load
// can't deoptimize.
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/kernel_to_il.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698