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

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

Issue 1062913003: Extract CallStructure from Selector. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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
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; 5 library dart2js.ir_builder;
6 6
7 import '../constants/expressions.dart'; 7 import '../constants/expressions.dart';
8 import '../constants/values.dart' show PrimitiveConstantValue; 8 import '../constants/values.dart' show PrimitiveConstantValue;
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../dart2jslib.dart'; 10 import '../dart2jslib.dart';
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 494
495 ir.Primitive _buildInvokeDynamic(ir.Primitive receiver, 495 ir.Primitive _buildInvokeDynamic(ir.Primitive receiver,
496 Selector selector, 496 Selector selector,
497 List<ir.Primitive> arguments) { 497 List<ir.Primitive> arguments) {
498 assert(isOpen); 498 assert(isOpen);
499 return _continueWithExpression( 499 return _continueWithExpression(
500 (k) => new ir.InvokeMethod(receiver, selector, k, arguments)); 500 (k) => new ir.InvokeMethod(receiver, selector, k, arguments));
501 } 501 }
502 502
503 ir.Primitive _buildInvokeCall(ir.Primitive target, 503 ir.Primitive _buildInvokeCall(ir.Primitive target,
504 Selector selector, 504 Selector selector,
505 List<ir.Definition> arguments) { 505 List<ir.Definition> arguments) {
506 Selector callSelector = new Selector.callClosure( 506 Selector callSelector = new Selector.callClosureFrom(selector);
507 selector.argumentCount,
508 selector.namedArguments);
509 return _buildInvokeDynamic(target, callSelector, arguments); 507 return _buildInvokeDynamic(target, callSelector, arguments);
510 } 508 }
511 509
512 510
513 /// Create a constant literal from [constant]. 511 /// Create a constant literal from [constant].
514 ir.Constant buildConstantLiteral(ConstantExpression constant) { 512 ir.Constant buildConstantLiteral(ConstantExpression constant) {
515 assert(isOpen); 513 assert(isOpen);
516 return addPrimitive(new ir.Constant(constant)); 514 return addPrimitive(new ir.Constant(constant));
517 } 515 }
518 516
(...skipping 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after
2585 } 2583 }
2586 2584
2587 /// Synthetic parameter to a JavaScript factory method that takes the type 2585 /// Synthetic parameter to a JavaScript factory method that takes the type
2588 /// argument given for the type variable [variable]. 2586 /// argument given for the type variable [variable].
2589 class TypeInformationParameter implements Local { 2587 class TypeInformationParameter implements Local {
2590 final TypeVariableElement variable; 2588 final TypeVariableElement variable;
2591 final ExecutableElement executableContext; 2589 final ExecutableElement executableContext;
2592 TypeInformationParameter(this.variable, this.executableContext); 2590 TypeInformationParameter(this.variable, this.executableContext);
2593 String get name => variable.name; 2591 String get name => variable.name;
2594 } 2592 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698