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

Unified Diff: runtime/vm/parser.cc

Issue 1958913003: VM precompiler: Allow optimizing static initializers. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index f0fda88ecb9e24b517f8d808c4d8c08e75b57bbd..ab5d7572a225c1bcef831d89882e9c74780f82d0 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -1256,12 +1256,11 @@ ParsedFunction* Parser::ParseStaticFieldInitializer(const Field& field) {
field.token_pos()));
initializer.set_result_type(AbstractType::Handle(zone, field.type()));
// Static initializer functions are hidden from the user.
- // Since they are only executed once, we avoid optimizing
- // and inlining them. After the field is initialized, the
- // compiler can eliminate the call to the static initializer.
+ // Since they are only executed once, we avoid inlining them.
+ // After the field is initialized, the compiler can eliminate
+ // the call to the static initializer.
initializer.set_is_reflectable(false);
initializer.set_is_debuggable(false);
- initializer.SetIsOptimizable(false);
initializer.set_is_inlinable(false);
ParsedFunction* parsed_function = new ParsedFunction(thread, initializer);
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698