| OLD | NEW |
| 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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 | 649 |
| 650 ir.Primitive _buildInvokeDynamic(ir.Primitive receiver, | 650 ir.Primitive _buildInvokeDynamic(ir.Primitive receiver, |
| 651 Selector selector, | 651 Selector selector, |
| 652 List<ir.Primitive> arguments) { | 652 List<ir.Primitive> arguments) { |
| 653 assert(isOpen); | 653 assert(isOpen); |
| 654 return _continueWithExpression( | 654 return _continueWithExpression( |
| 655 (k) => new ir.InvokeMethod(receiver, selector, k, arguments)); | 655 (k) => new ir.InvokeMethod(receiver, selector, k, arguments)); |
| 656 } | 656 } |
| 657 | 657 |
| 658 ir.Primitive _buildInvokeCall(ir.Primitive target, | 658 ir.Primitive _buildInvokeCall(ir.Primitive target, |
| 659 Selector selector, | 659 Selector selector, |
| 660 List<ir.Definition> arguments) { | 660 List<ir.Definition> arguments) { |
| 661 Selector callSelector = new Selector.callClosure( | 661 Selector callSelector = new Selector.callClosureFrom(selector); |
| 662 selector.argumentCount, | |
| 663 selector.namedArguments); | |
| 664 return _buildInvokeDynamic(target, callSelector, arguments); | 662 return _buildInvokeDynamic(target, callSelector, arguments); |
| 665 } | 663 } |
| 666 | 664 |
| 667 | 665 |
| 668 /// Create a constant literal from [constant]. | 666 /// Create a constant literal from [constant]. |
| 669 ir.Constant buildConstantLiteral(ConstantExpression constant) { | 667 ir.Constant buildConstantLiteral(ConstantExpression constant) { |
| 670 assert(isOpen); | 668 assert(isOpen); |
| 671 return addPrimitive(new ir.Constant(constant)); | 669 return addPrimitive(new ir.Constant(constant)); |
| 672 } | 670 } |
| 673 | 671 |
| (...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2538 } | 2536 } |
| 2539 | 2537 |
| 2540 /// Synthetic parameter to a JavaScript factory method that takes the type | 2538 /// Synthetic parameter to a JavaScript factory method that takes the type |
| 2541 /// argument given for the type variable [variable]. | 2539 /// argument given for the type variable [variable]. |
| 2542 class TypeInformationParameter implements Local { | 2540 class TypeInformationParameter implements Local { |
| 2543 final TypeVariableElement variable; | 2541 final TypeVariableElement variable; |
| 2544 final ExecutableElement executableContext; | 2542 final ExecutableElement executableContext; |
| 2545 TypeInformationParameter(this.variable, this.executableContext); | 2543 TypeInformationParameter(this.variable, this.executableContext); |
| 2546 String get name => variable.name; | 2544 String get name => variable.name; |
| 2547 } | 2545 } |
| OLD | NEW |