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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart

Issue 1510193003: dart2js: Process arguments to direct invocations as if the target is known. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 | « no previous file | tests/co19/co19-dart2js.status » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library dart2js.ir_builder_task; 5 library dart2js.ir_builder_task;
6 6
7 import '../closure.dart' as closurelib; 7 import '../closure.dart' as closurelib;
8 import '../closure.dart' hide ClosureScope; 8 import '../closure.dart' hide ClosureScope;
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/names.dart' show 10 import '../common/names.dart' show
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 elements.getTypeMask(node), 986 elements.getTypeMask(node),
987 arguments, 987 arguments,
988 sourceInformation: 988 sourceInformation:
989 sourceInformationBuilder.buildCall(receiver, node.selector)); 989 sourceInformationBuilder.buildCall(receiver, node.selector));
990 } 990 }
991 991
992 ir.Primitive translateSuperBinary(FunctionElement function, 992 ir.Primitive translateSuperBinary(FunctionElement function,
993 op.BinaryOperator operator, 993 op.BinaryOperator operator,
994 ast.Node argument) { 994 ast.Node argument) {
995 List<ir.Primitive> arguments = <ir.Primitive>[visit(argument)]; 995 List<ir.Primitive> arguments = <ir.Primitive>[visit(argument)];
996 CallStructure callStructure = 996 return irBuilder.buildSuperMethodInvocation(function,
997 normalizeDynamicArguments(CallStructure.ONE_ARG, arguments); 997 CallStructure.ONE_ARG, arguments);
998 return irBuilder.buildSuperMethodInvocation(
999 function, callStructure, arguments);
1000 } 998 }
1001 999
1002 @override 1000 @override
1003 ir.Primitive visitSuperBinary( 1001 ir.Primitive visitSuperBinary(
1004 ast.Send node, 1002 ast.Send node,
1005 FunctionElement function, 1003 FunctionElement function,
1006 op.BinaryOperator operator, 1004 op.BinaryOperator operator,
1007 ast.Node argument, 1005 ast.Node argument,
1008 _) { 1006 _) {
1009 return translateSuperBinary(function, operator, argument); 1007 return translateSuperBinary(function, operator, argument);
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 } 1309 }
1312 1310
1313 @override 1311 @override
1314 ir.Primitive visitSuperMethodInvoke( 1312 ir.Primitive visitSuperMethodInvoke(
1315 ast.Send node, 1313 ast.Send node,
1316 MethodElement method, 1314 MethodElement method,
1317 ast.NodeList argumentsNode, 1315 ast.NodeList argumentsNode,
1318 CallStructure callStructure, 1316 CallStructure callStructure,
1319 _) { 1317 _) {
1320 List<ir.Primitive> arguments = <ir.Primitive>[]; 1318 List<ir.Primitive> arguments = <ir.Primitive>[];
1321 callStructure = 1319 callStructure = translateStaticArguments(argumentsNode, method,
1322 translateDynamicArguments(argumentsNode, callStructure, arguments); 1320 callStructure, arguments);
1323 return irBuilder.buildSuperMethodInvocation( 1321 return irBuilder.buildSuperMethodInvocation(
1324 method, 1322 method,
1325 callStructure, 1323 callStructure,
1326 arguments, 1324 arguments,
1327 sourceInformation: 1325 sourceInformation:
1328 sourceInformationBuilder.buildCall(node, node.selector)); 1326 sourceInformationBuilder.buildCall(node, node.selector));
1329 } 1327 }
1330 1328
1331 @override 1329 @override
1332 ir.Primitive visitSuperMethodIncompatibleInvoke( 1330 ir.Primitive visitSuperMethodIncompatibleInvoke(
(...skipping 2337 matching lines...) Expand 10 before | Expand all | Expand 10 after
3670 callStructure = translateStaticArguments(argumentsNode, function, 3668 callStructure = translateStaticArguments(argumentsNode, function,
3671 callStructure, arguments); 3669 callStructure, arguments);
3672 return irBuilder.buildStaticFunctionInvocation(function, 3670 return irBuilder.buildStaticFunctionInvocation(function,
3673 callStructure, 3671 callStructure,
3674 arguments, 3672 arguments,
3675 sourceInformation: 3673 sourceInformation:
3676 sourceInformationBuilder.buildCall(node, node.selector)); 3674 sourceInformationBuilder.buildCall(node, node.selector));
3677 } 3675 }
3678 } 3676 }
3679 } 3677 }
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698