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

Side by Side Diff: pkg/compiler/lib/src/ssa/kernel_impact.dart

Issue 2595493002: Merge CoreTypes and CoreClasses into CommonElements. (Closed)
Patch Set: Updated cf. comment Created 4 years 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/ssa/kernel_ast_adapter.dart ('k') | pkg/compiler/lib/src/ssa/types.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/names.dart'; 8 import '../common/names.dart';
9 import '../compiler.dart'; 9 import '../compiler.dart';
10 import '../constants/expressions.dart'; 10 import '../constants/expressions.dart';
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 void visitNullLiteral(ir.NullLiteral literal) { 215 void visitNullLiteral(ir.NullLiteral literal) {
216 impactBuilder.registerConstantLiteral(new NullConstantExpression()); 216 impactBuilder.registerConstantLiteral(new NullConstantExpression());
217 } 217 }
218 218
219 @override 219 @override
220 void visitListLiteral(ir.ListLiteral literal) { 220 void visitListLiteral(ir.ListLiteral literal) {
221 visitNodes(literal.expressions); 221 visitNodes(literal.expressions);
222 DartType elementType = checkType(literal.typeArgument); 222 DartType elementType = checkType(literal.typeArgument);
223 223
224 impactBuilder.registerListLiteral(new ListLiteralUse( 224 impactBuilder.registerListLiteral(new ListLiteralUse(
225 compiler.coreTypes.listType(elementType), 225 compiler.commonElements.listType(elementType),
226 isConstant: literal.isConst, 226 isConstant: literal.isConst,
227 isEmpty: literal.expressions.isEmpty)); 227 isEmpty: literal.expressions.isEmpty));
228 } 228 }
229 229
230 @override 230 @override
231 void visitMapLiteral(ir.MapLiteral literal) { 231 void visitMapLiteral(ir.MapLiteral literal) {
232 visitNodes(literal.entries); 232 visitNodes(literal.entries);
233 DartType keyType = checkType(literal.keyType); 233 DartType keyType = checkType(literal.keyType);
234 DartType valueType = checkType(literal.valueType); 234 DartType valueType = checkType(literal.valueType);
235 impactBuilder.registerMapLiteral(new MapLiteralUse( 235 impactBuilder.registerMapLiteral(new MapLiteralUse(
236 compiler.coreTypes.mapType(keyType, valueType), 236 compiler.commonElements.mapType(keyType, valueType),
237 isConstant: literal.isConst, 237 isConstant: literal.isConst,
238 isEmpty: literal.entries.isEmpty)); 238 isEmpty: literal.entries.isEmpty));
239 } 239 }
240 240
241 void visitMapEntry(ir.MapEntry entry) { 241 void visitMapEntry(ir.MapEntry entry) {
242 visitNode(entry.key); 242 visitNode(entry.key);
243 visitNode(entry.value); 243 visitNode(entry.value);
244 } 244 }
245 245
246 void _visitArguments(ir.Arguments arguments) { 246 void _visitArguments(ir.Arguments arguments) {
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 Element target = astAdapter.getElement(node.target).declaration; 567 Element target = astAdapter.getElement(node.target).declaration;
568 impactBuilder.registerStaticUse(new StaticUse.superConstructorInvoke( 568 impactBuilder.registerStaticUse(new StaticUse.superConstructorInvoke(
569 target, astAdapter.getCallStructure(node.arguments))); 569 target, astAdapter.getCallStructure(node.arguments)));
570 } 570 }
571 571
572 // TODO(johnniwinther): Make this throw and visit child nodes explicitly 572 // TODO(johnniwinther): Make this throw and visit child nodes explicitly
573 // instead to ensure that we don't visit unwanted parts of the ir. 573 // instead to ensure that we don't visit unwanted parts of the ir.
574 @override 574 @override
575 void defaultNode(ir.Node node) => node.visitChildren(this); 575 void defaultNode(ir.Node node) => node.visitChildren(this);
576 } 576 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | pkg/compiler/lib/src/ssa/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698