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

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

Issue 2616653003: Use elements/types.dart in codegen.dart (Closed)
Patch Set: dartfmt Created 3 years, 11 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/ssa/codegen.dart ('k') | pkg/compiler/lib/src/universe/use.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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 astAdapter.getNativeBehaviorForJsEmbeddedGlobalCall(node)); 324 astAdapter.getNativeBehaviorForJsEmbeddedGlobalCall(node));
325 break; 325 break;
326 case ForeignKind.JS_INTERCEPTOR_CONSTANT: 326 case ForeignKind.JS_INTERCEPTOR_CONSTANT:
327 if (node.arguments.positional.length != 1 || 327 if (node.arguments.positional.length != 1 ||
328 node.arguments.named.isNotEmpty) { 328 node.arguments.named.isNotEmpty) {
329 astAdapter.reporter.reportErrorMessage(CURRENT_ELEMENT_SPANNABLE, 329 astAdapter.reporter.reportErrorMessage(CURRENT_ELEMENT_SPANNABLE,
330 MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT); 330 MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT);
331 } 331 }
332 ir.Node argument = node.arguments.positional.first; 332 ir.Node argument = node.arguments.positional.first;
333 if (argument is ir.TypeLiteral && argument.type is ir.InterfaceType) { 333 if (argument is ir.TypeLiteral && argument.type is ir.InterfaceType) {
334 impactBuilder.registerTypeUse( 334 InterfaceType type = astAdapter.getDartType(argument.type);
335 new TypeUse.instantiation(astAdapter.getDartType(argument.type))); 335 impactBuilder.registerTypeUse(new TypeUse.instantiation(type));
336 } 336 }
337 break; 337 break;
338 case ForeignKind.NONE: 338 case ForeignKind.NONE:
339 break; 339 break;
340 } 340 }
341 } 341 }
342 342
343 @override 343 @override
344 void visitStaticGet(ir.StaticGet node) { 344 void visitStaticGet(ir.StaticGet node) {
345 ir.Member target = node.target; 345 ir.Member target = node.target;
(...skipping 221 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/codegen.dart ('k') | pkg/compiler/lib/src/universe/use.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698