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

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

Issue 2884273002: Support mixins when loading from .dill (Closed)
Patch Set: Fix comment Created 3 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 unified diff | Download patch
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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 "Unexpected constant value in const Symbol(...) call: " 295 "Unexpected constant value in const Symbol(...) call: "
296 "${value.toStructuredText()}"); 296 "${value.toStructuredText()}");
297 } 297 }
298 StringConstantValue stringValue = value; 298 StringConstantValue stringValue = value;
299 impactBuilder.registerConstSymbolName(stringValue.primitiveValue); 299 impactBuilder.registerConstSymbolName(stringValue.primitiveValue);
300 } 300 }
301 } 301 }
302 302
303 @override 303 @override
304 void visitSuperInitializer(ir.SuperInitializer node) { 304 void visitSuperInitializer(ir.SuperInitializer node) {
305 ConstructorEntity target = elementAdapter.getConstructor(node.target); 305 ConstructorEntity target =
306 elementAdapter.getSuperConstructor(node.parent, node.target);
Siggi Cherem (dart-lang) 2017/05/17 16:50:32 is node.target here the one that was read from the
Johnni Winther 2017/05/18 08:57:03 Adding a TODO. I have so far been reluctant to put
306 _visitArguments(node.arguments); 307 _visitArguments(node.arguments);
307 impactBuilder.registerStaticUse(new StaticUse.superConstructorInvoke( 308 impactBuilder.registerStaticUse(new StaticUse.superConstructorInvoke(
308 target, elementAdapter.getCallStructure(node.arguments))); 309 target, elementAdapter.getCallStructure(node.arguments)));
309 } 310 }
310 311
311 @override 312 @override
312 void visitStaticInvocation(ir.StaticInvocation node) { 313 void visitStaticInvocation(ir.StaticInvocation node) {
313 if (node.target.kind == ir.ProcedureKind.Factory) { 314 if (node.target.kind == ir.ProcedureKind.Factory) {
314 // TODO(johnniwinther): We should not mark the type as instantiated but 315 // TODO(johnniwinther): We should not mark the type as instantiated but
315 // rather follow the type arguments directly. 316 // rather follow the type arguments directly.
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 ConstructorEntity target = elementAdapter.getConstructor(node.target); 598 ConstructorEntity target = elementAdapter.getConstructor(node.target);
598 impactBuilder.registerStaticUse(new StaticUse.superConstructorInvoke( 599 impactBuilder.registerStaticUse(new StaticUse.superConstructorInvoke(
599 target, elementAdapter.getCallStructure(node.arguments))); 600 target, elementAdapter.getCallStructure(node.arguments)));
600 } 601 }
601 602
602 // TODO(johnniwinther): Make this throw and visit child nodes explicitly 603 // TODO(johnniwinther): Make this throw and visit child nodes explicitly
603 // instead to ensure that we don't visit unwanted parts of the ir. 604 // instead to ensure that we don't visit unwanted parts of the ir.
604 @override 605 @override
605 void defaultNode(ir.Node node) => node.visitChildren(this); 606 void defaultNode(ir.Node node) => node.visitChildren(this);
606 } 607 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698