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

Side by Side Diff: pkg/compiler/lib/src/common/backend_api.dart

Issue 1318043005: Support user generated custom native JS classes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: ptal 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.backend_api; 5 library dart2js.backend_api;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import '../compiler.dart' show 9 import '../compiler.dart' show
10 Compiler; 10 Compiler;
(...skipping 27 matching lines...) Expand all
38 import '../io/source_information.dart' show 38 import '../io/source_information.dart' show
39 SourceInformationStrategy; 39 SourceInformationStrategy;
40 import '../js_backend/js_backend.dart' as js_backend show 40 import '../js_backend/js_backend.dart' as js_backend show
41 JavaScriptBackend; 41 JavaScriptBackend;
42 import '../library_loader.dart' show 42 import '../library_loader.dart' show
43 LibraryLoader, 43 LibraryLoader,
44 LoadedLibraries; 44 LoadedLibraries;
45 import '../native/native.dart' as native show 45 import '../native/native.dart' as native show
46 NativeEnqueuer; 46 NativeEnqueuer;
47 import '../patch_parser.dart' show 47 import '../patch_parser.dart' show
48 checkNativeAnnotation; 48 checkNativeAnnotation, checkJsInteropAnnotation;
49 import '../resolution/tree_elements.dart' show 49 import '../resolution/tree_elements.dart' show
50 TreeElements; 50 TreeElements;
51 51
52 import 'codegen.dart' show 52 import 'codegen.dart' show
53 CodegenWorkItem; 53 CodegenWorkItem;
54 import 'registry.dart' show 54 import 'registry.dart' show
55 Registry; 55 Registry;
56 import 'resolution.dart' show 56 import 'resolution.dart' show
57 ResolutionCallbacks; 57 ResolutionCallbacks;
58 import 'tasks.dart' show 58 import 'tasks.dart' show
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 /// This method is called immediately after the [library] and its parts have 274 /// This method is called immediately after the [library] and its parts have
275 /// been scanned. 275 /// been scanned.
276 Future onLibraryScanned(LibraryElement library, LibraryLoader loader) { 276 Future onLibraryScanned(LibraryElement library, LibraryLoader loader) {
277 if (library.canUseNative) { 277 if (library.canUseNative) {
278 library.forEachLocalMember((Element element) { 278 library.forEachLocalMember((Element element) {
279 if (element.isClass) { 279 if (element.isClass) {
280 checkNativeAnnotation(compiler, element); 280 checkNativeAnnotation(compiler, element);
281 } 281 }
282 }); 282 });
283 } 283 }
284 library.forEachLocalMember((Element element) {
285 if (element.isClass) {
286 checkJsInteropAnnotation(compiler, element);
287 }
288 });
284 return new Future.value(); 289 return new Future.value();
285 } 290 }
286 291
287 /// This method is called when all new libraries loaded through 292 /// This method is called when all new libraries loaded through
288 /// [LibraryLoader.loadLibrary] has been loaded and their imports/exports 293 /// [LibraryLoader.loadLibrary] has been loaded and their imports/exports
289 /// have been computed. 294 /// have been computed.
290 Future onLibrariesLoaded(LoadedLibraries loadedLibraries) { 295 Future onLibrariesLoaded(LoadedLibraries loadedLibraries) {
291 return new Future.value(); 296 return new Future.value();
292 } 297 }
293 298
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 360
356 void forgetElement(Element element) {} 361 void forgetElement(Element element) {}
357 362
358 void registerMainHasArguments(Enqueuer enqueuer) {} 363 void registerMainHasArguments(Enqueuer enqueuer) {}
359 364
360 void registerAsyncMarker(FunctionElement element, 365 void registerAsyncMarker(FunctionElement element,
361 Enqueuer enqueuer, 366 Enqueuer enqueuer,
362 Registry registry) {} 367 Registry registry) {}
363 } 368 }
364 369
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | pkg/compiler/lib/src/elements/modelx.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698