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

Side by Side Diff: pkg/compiler/lib/src/library_loader.dart

Issue 1408043002: Move native and js interop properties from the element model to the JS backend (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. 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.library_loader; 5 library dart2js.library_loader;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'common.dart'; 9 import 'common.dart';
10 import 'common/names.dart' show 10 import 'common/names.dart' show
(...skipping 13 matching lines...) Expand all
24 CompilationUnitElementX, 24 CompilationUnitElementX,
25 DeferredLoaderGetterElementX, 25 DeferredLoaderGetterElementX,
26 ErroneousElementX, 26 ErroneousElementX,
27 ExportElementX, 27 ExportElementX,
28 ImportElementX, 28 ImportElementX,
29 LibraryElementX, 29 LibraryElementX,
30 LibraryDependencyElementX, 30 LibraryDependencyElementX,
31 PrefixElementX, 31 PrefixElementX,
32 SyntheticImportElement; 32 SyntheticImportElement;
33 33
34 import 'native/native.dart' as native;
35 import 'script.dart'; 34 import 'script.dart';
36 import 'tree/tree.dart'; 35 import 'tree/tree.dart';
37 import 'util/util.dart' show 36 import 'util/util.dart' show
38 Link, 37 Link,
39 LinkBuilder; 38 LinkBuilder;
40 39
41 /** 40 /**
42 * [CompilerTask] for loading libraries and setting up the import/export scopes. 41 * [CompilerTask] for loading libraries and setting up the import/export scopes.
43 * 42 *
44 * The library loader uses four different kinds of URIs in different parts of 43 * The library loader uses four different kinds of URIs in different parts of
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 LibraryElement createLibrarySync( 623 LibraryElement createLibrarySync(
625 LibraryDependencyHandler handler, 624 LibraryDependencyHandler handler,
626 Script script, 625 Script script,
627 Uri resolvedUri) { 626 Uri resolvedUri) {
628 LibraryElement element = new LibraryElementX(script, resolvedUri); 627 LibraryElement element = new LibraryElementX(script, resolvedUri);
629 return reporter.withCurrentElement(element, () { 628 return reporter.withCurrentElement(element, () {
630 if (handler != null) { 629 if (handler != null) {
631 handler.registerNewLibrary(element); 630 handler.registerNewLibrary(element);
632 libraryCanonicalUriMap[resolvedUri] = element; 631 libraryCanonicalUriMap[resolvedUri] = element;
633 } 632 }
634 native.maybeEnableNative(compiler, element);
635 compiler.scanner.scanLibrary(element); 633 compiler.scanner.scanLibrary(element);
636 return element; 634 return element;
637 }); 635 });
638 } 636 }
639 } 637 }
640 638
641 639
642 /// A state machine for checking script tags come in the correct order. 640 /// A state machine for checking script tags come in the correct order.
643 class TagState { 641 class TagState {
644 /// Initial state. 642 /// Initial state.
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 } 1342 }
1345 suffixes.add(const Link<Uri>().prepend(canonicalUri)); 1343 suffixes.add(const Link<Uri>().prepend(canonicalUri));
1346 } 1344 }
1347 suffixChainMap[library] = suffixes; 1345 suffixChainMap[library] = suffixes;
1348 return; 1346 return;
1349 } 1347 }
1350 1348
1351 computeSuffixes(rootLibrary, const Link<Uri>()); 1349 computeSuffixes(rootLibrary, const Link<Uri>());
1352 } 1350 }
1353 } 1351 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart ('k') | pkg/compiler/lib/src/native/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698