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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 1693843002: VM: Correctly intrinsify implicit getters/setters when using field guards (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 34a6eec06d2cb94f5c953db25157e55609ee4048..2453fbe08eb8111894c1571b1f8c9bd43bb91b9b 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -1082,7 +1082,12 @@ void FlowGraphCompiler::FinalizeStaticCallTargetsTable(const Code& code) {
bool FlowGraphCompiler::TryIntrinsify() {
// Intrinsification skips arguments checks, therefore disable if in checked
// mode.
- if (FLAG_intrinsify && !isolate()->flags().type_checks()) {
+ // Only intrinsify getters/setters in precompiled code. Otherwise, unoptimized
+ // code cannot depend on guarded_cid since it may be regenerated lazily after
+ // code collection.
+ if (FLAG_precompilation &&
Vyacheslav Egorov (Google) 2016/02/12 14:20:42 FLAG_precompilation -> !FLAG_use_field_guards?
+ FLAG_intrinsify &&
+ !isolate()->flags().type_checks()) {
if (parsed_function().function().kind() == RawFunction::kImplicitGetter) {
// An implicit getter must have a specific AST structure.
const SequenceNode& sequence_node = *parsed_function().node_sequence();
« 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