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

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

Issue 1394923003: Use WorldImpact for element dependencies in deferred_load (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
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.dart'; 7 import 'common.dart';
8 import 'common/resolution.dart' show 8 import 'common/resolution.dart' show
9 Resolution; 9 Resolution;
10 import 'common/tasks.dart' show 10 import 'common/tasks.dart' show
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 1253
1254 /// A synthetic constant used to recover from errors. 1254 /// A synthetic constant used to recover from errors.
1255 class ErroneousAstConstant extends AstConstant { 1255 class ErroneousAstConstant extends AstConstant {
1256 ErroneousAstConstant(Element element, Node node) : super(element, node, 1256 ErroneousAstConstant(Element element, Node node) : super(element, node,
1257 // TODO(johnniwinther): Return a [NonConstantValue] instead. 1257 // TODO(johnniwinther): Return a [NonConstantValue] instead.
1258 new ErroneousConstantExpression(), new NullConstantValue()); 1258 new ErroneousConstantExpression(), new NullConstantValue());
1259 } 1259 }
1260 1260
1261 // TODO(johnniwinther): Clean this up. 1261 // TODO(johnniwinther): Clean this up.
1262 TreeElements _analyzeElementEagerly(Compiler compiler, AstElement element) { 1262 TreeElements _analyzeElementEagerly(Compiler compiler, AstElement element) {
1263 compiler.resolution.analyzeElement(element.declaration); 1263 compiler.resolution.computeWorldImpact(element.declaration);
1264 return element.resolvedAst.elements; 1264 return element.resolvedAst.elements;
1265 } 1265 }
1266 1266
1267 class _CompilerEnvironment implements Environment { 1267 class _CompilerEnvironment implements Environment {
1268 final Compiler compiler; 1268 final Compiler compiler;
1269 1269
1270 _CompilerEnvironment(this.compiler); 1270 _CompilerEnvironment(this.compiler);
1271 1271
1272 @override 1272 @override
1273 String readFromEnvironment(String name) { 1273 String readFromEnvironment(String name) {
1274 return compiler.fromEnvironment(name); 1274 return compiler.fromEnvironment(name);
1275 } 1275 }
1276 } 1276 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698