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

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

Issue 1091443003: Move constant systems into their own libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix try/poi/forget_element_test Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer2dart/lib/src/dart_backend.dart ('k') | pkg/compiler/lib/src/constant_system.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 part of dart2js; 5 library dart2js.compile_time_constant_evaluator;
6
7 import 'constant_system_dart.dart';
8 import 'constants/constant_system.dart';
9 import 'constants/expressions.dart';
10 import 'constants/values.dart';
11 import 'dart_types.dart';
12 import 'dart2jslib.dart' show Compiler, CompilerTask, MessageKind, invariant;
13 import 'elements/elements.dart';
14 import 'elements/modelx.dart' show FunctionElementX;
15 import 'resolution/resolution.dart';
16 import 'tree/tree.dart';
17 import 'util/util.dart' show Link;
18 import 'universe/universe.dart' show CallStructure;
6 19
7 /// A [ConstantEnvironment] provides access for constants compiled for variable 20 /// A [ConstantEnvironment] provides access for constants compiled for variable
8 /// initializers. 21 /// initializers.
9 abstract class ConstantEnvironment { 22 abstract class ConstantEnvironment {
10 /// Returns the constant for the initializer of [element]. 23 /// Returns the constant for the initializer of [element].
11 ConstantExpression getConstantForVariable(VariableElement element); 24 ConstantExpression getConstantForVariable(VariableElement element);
12 } 25 }
13 26
14 /// A class that can compile and provide constants for variables, nodes and 27 /// A class that can compile and provide constants for variables, nodes and
15 /// metadata. 28 /// metadata.
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 ConstantValue get value => expression.value; 1132 ConstantValue get value => expression.value;
1120 1133
1121 String toString() => expression.toString(); 1134 String toString() => expression.toString();
1122 } 1135 }
1123 1136
1124 /// A synthetic constant used to recover from errors. 1137 /// A synthetic constant used to recover from errors.
1125 class ErroneousAstConstant extends AstConstant { 1138 class ErroneousAstConstant extends AstConstant {
1126 ErroneousAstConstant(Element element, Node node) 1139 ErroneousAstConstant(Element element, Node node)
1127 : super(element, node, new ErroneousConstantExpression()); 1140 : super(element, node, new ErroneousConstantExpression());
1128 } 1141 }
OLDNEW
« no previous file with comments | « pkg/analyzer2dart/lib/src/dart_backend.dart ('k') | pkg/compiler/lib/src/constant_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698