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

Unified Diff: pkg/compiler/lib/src/resolution/members.dart

Issue 1115183002: Add ConstantConstructor to ConstantExpression system. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/resolution/send_resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/members.dart
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
index 22b8461ef349a4ab6ab54b7bc295341d52c0495b..fec856976ef4397b8ad47bdea3db80989a27bf64 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -714,7 +714,7 @@ class ResolverTask extends CompilerTask {
if (Elements.isStaticOrTopLevelField(element)) {
visitor.addDeferredAction(element, () {
if (element.modifiers.isConst) {
- constantCompiler.compileConstant(element);
+ element.constant = constantCompiler.compileConstant(element);
} else {
constantCompiler.compileVariable(element);
}
@@ -2427,8 +2427,10 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
parameterNodes = parameterNodes.tail;
});
addDeferredAction(enclosingElement, () {
- functionParameters.forEachOptionalParameter((Element parameter) {
- compiler.resolver.constantCompiler.compileConstant(parameter);
+ functionParameters.forEachOptionalParameter(
+ (ParameterElementX parameter) {
+ parameter.constant =
+ compiler.resolver.constantCompiler.compileConstant(parameter);
});
});
if (inCheckContext) {
@@ -4869,14 +4871,15 @@ class VariableDefinitionsVisitor extends CommonResolverVisitor<Identifier> {
visitNodeList(NodeList node) {
for (Link<Node> link = node.nodes; !link.isEmpty; link = link.tail) {
Identifier name = visit(link.head);
- LocalVariableElement element = new LocalVariableElementX(
+ LocalVariableElementX element = new LocalVariableElementX(
name.source, resolver.enclosingElement,
variables, name.token);
resolver.defineLocalVariable(link.head, element);
resolver.addToScope(element);
if (definitions.modifiers.isConst) {
compiler.enqueuer.resolution.addDeferredAction(element, () {
- compiler.resolver.constantCompiler.compileConstant(element);
+ element.constant =
+ compiler.resolver.constantCompiler.compileConstant(element);
});
}
}
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/resolution/send_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698