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

Side by Side Diff: pkg/compiler/lib/src/constants/constructors.dart

Issue 1192103002: Support serialization of the compiler backbone. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Handle (bypass) external const constructors. Created 5 years, 5 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/compiler.dart ('k') | pkg/compiler/lib/src/constants/expressions.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.constants.constructors; 5 library dart2js.constants.constructors;
6 6
7 import '../dart2jslib.dart'; 7 import '../dart2jslib.dart';
8 import '../dart_types.dart'; 8 import '../dart_types.dart';
9 import '../elements/elements.dart'; 9 import '../elements/elements.dart';
10 import '../resolution/resolution.dart'; 10 import '../resolution/resolution.dart';
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 arguments)); 128 arguments));
129 } 129 }
130 130
131 @override 131 @override
132 visitFactoryConstructorDeclaration( 132 visitFactoryConstructorDeclaration(
133 FunctionExpression node, 133 FunctionExpression node,
134 ConstructorElement constructor, 134 ConstructorElement constructor,
135 NodeList parameters, 135 NodeList parameters,
136 Node body, _) { 136 Node body, _) {
137 // TODO(johnniwinther): Handle constant constructors with errors. 137 // TODO(johnniwinther): Handle constant constructors with errors.
138 internalError(node, "Factory constructor cannot be constant."); 138 internalError(node, "Factory constructor cannot be constant: $node.");
139 } 139 }
140 140
141 applyParameters(NodeList parameters, _) { 141 applyParameters(NodeList parameters, _) {
142 computeParameterStructures(parameters).forEach((s) => s.dispatch(this, _)); 142 computeParameterStructures(parameters).forEach((s) => s.dispatch(this, _));
143 } 143 }
144 144
145 visitParameterDeclaration( 145 visitParameterDeclaration(
146 VariableDefinitions node, 146 VariableDefinitions node,
147 Node definition, 147 Node definition,
148 ParameterElement parameter, 148 ParameterElement parameter,
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 } 368 }
369 return new IdenticalConstantExpression( 369 return new IdenticalConstantExpression(
370 apply(arguments.nodes.head), apply(arguments.nodes.tail.head)); 370 apply(arguments.nodes.head), apply(arguments.nodes.tail.head));
371 } 371 }
372 372
373 @override 373 @override
374 ConstantExpression visitNamedArgument(NamedArgument node) { 374 ConstantExpression visitNamedArgument(NamedArgument node) {
375 return apply(node.expression); 375 return apply(node.expression);
376 } 376 }
377 } 377 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/constants/expressions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698