| 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 2059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2070 closureClass = lookupHelperClass('Closure'); | 2070 closureClass = lookupHelperClass('Closure'); |
| 2071 if (!missingHelperClasses.isEmpty) { | 2071 if (!missingHelperClasses.isEmpty) { |
| 2072 compiler.internalError(jsHelperLibrary, | 2072 compiler.internalError(jsHelperLibrary, |
| 2073 'dart:_js_helper library does not contain required classes: ' | 2073 'dart:_js_helper library does not contain required classes: ' |
| 2074 '$missingHelperClasses'); | 2074 '$missingHelperClasses'); |
| 2075 } | 2075 } |
| 2076 } | 2076 } |
| 2077 | 2077 |
| 2078 Future onLibraryScanned(LibraryElement library, LibraryLoader loader) { | 2078 Future onLibraryScanned(LibraryElement library, LibraryLoader loader) { |
| 2079 return super.onLibraryScanned(library, loader).then((_) { | 2079 return super.onLibraryScanned(library, loader).then((_) { |
| 2080 if (library.isPlatformLibrary && !library.isPatched) { | 2080 if (library.isPlatformLibrary && |
| 2081 // Don't patch library currently disallowed. |
| 2082 !library.isSynthesized && |
| 2083 !library.isPatched) { |
| 2081 // Apply patch, if any. | 2084 // Apply patch, if any. |
| 2082 Uri patchUri = compiler.resolvePatchUri(library.canonicalUri.path); | 2085 Uri patchUri = compiler.resolvePatchUri(library.canonicalUri.path); |
| 2083 if (patchUri != null) { | 2086 if (patchUri != null) { |
| 2084 return compiler.patchParser.patchLibrary(loader, patchUri, library); | 2087 return compiler.patchParser.patchLibrary(loader, patchUri, library); |
| 2085 } | 2088 } |
| 2086 } | 2089 } |
| 2087 }).then((_) { | 2090 }).then((_) { |
| 2088 Uri uri = library.canonicalUri; | 2091 Uri uri = library.canonicalUri; |
| 2089 | 2092 |
| 2090 FunctionElement findMethod(String name) { | 2093 FunctionElement findMethod(String name) { |
| (...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3157 } | 3160 } |
| 3158 } | 3161 } |
| 3159 | 3162 |
| 3160 /// Records that [constant] is used by the element behind [registry]. | 3163 /// Records that [constant] is used by the element behind [registry]. |
| 3161 class Dependency { | 3164 class Dependency { |
| 3162 final ConstantValue constant; | 3165 final ConstantValue constant; |
| 3163 final Element annotatedElement; | 3166 final Element annotatedElement; |
| 3164 | 3167 |
| 3165 const Dependency(this.constant, this.annotatedElement); | 3168 const Dependency(this.constant, this.annotatedElement); |
| 3166 } | 3169 } |
| OLD | NEW |