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

Unified Diff: runtime/vm/kernel_to_il.cc

Issue 2704623003: VM: [Kernel] Ensure we record [FieldLoadInstr]s in the ParsedFunction when using field guards (Closed)
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_to_il.cc
diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc
index 8e251bbee1a45bc62689bff6f61a552e9b305773..f6947f545cc7596b127944bd7a9fbe87d113898e 100644
--- a/runtime/vm/kernel_to_il.cc
+++ b/runtime/vm/kernel_to_il.cc
@@ -2455,6 +2455,13 @@ Fragment FlowGraphBuilder::LoadField(const dart::Field& field) {
LoadFieldInstr* load = new (Z) LoadFieldInstr(
Pop(), &MayCloneField(Z, field),
AbstractType::ZoneHandle(Z, field.type()), TokenPosition::kNoSource);
+ if (field.guarded_cid() != kIllegalCid) {
Vyacheslav Egorov (Google) 2017/02/17 10:24:31 I wonder if we should make a factory function on L
kustermann 2017/02/17 10:58:04 We have a number of places with this code, so I'll
+ ASSERT(FLAG_use_field_guards);
+ if (!field.is_nullable() || (field.guarded_cid() == kNullCid)) {
+ load->set_result_cid(field.guarded_cid());
+ }
+ parsed_function_->AddToGuardedFields(&field);
+ }
Push(load);
return Fragment(load);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698