OLD | NEW |
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 dart2js.js_backend.patch_resolver; | 5 library dart2js.js_backend.patch_resolver; |
6 | 6 |
7 import '../dart2jslib.dart'; | 7 import '../dart2jslib.dart'; |
8 import '../dart_types.dart'; | 8 import '../dart_types.dart'; |
9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
10 import '../elements/modelx.dart'; | 10 import '../elements/modelx.dart'; |
| 11 import '../messages.dart' show MessageKind; |
11 import '../tree/tree.dart'; | 12 import '../tree/tree.dart'; |
12 | 13 |
13 class PatchResolverTask extends CompilerTask { | 14 class PatchResolverTask extends CompilerTask { |
14 PatchResolverTask(Compiler compiler) : super(compiler); | 15 PatchResolverTask(Compiler compiler) : super(compiler); |
15 | 16 |
16 String get name => 'JavaScript patch resolver'; | 17 String get name => 'JavaScript patch resolver'; |
17 | 18 |
18 FunctionElement resolveExternalFunction(FunctionElementX element) { | 19 FunctionElement resolveExternalFunction(FunctionElementX element) { |
19 if (element.isPatched) { | 20 if (element.isPatched) { |
20 FunctionElementX patch = element.patch; | 21 FunctionElementX patch = element.patch; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 'patchParameterCount': patchSignature.optionalParameterCount}); | 146 'patchParameterCount': patchSignature.optionalParameterCount}); |
146 }); | 147 }); |
147 } else { | 148 } else { |
148 checkMatchingPatchParameters(origin, | 149 checkMatchingPatchParameters(origin, |
149 originSignature.optionalParameters, | 150 originSignature.optionalParameters, |
150 patchSignature.optionalParameters); | 151 patchSignature.optionalParameters); |
151 } | 152 } |
152 } | 153 } |
153 | 154 |
154 } | 155 } |
OLD | NEW |