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 '../common/tasks.dart' show | 7 import '../common/tasks.dart' show |
8 CompilerTask; | 8 CompilerTask; |
9 import '../compiler.dart' show | 9 import '../compiler.dart' show |
10 Compiler; | 10 Compiler; |
11 import '../dart_types.dart'; | 11 import '../dart_types.dart'; |
12 import '../diagnostics/invariant.dart' show | 12 import '../diagnostics/invariant.dart' show |
13 invariant; | 13 invariant; |
| 14 import '../diagnostics/messages.dart' show MessageKind; |
14 import '../elements/elements.dart'; | 15 import '../elements/elements.dart'; |
15 import '../elements/modelx.dart'; | 16 import '../elements/modelx.dart'; |
16 import '../messages.dart' show MessageKind; | |
17 import '../tree/tree.dart'; | 17 import '../tree/tree.dart'; |
18 | 18 |
19 class PatchResolverTask extends CompilerTask { | 19 class PatchResolverTask extends CompilerTask { |
20 PatchResolverTask(Compiler compiler) : super(compiler); | 20 PatchResolverTask(Compiler compiler) : super(compiler); |
21 | 21 |
22 String get name => 'JavaScript patch resolver'; | 22 String get name => 'JavaScript patch resolver'; |
23 | 23 |
24 FunctionElement resolveExternalFunction(FunctionElementX element) { | 24 FunctionElement resolveExternalFunction(FunctionElementX element) { |
25 if (element.isPatched) { | 25 if (element.isPatched) { |
26 FunctionElementX patch = element.patch; | 26 FunctionElementX patch = element.patch; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 'patchParameterCount': patchSignature.optionalParameterCount}); | 151 'patchParameterCount': patchSignature.optionalParameterCount}); |
152 }); | 152 }); |
153 } else { | 153 } else { |
154 checkMatchingPatchParameters(origin, | 154 checkMatchingPatchParameters(origin, |
155 originSignature.optionalParameters, | 155 originSignature.optionalParameters, |
156 patchSignature.optionalParameters); | 156 patchSignature.optionalParameters); |
157 } | 157 } |
158 } | 158 } |
159 | 159 |
160 } | 160 } |
OLD | NEW |