| 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_task; | 5 library dart2js.ir_builder_task; |
| 6 | 6 |
| 7 import '../closure.dart' as closure; | 7 import '../closure.dart' as closure; |
| 8 import '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../common/names.dart' show | 9 import '../common/names.dart' show |
| 10 Names, | 10 Names, |
| (...skipping 2765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2776 internalError(argument, 'Additional argument.'); | 2776 internalError(argument, 'Additional argument.'); |
| 2777 } | 2777 } |
| 2778 } | 2778 } |
| 2779 if (count < minimum) { | 2779 if (count < minimum) { |
| 2780 internalError(node, 'Expected at least $minimum arguments.'); | 2780 internalError(node, 'Expected at least $minimum arguments.'); |
| 2781 } | 2781 } |
| 2782 } | 2782 } |
| 2783 | 2783 |
| 2784 /// Call a helper method from the isolate library. The isolate library uses | 2784 /// Call a helper method from the isolate library. The isolate library uses |
| 2785 /// its own isolate structure, that encapsulates dart2js's isolate. | 2785 /// its own isolate structure, that encapsulates dart2js's isolate. |
| 2786 ir.Primitive buildIsolateHelperInvocation(Element element, | 2786 ir.Primitive buildIsolateHelperInvocation(MethodElement element, |
| 2787 CallStructure callStructure) { | 2787 CallStructure callStructure) { |
| 2788 if (element == null) { | 2788 if (element == null) { |
| 2789 reporter.internalError(node, | 2789 reporter.internalError(node, |
| 2790 'Isolate library and compiler mismatch.'); | 2790 'Isolate library and compiler mismatch.'); |
| 2791 } | 2791 } |
| 2792 List<ir.Primitive> arguments = <ir.Primitive>[]; | 2792 List<ir.Primitive> arguments = <ir.Primitive>[]; |
| 2793 callStructure = translateStaticArguments(argumentList, element, | 2793 callStructure = translateStaticArguments(argumentList, element, |
| 2794 callStructure, arguments); | 2794 callStructure, arguments); |
| 2795 Selector selector = new Selector.call(element.memberName, callStructure); | 2795 Selector selector = new Selector.call(element.memberName, callStructure); |
| 2796 return irBuilder.buildInvokeStatic(element, selector, arguments, | 2796 return irBuilder.buildInvokeStatic(element, selector, arguments, |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3613 } | 3613 } |
| 3614 | 3614 |
| 3615 Element get closureConverter { | 3615 Element get closureConverter { |
| 3616 return _backend.helpers.closureConverter; | 3616 return _backend.helpers.closureConverter; |
| 3617 } | 3617 } |
| 3618 | 3618 |
| 3619 void addNativeMethod(FunctionElement function) { | 3619 void addNativeMethod(FunctionElement function) { |
| 3620 _backend.emitter.nativeEmitter.nativeMethods.add(function); | 3620 _backend.emitter.nativeEmitter.nativeMethods.add(function); |
| 3621 } | 3621 } |
| 3622 } | 3622 } |
| OLD | NEW |