| OLD | NEW |
| 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 part of js_backend; | 5 part of js_backend; |
| 6 | 6 |
| 7 const VERBOSE_OPTIMIZER_HINTS = false; | 7 const VERBOSE_OPTIMIZER_HINTS = false; |
| 8 | 8 |
| 9 class JavaScriptItemCompilationContext extends ItemCompilationContext { | 9 class JavaScriptItemCompilationContext extends ItemCompilationContext { |
| 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); | 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); |
| (...skipping 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1722 preserveUrisMarker = find(library, 'preserveUris'); | 1722 preserveUrisMarker = find(library, 'preserveUris'); |
| 1723 preserveLibraryNamesMarker = find(library, 'preserveLibraryNames'); | 1723 preserveLibraryNamesMarker = find(library, 'preserveLibraryNames'); |
| 1724 } else if (uri == DART_JS_NAMES) { | 1724 } else if (uri == DART_JS_NAMES) { |
| 1725 preserveNamesMarker = find(library, 'preserveNames'); | 1725 preserveNamesMarker = find(library, 'preserveNames'); |
| 1726 } else if (uri == DART_HTML) { | 1726 } else if (uri == DART_HTML) { |
| 1727 htmlLibraryIsLoaded = true; | 1727 htmlLibraryIsLoaded = true; |
| 1728 } | 1728 } |
| 1729 }); | 1729 }); |
| 1730 } | 1730 } |
| 1731 | 1731 |
| 1732 Future onLibrariesLoaded(Map<Uri, LibraryElement> loadedLibraries) { | 1732 Future onLibrariesLoaded(LoadedLibraries loadedLibraries) { |
| 1733 if (!loadedLibraries.containsKey(Compiler.DART_CORE)) { | 1733 if (!loadedLibraries.containsLibrary(Compiler.DART_CORE)) { |
| 1734 return new Future.value(); | 1734 return new Future.value(); |
| 1735 } | 1735 } |
| 1736 | 1736 |
| 1737 assert(loadedLibraries.containsKey(Compiler.DART_CORE)); | 1737 assert(loadedLibraries.containsLibrary(Compiler.DART_CORE)); |
| 1738 assert(loadedLibraries.containsKey(DART_INTERCEPTORS)); | 1738 assert(loadedLibraries.containsLibrary(DART_INTERCEPTORS)); |
| 1739 assert(loadedLibraries.containsKey(DART_JS_HELPER)); | 1739 assert(loadedLibraries.containsLibrary(DART_JS_HELPER)); |
| 1740 | 1740 |
| 1741 if (jsInvocationMirrorClass != null) { | 1741 if (jsInvocationMirrorClass != null) { |
| 1742 jsInvocationMirrorClass.ensureResolved(compiler); | 1742 jsInvocationMirrorClass.ensureResolved(compiler); |
| 1743 invokeOnMethod = jsInvocationMirrorClass.lookupLocalMember(INVOKE_ON); | 1743 invokeOnMethod = jsInvocationMirrorClass.lookupLocalMember(INVOKE_ON); |
| 1744 } | 1744 } |
| 1745 | 1745 |
| 1746 // [LinkedHashMap] is reexported from dart:collection and can therefore not | 1746 // [LinkedHashMap] is reexported from dart:collection and can therefore not |
| 1747 // be loaded from dart:core in [onLibraryScanned]. | 1747 // be loaded from dart:core in [onLibraryScanned]. |
| 1748 mapLiteralClass = compiler.coreLibrary.find('LinkedHashMap'); | 1748 mapLiteralClass = compiler.coreLibrary.find('LinkedHashMap'); |
| 1749 assert(invariant(compiler.coreLibrary, mapLiteralClass != null, | 1749 assert(invariant(compiler.coreLibrary, mapLiteralClass != null, |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2410 } | 2410 } |
| 2411 } | 2411 } |
| 2412 | 2412 |
| 2413 /// Records that [constant] is used by the element behind [registry]. | 2413 /// Records that [constant] is used by the element behind [registry]. |
| 2414 class Dependency { | 2414 class Dependency { |
| 2415 final Constant constant; | 2415 final Constant constant; |
| 2416 final Element annotatedElement; | 2416 final Element annotatedElement; |
| 2417 | 2417 |
| 2418 const Dependency(this.constant, this.annotatedElement); | 2418 const Dependency(this.constant, this.annotatedElement); |
| 2419 } | 2419 } |
| OLD | NEW |