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

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

Issue 2468273003: Fix kernel/visitor_test (Closed)
Patch Set: Fix impact_test after changes. Created 4 years, 1 month 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.resolution; 5 library dart2js.resolution;
6 6
7 import 'dart:collection' show Queue; 7 import 'dart:collection' show Queue;
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/names.dart' show Identifiers; 10 import '../common/names.dart' show Identifiers;
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 418
419 if (Elements.isStaticOrTopLevelField(element)) { 419 if (Elements.isStaticOrTopLevelField(element)) {
420 visitor.addDeferredAction(element, () { 420 visitor.addDeferredAction(element, () {
421 if (element.modifiers.isConst) { 421 if (element.modifiers.isConst) {
422 element.constant = constantCompiler.compileConstant(element); 422 element.constant = constantCompiler.compileConstant(element);
423 } else { 423 } else {
424 element.constant = constantCompiler.compileVariable(element); 424 element.constant = constantCompiler.compileVariable(element);
425 } 425 }
426 }); 426 });
427 if (initializer != null) { 427 if (initializer != null) {
428 if (!element.modifiers.isConst) { 428 if (!element.modifiers.isConst &&
429 initializer.asLiteralNull() == null) {
429 // TODO(johnniwinther): Determine the const-ness eagerly to avoid 430 // TODO(johnniwinther): Determine the const-ness eagerly to avoid
430 // unnecessary registrations. 431 // unnecessary registrations.
431 registry.registerFeature(Feature.LAZY_FIELD); 432 registry.registerFeature(Feature.LAZY_FIELD);
432 } 433 }
433 } 434 }
434 } 435 }
435 436
436 // Perform various checks as side effect of "computing" the type. 437 // Perform various checks as side effect of "computing" the type.
437 element.computeType(resolution); 438 element.computeType(resolution);
438 439
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 TreeElements get treeElements { 1138 TreeElements get treeElements {
1138 assert(invariant(this, _treeElements != null, 1139 assert(invariant(this, _treeElements != null,
1139 message: "TreeElements have not been computed for $this.")); 1140 message: "TreeElements have not been computed for $this."));
1140 return _treeElements; 1141 return _treeElements;
1141 } 1142 }
1142 1143
1143 void reuseElement() { 1144 void reuseElement() {
1144 _treeElements = null; 1145 _treeElements = null;
1145 } 1146 }
1146 } 1147 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/constructors.dart ('k') | pkg/compiler/lib/src/ssa/kernel_impact.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698