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 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 // by name. | 1318 // by name. |
1319 enqueuer.registerGetOfStaticFunction(compiler.mainFunction); | 1319 enqueuer.registerGetOfStaticFunction(compiler.mainFunction); |
1320 } | 1320 } |
1321 if (enqueuer.isResolutionQueue) { | 1321 if (enqueuer.isResolutionQueue) { |
1322 for (String name in const [START_ROOT_ISOLATE, | 1322 for (String name in const [START_ROOT_ISOLATE, |
1323 '_currentIsolate', | 1323 '_currentIsolate', |
1324 '_callInIsolate']) { | 1324 '_callInIsolate']) { |
1325 Element element = find(isolateHelperLibrary, name); | 1325 Element element = find(isolateHelperLibrary, name); |
1326 enqueuer.addToWorkList(element); | 1326 enqueuer.addToWorkList(element); |
1327 compiler.globalDependencies.registerDependency(element); | 1327 compiler.globalDependencies.registerDependency(element); |
| 1328 helpersUsed.add(element.declaration); |
1328 } | 1329 } |
1329 } else { | 1330 } else { |
1330 enqueuer.addToWorkList(find(isolateHelperLibrary, START_ROOT_ISOLATE)); | 1331 enqueuer.addToWorkList(find(isolateHelperLibrary, START_ROOT_ISOLATE)); |
1331 } | 1332 } |
1332 } | 1333 } |
1333 | 1334 |
1334 bool isAssertMethod(Element element) => element == assertMethod; | 1335 bool isAssertMethod(Element element) => element == assertMethod; |
1335 | 1336 |
1336 void registerRequiredType(DartType type, Element enclosingElement) { | 1337 void registerRequiredType(DartType type, Element enclosingElement) { |
1337 // If [argument] has type variables or is a type variable, this method | 1338 // If [argument] has type variables or is a type variable, this method |
(...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3088 } | 3089 } |
3089 } | 3090 } |
3090 | 3091 |
3091 /// Records that [constant] is used by the element behind [registry]. | 3092 /// Records that [constant] is used by the element behind [registry]. |
3092 class Dependency { | 3093 class Dependency { |
3093 final ConstantValue constant; | 3094 final ConstantValue constant; |
3094 final Element annotatedElement; | 3095 final Element annotatedElement; |
3095 | 3096 |
3096 const Dependency(this.constant, this.annotatedElement); | 3097 const Dependency(this.constant, this.annotatedElement); |
3097 } | 3098 } |
OLD | NEW |