| 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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 (k) => new ir.InvokeConstructor(type, element, selector, k, arguments)); | 724 (k) => new ir.InvokeConstructor(type, element, selector, k, arguments)); |
| 725 } | 725 } |
| 726 | 726 |
| 727 /// Create a string concatenation of the [arguments]. | 727 /// Create a string concatenation of the [arguments]. |
| 728 ir.Primitive buildStringConcatenation(List<ir.Primitive> arguments) { | 728 ir.Primitive buildStringConcatenation(List<ir.Primitive> arguments) { |
| 729 assert(isOpen); | 729 assert(isOpen); |
| 730 return _continueWithExpression( | 730 return _continueWithExpression( |
| 731 (k) => new ir.ConcatenateStrings(k, arguments)); | 731 (k) => new ir.ConcatenateStrings(k, arguments)); |
| 732 } | 732 } |
| 733 | 733 |
| 734 /// Create an invocation of [local] where the argument structure is defined | |
| 735 /// by [selector] and the argument values are defined by [arguments]. | |
| 736 ir.Primitive buildLocalInvocation(LocalElement local, | |
| 737 Selector selector, | |
| 738 List<ir.Definition> arguments) { | |
| 739 return _buildInvokeCall(buildLocalGet(local), selector, arguments); | |
| 740 } | |
| 741 | |
| 742 /// Create an invocation of the [functionExpression] where the argument | 734 /// Create an invocation of the [functionExpression] where the argument |
| 743 /// structure are defined by [selector] and the argument values are defined by | 735 /// structure are defined by [selector] and the argument values are defined by |
| 744 /// [arguments]. | 736 /// [arguments]. |
| 745 ir.Primitive buildFunctionExpressionInvocation( | 737 ir.Primitive buildFunctionExpressionInvocation( |
| 746 ir.Primitive functionExpression, | 738 ir.Primitive functionExpression, |
| 747 Selector selector, | 739 Selector selector, |
| 748 List<ir.Definition> arguments) { | 740 List<ir.Definition> arguments) { |
| 749 return _buildInvokeCall(functionExpression, selector, arguments); | 741 return _buildInvokeCall(functionExpression, selector, arguments); |
| 750 } | 742 } |
| 751 | 743 |
| (...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2016 ClosureEnvironment(this.selfReference, this.thisLocal, this.freeVariables); | 2008 ClosureEnvironment(this.selfReference, this.thisLocal, this.freeVariables); |
| 2017 } | 2009 } |
| 2018 | 2010 |
| 2019 /// Information about which variables are captured by a nested function. | 2011 /// Information about which variables are captured by a nested function. |
| 2020 /// | 2012 /// |
| 2021 /// This is used by the [DartIrBuilder] instead of [ClosureScope] and | 2013 /// This is used by the [DartIrBuilder] instead of [ClosureScope] and |
| 2022 /// [ClosureEnvironment]. | 2014 /// [ClosureEnvironment]. |
| 2023 abstract class DartCapturedVariableInfo { | 2015 abstract class DartCapturedVariableInfo { |
| 2024 Iterable<Local> get capturedVariables; | 2016 Iterable<Local> get capturedVariables; |
| 2025 } | 2017 } |
| OLD | NEW |