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

Side by Side Diff: pkg/compiler/lib/src/compile_time_constants.dart

Issue 1385183002: Revert "Avoid eager enqueueing from resolution" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/compiler.dart » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library dart2js.compile_time_constant_evaluator; 5 library dart2js.compile_time_constant_evaluator;
6 6
7 import 'common/resolution.dart' show 7 import 'common/resolution.dart' show
8 Resolution; 8 Resolution;
9 import 'common/tasks.dart' show 9 import 'common/tasks.dart' show
10 CompilerTask; 10 CompilerTask;
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 String toString() => expression.toString(); 1258 String toString() => expression.toString();
1259 } 1259 }
1260 1260
1261 /// A synthetic constant used to recover from errors. 1261 /// A synthetic constant used to recover from errors.
1262 class ErroneousAstConstant extends AstConstant { 1262 class ErroneousAstConstant extends AstConstant {
1263 ErroneousAstConstant(Element element, Node node) : super(element, node, 1263 ErroneousAstConstant(Element element, Node node) : super(element, node,
1264 // TODO(johnniwinther): Return a [NonConstantValue] instead. 1264 // TODO(johnniwinther): Return a [NonConstantValue] instead.
1265 new ErroneousConstantExpression(), new NullConstantValue()); 1265 new ErroneousConstantExpression(), new NullConstantValue());
1266 } 1266 }
1267 1267
1268 // TODO(johnniwinther): Clean this up. 1268 // TODO(johnniwinther): Avoid the need for this hack.
1269 TreeElements _analyzeElementEagerly(Compiler compiler, AstElement element) { 1269 TreeElements _analyzeElementEagerly(Compiler compiler, AstElement element) {
1270 compiler.resolution.analyzeElement(element.declaration); 1270 WorldImpact worldImpact = compiler.analyzeElement(element.declaration);
1271 compiler.enqueuer.resolution.applyImpact(element.declaration, worldImpact);
1271 return element.resolvedAst.elements; 1272 return element.resolvedAst.elements;
1272 } 1273 }
1273 1274
1274 class _CompilerEnvironment implements Environment { 1275 class _CompilerEnvironment implements Environment {
1275 final Compiler compiler; 1276 final Compiler compiler;
1276 1277
1277 _CompilerEnvironment(this.compiler); 1278 _CompilerEnvironment(this.compiler);
1278 1279
1279 @override 1280 @override
1280 String readFromEnvironment(String name) { 1281 String readFromEnvironment(String name) {
1281 return compiler.fromEnvironment(name); 1282 return compiler.fromEnvironment(name);
1282 } 1283 }
1283 } 1284 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698