Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Side by Side Diff: pkg/compiler/lib/src/js_backend/patch_resolver.dart

Issue 1318043005: Support user generated custom native JS classes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: about to land Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart' show 8 import '../common/resolution.dart' show
9 Resolution; 9 Resolution;
10 import '../common/tasks.dart' show 10 import '../common/tasks.dart' show
(...skipping 13 matching lines...) Expand all
24 String get name => 'JavaScript patch resolver'; 24 String get name => 'JavaScript patch resolver';
25 25
26 FunctionElement resolveExternalFunction(FunctionElementX element) { 26 FunctionElement resolveExternalFunction(FunctionElementX element) {
27 if (element.isPatched) { 27 if (element.isPatched) {
28 FunctionElementX patch = element.patch; 28 FunctionElementX patch = element.patch;
29 reporter.withCurrentElement(patch, () { 29 reporter.withCurrentElement(patch, () {
30 patch.computeType(resolution); 30 patch.computeType(resolution);
31 }); 31 });
32 checkMatchingPatchSignatures(element, patch); 32 checkMatchingPatchSignatures(element, patch);
33 element = patch; 33 element = patch;
34 } else { 34 } else if (!element.isJsInterop) {
35 reporter.reportErrorMessage( 35 reporter.reportErrorMessage(
36 element, MessageKind.PATCH_EXTERNAL_WITHOUT_IMPLEMENTATION); 36 element, MessageKind.PATCH_EXTERNAL_WITHOUT_IMPLEMENTATION);
37 } 37 }
38 return element; 38 return element;
39 } 39 }
40 40
41 void checkMatchingPatchParameters(FunctionElement origin, 41 void checkMatchingPatchParameters(FunctionElement origin,
42 List<Element> originParameters, 42 List<Element> originParameters,
43 List<Element> patchParameters) { 43 List<Element> patchParameters) {
44 44
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 'patchParameterCount': patchSignature.optionalParameterCount}); 159 'patchParameterCount': patchSignature.optionalParameterCount});
160 }); 160 });
161 } else { 161 } else {
162 checkMatchingPatchParameters(origin, 162 checkMatchingPatchParameters(origin,
163 originSignature.optionalParameters, 163 originSignature.optionalParameters,
164 patchSignature.optionalParameters); 164 patchSignature.optionalParameters);
165 } 165 }
166 } 166 }
167 167
168 } 168 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/namer.dart ('k') | pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698