| 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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 return element; | 570 return element; |
| 571 } | 571 } |
| 572 if (isJsInterop(element)) { | 572 if (isJsInterop(element)) { |
| 573 if (element.memberName == const PublicName('[]') || | 573 if (element.memberName == const PublicName('[]') || |
| 574 element.memberName == const PublicName('[]=')) { | 574 element.memberName == const PublicName('[]=')) { |
| 575 reporter.reportErrorMessage( | 575 reporter.reportErrorMessage( |
| 576 element, MessageKind.JS_INTEROP_INDEX_NOT_SUPPORTED); | 576 element, MessageKind.JS_INTEROP_INDEX_NOT_SUPPORTED); |
| 577 } | 577 } |
| 578 return element; | 578 return element; |
| 579 } | 579 } |
| 580 return patchResolverTask.measure(() { | 580 return patchResolverTask.resolveExternalFunction(element); |
| 581 return patchResolverTask.resolveExternalFunction(element); | |
| 582 }); | |
| 583 } | 581 } |
| 584 | 582 |
| 585 bool isForeign(Element element) => element.library == helpers.foreignLibrary; | 583 bool isForeign(Element element) => element.library == helpers.foreignLibrary; |
| 586 | 584 |
| 587 bool isBackendLibrary(LibraryElement library) { | 585 bool isBackendLibrary(LibraryElement library) { |
| 588 return library == helpers.interceptorsLibrary || | 586 return library == helpers.interceptorsLibrary || |
| 589 library == helpers.jsHelperLibrary; | 587 library == helpers.jsHelperLibrary; |
| 590 } | 588 } |
| 591 | 589 |
| 592 static Namer determineNamer(Compiler compiler) { | 590 static Namer determineNamer(Compiler compiler) { |
| (...skipping 2389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2982 | 2980 |
| 2983 @override | 2981 @override |
| 2984 void onImpactUsed(ImpactUseCase impactUse) { | 2982 void onImpactUsed(ImpactUseCase impactUse) { |
| 2985 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { | 2983 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { |
| 2986 // TODO(johnniwinther): Allow emptying when serialization has been | 2984 // TODO(johnniwinther): Allow emptying when serialization has been |
| 2987 // performed. | 2985 // performed. |
| 2988 resolution.emptyCache(); | 2986 resolution.emptyCache(); |
| 2989 } | 2987 } |
| 2990 } | 2988 } |
| 2991 } | 2989 } |
| OLD | NEW |