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

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

Issue 2668233002: Remove code supporting incremental compilation in dart2js (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/common/tasks.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 Resolution; 7 import 'common/resolution.dart' show Resolution;
8 import 'common/tasks.dart' show CompilerTask, Measurer; 8 import 'common/tasks.dart' show CompilerTask, Measurer;
9 import 'common.dart'; 9 import 'common.dart';
10 import 'compiler.dart' show Compiler; 10 import 'compiler.dart' show Compiler;
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 346
347 ConstantExpression compileNode(Node node, TreeElements elements, 347 ConstantExpression compileNode(Node node, TreeElements elements,
348 {bool enforceConst: true}) { 348 {bool enforceConst: true}) {
349 return compileNodeWithDefinitions(node, elements, isConst: enforceConst); 349 return compileNodeWithDefinitions(node, elements, isConst: enforceConst);
350 } 350 }
351 351
352 ConstantExpression compileMetadata( 352 ConstantExpression compileMetadata(
353 MetadataAnnotation metadata, Node node, TreeElements elements) { 353 MetadataAnnotation metadata, Node node, TreeElements elements) {
354 return compileNodeWithDefinitions(node, elements); 354 return compileNodeWithDefinitions(node, elements);
355 } 355 }
356
357 void forgetElement(Element element) {
358 initialVariableValues.remove(element);
359 if (element is ScopeContainerElement) {
360 element.forEachLocalMember(initialVariableValues.remove);
361 }
362 if (element is FunctionElement && element.hasFunctionSignature) {
363 element.functionSignature.forEachParameter(this.forgetElement);
364 }
365 }
366 } 356 }
367 357
368 /// [ConstantCompiler] that uses the Dart semantics for the compile-time 358 /// [ConstantCompiler] that uses the Dart semantics for the compile-time
369 /// constant evaluation. 359 /// constant evaluation.
370 class DartConstantCompiler extends ConstantCompilerBase { 360 class DartConstantCompiler extends ConstantCompilerBase {
371 DartConstantCompiler(Compiler compiler) 361 DartConstantCompiler(Compiler compiler)
372 : super(compiler, const DartConstantSystem()); 362 : super(compiler, const DartConstantSystem());
373 363
374 ConstantExpression getConstantForNode(Node node, TreeElements definitions) { 364 ConstantExpression getConstantForNode(Node node, TreeElements definitions) {
375 return definitions.getConstant(node); 365 return definitions.getConstant(node);
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 class _CompilerEnvironment implements Environment { 1438 class _CompilerEnvironment implements Environment {
1449 final Compiler compiler; 1439 final Compiler compiler;
1450 1440
1451 _CompilerEnvironment(this.compiler); 1441 _CompilerEnvironment(this.compiler);
1452 1442
1453 @override 1443 @override
1454 String readFromEnvironment(String name) { 1444 String readFromEnvironment(String name) {
1455 return compiler.fromEnvironment(name); 1445 return compiler.fromEnvironment(name);
1456 } 1446 }
1457 } 1447 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/common/tasks.dart ('k') | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698