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

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

Issue 2944843002: All strong mode cleaning of dart2js. (Closed)
Patch Set: More issues discovered during testing. Created 3 years, 6 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/closure.dart ('k') | pkg/compiler/lib/src/constants/constructors.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 // TODO(johnniwinther): Remove this library when all constant constructors are 5 // TODO(johnniwinther): Remove this library when all constant constructors are
6 // computed during resolution. 6 // computed during resolution.
7 library dart2js.constants.constant_constructors; 7 library dart2js.constants.constant_constructors;
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 visitNode(Node node) { 66 visitNode(Node node) {
67 internalError(node, 'Unhandled node $node: ${node.toDebugString()}'); 67 internalError(node, 'Unhandled node $node: ${node.toDebugString()}');
68 } 68 }
69 69
70 @override 70 @override
71 bulkHandleNode(Node node, String template, _) { 71 bulkHandleNode(Node node, String template, _) {
72 internalError(node, template.replaceFirst('#', '$node')); 72 internalError(node, template.replaceFirst('#', '$node'));
73 } 73 }
74 74
75 internalError(Node node, String message) { 75 internalError(Spannable node, String message) {
76 throw new UnsupportedError(message); 76 throw new UnsupportedError(message);
77 } 77 }
78 78
79 ConstantConstructor visitGenerativeConstructorDeclaration( 79 ConstantConstructor visitGenerativeConstructorDeclaration(
80 FunctionExpression node, 80 FunctionExpression node,
81 ConstructorElement constructor, 81 ConstructorElement constructor,
82 NodeList parameters, 82 NodeList parameters,
83 NodeList initializers, 83 NodeList initializers,
84 Node body, 84 Node body,
85 _) { 85 _) {
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 ConstantExpression visitNamedArgument(NamedArgument node) { 356 ConstantExpression visitNamedArgument(NamedArgument node) {
357 return apply(node.expression); 357 return apply(node.expression);
358 } 358 }
359 359
360 @override 360 @override
361 ConstantExpression visitIfNull(Send node, Node left, Node right, _) { 361 ConstantExpression visitIfNull(Send node, Node left, Node right, _) {
362 return new BinaryConstantExpression( 362 return new BinaryConstantExpression(
363 apply(left), BinaryOperator.IF_NULL, apply(right)); 363 apply(left), BinaryOperator.IF_NULL, apply(right));
364 } 364 }
365 } 365 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/constants/constructors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698