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

Side by Side Diff: pkg/analyzer2dart/lib/src/cps_generator.dart

Issue 879483005: Revert "dart2js cps: Handle optional parameters in builder." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compile_time_constants.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analyzer2dart.cps_generator; 5 library analyzer2dart.cps_generator;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 8
9 import 'package:compiler/src/dart_types.dart' as dart2js; 9 import 'package:compiler/src/dart_types.dart' as dart2js;
10 import 'package:compiler/src/elements/elements.dart' as dart2js; 10 import 'package:compiler/src/elements/elements.dart' as dart2js;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 @override 211 @override
212 ir.Node visitLocalFunctionAccess(AstNode node, AccessSemantics semantics) { 212 ir.Node visitLocalFunctionAccess(AstNode node, AccessSemantics semantics) {
213 return handleLocalAccess(node, semantics); 213 return handleLocalAccess(node, semantics);
214 } 214 }
215 215
216 ir.Primitive handleLocalInvocation(MethodInvocation node, 216 ir.Primitive handleLocalInvocation(MethodInvocation node,
217 AccessSemantics semantics) { 217 AccessSemantics semantics) {
218 analyzer.Element staticElement = semantics.element; 218 analyzer.Element staticElement = semantics.element;
219 dart2js.Element element = converter.convertElement(staticElement); 219 dart2js.Element element = converter.convertElement(staticElement);
220 ir.Primitive receiver = irBuilder.buildLocalGet(element);
221 List<ir.Definition> arguments = visitArguments(node.argumentList); 220 List<ir.Definition> arguments = visitArguments(node.argumentList);
222 return irBuilder.buildFunctionExpressionInvocation( 221 return irBuilder.buildLocalInvocation(
223 receiver, 222 element,
224 createSelectorFromMethodInvocation( 223 createSelectorFromMethodInvocation(
225 node.argumentList, node.methodName.name), 224 node.argumentList, node.methodName.name),
226 arguments); 225 arguments);
227 } 226 }
228 227
229 @override 228 @override
230 ir.Node visitLocalVariableInvocation(MethodInvocation node, 229 ir.Node visitLocalVariableInvocation(MethodInvocation node,
231 AccessSemantics semantics) { 230 AccessSemantics semantics) {
232 return handleLocalInvocation(node, semantics); 231 return handleLocalInvocation(node, semantics);
233 } 232 }
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 return irBuilder.buildTypeOperator( 569 return irBuilder.buildTypeOperator(
571 visit(node.expression), 570 visit(node.expression),
572 converter.convertType(node.type.type), 571 converter.convertType(node.type.type),
573 isTypeTest: false); 572 isTypeTest: false);
574 } 573 }
575 } 574 }
576 575
577 class NullCapturedVariableInfo extends DartCapturedVariableInfo { 576 class NullCapturedVariableInfo extends DartCapturedVariableInfo {
578 Iterable get capturedVariables => const []; 577 Iterable get capturedVariables => const [];
579 } 578 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compile_time_constants.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698