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

Side by Side Diff: pkg/compiler/lib/src/kernel/element_map_mixins.dart

Issue 3009633002: Add tests for list and async marker (Closed)
Patch Set: Created 3 years, 3 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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:js_runtime/shared/embedded_names.dart'; 5 import 'package:js_runtime/shared/embedded_names.dart';
6 import 'package:kernel/ast.dart' as ir; 6 import 'package:kernel/ast.dart' as ir;
7 7
8 import '../common.dart'; 8 import '../common.dart';
9 import '../common/names.dart'; 9 import '../common/names.dart';
10 import '../constants/constructors.dart'; 10 import '../constants/constructors.dart';
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 if (expressions == null) return null; 508 if (expressions == null) return null;
509 return new ConstructedConstantExpression( 509 return new ConstructedConstantExpression(
510 elementMap.createInterfaceType(target.enclosingClass, arguments.types), 510 elementMap.createInterfaceType(target.enclosingClass, arguments.types),
511 elementMap.getConstructor(target), 511 elementMap.getConstructor(target),
512 elementMap.getCallStructure(arguments), 512 elementMap.getCallStructure(arguments),
513 expressions); 513 expressions);
514 } 514 }
515 515
516 @override 516 @override
517 ConstantExpression visitConstructorInvocation(ir.ConstructorInvocation node) { 517 ConstantExpression visitConstructorInvocation(ir.ConstructorInvocation node) {
518 if (!node.isConst) return null;
518 return _computeConstructorInvocation(node.target, node.arguments); 519 return _computeConstructorInvocation(node.target, node.arguments);
519 } 520 }
520 521
521 @override 522 @override
522 ConstantExpression visitVariableGet(ir.VariableGet node) { 523 ConstantExpression visitVariableGet(ir.VariableGet node) {
523 if (node.variable.parent is ir.FunctionNode) { 524 if (node.variable.parent is ir.FunctionNode) {
524 ir.FunctionNode function = node.variable.parent; 525 ir.FunctionNode function = node.variable.parent;
525 int index = function.positionalParameters.indexOf(node.variable); 526 int index = function.positionalParameters.indexOf(node.variable);
526 if (index != -1) { 527 if (index != -1) {
527 return new PositionalArgumentReference(index); 528 return new PositionalArgumentReference(index);
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 } 861 }
861 if (isRedirecting) { 862 if (isRedirecting) {
862 return new RedirectingGenerativeConstantConstructor( 863 return new RedirectingGenerativeConstantConstructor(
863 defaultValues, superConstructorInvocation); 864 defaultValues, superConstructorInvocation);
864 } else { 865 } else {
865 return new GenerativeConstantConstructor( 866 return new GenerativeConstantConstructor(
866 type, defaultValues, fieldMap, superConstructorInvocation); 867 type, defaultValues, fieldMap, superConstructorInvocation);
867 } 868 }
868 } 869 }
869 } 870 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/kernel_inferrer_engine.dart ('k') | tests/compiler/dart2js/inference/data/async_marker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698