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 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2058 jsGetNameEnum = find(library, 'JsGetName'); | 2058 jsGetNameEnum = find(library, 'JsGetName'); |
2059 jsBuiltinEnum = find(library, 'JsBuiltin'); | 2059 jsBuiltinEnum = find(library, 'JsBuiltin'); |
2060 } else if (uri == Uris.dart_html) { | 2060 } else if (uri == Uris.dart_html) { |
2061 htmlLibraryIsLoaded = true; | 2061 htmlLibraryIsLoaded = true; |
2062 } else if (uri == PACKAGE_LOOKUP_MAP) { | 2062 } else if (uri == PACKAGE_LOOKUP_MAP) { |
2063 lookupMapAnalysis.init(library); | 2063 lookupMapAnalysis.init(library); |
2064 } else if (uri == Uris.dart__native_typed_data) { | 2064 } else if (uri == Uris.dart__native_typed_data) { |
2065 typedArrayClass = findClass('NativeTypedArray'); | 2065 typedArrayClass = findClass('NativeTypedArray'); |
2066 typedArrayOfIntClass = findClass('NativeTypedArrayOfInt'); | 2066 typedArrayOfIntClass = findClass('NativeTypedArrayOfInt'); |
2067 } else if (uri == PACKAGE_JS) { | 2067 } else if (uri == PACKAGE_JS) { |
2068 jsAnnotationClass = find(library, 'Js'); | 2068 jsAnnotationClass = find(library, 'JS'); |
2069 } | 2069 } |
2070 annotations.onLibraryScanned(library); | 2070 annotations.onLibraryScanned(library); |
2071 }); | 2071 }); |
2072 } | 2072 } |
2073 | 2073 |
2074 Future onLibrariesLoaded(LoadedLibraries loadedLibraries) { | 2074 Future onLibrariesLoaded(LoadedLibraries loadedLibraries) { |
2075 if (!loadedLibraries.containsLibrary(Uris.dart_core)) { | 2075 if (!loadedLibraries.containsLibrary(Uris.dart_core)) { |
2076 return new Future.value(); | 2076 return new Future.value(); |
2077 } | 2077 } |
2078 | 2078 |
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3033 } | 3033 } |
3034 | 3034 |
3035 /// Records that [constant] is used by the element behind [registry]. | 3035 /// Records that [constant] is used by the element behind [registry]. |
3036 class Dependency { | 3036 class Dependency { |
3037 final ConstantValue constant; | 3037 final ConstantValue constant; |
3038 final Element annotatedElement; | 3038 final Element annotatedElement; |
3039 | 3039 |
3040 const Dependency(this.constant, this.annotatedElement); | 3040 const Dependency(this.constant, this.annotatedElement); |
3041 } | 3041 } |
3042 | 3042 |
OLD | NEW |