| 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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 | 635 |
| 636 ConstantSystem get constantSystem => constants.constantSystem; | 636 ConstantSystem get constantSystem => constants.constantSystem; |
| 637 | 637 |
| 638 /// Returns constant environment for the JavaScript interpretation of the | 638 /// Returns constant environment for the JavaScript interpretation of the |
| 639 /// constants. | 639 /// constants. |
| 640 JavaScriptConstantCompiler get constants { | 640 JavaScriptConstantCompiler get constants { |
| 641 return constantCompilerTask.jsConstantCompiler; | 641 return constantCompilerTask.jsConstantCompiler; |
| 642 } | 642 } |
| 643 | 643 |
| 644 FunctionElement resolveExternalFunction(FunctionElement element) { | 644 FunctionElement resolveExternalFunction(FunctionElement element) { |
| 645 if (isForeign(element)) return element; |
| 645 return patchResolverTask.measure(() { | 646 return patchResolverTask.measure(() { |
| 646 return patchResolverTask.resolveExternalFunction(element); | 647 return patchResolverTask.resolveExternalFunction(element); |
| 647 }); | 648 }); |
| 648 } | 649 } |
| 649 | 650 |
| 650 // TODO(karlklose): Split into findHelperFunction and findHelperClass and | 651 // TODO(karlklose): Split into findHelperFunction and findHelperClass and |
| 651 // add a check that the element has the expected kind. | 652 // add a check that the element has the expected kind. |
| 652 Element findHelper(String name) => find(jsHelperLibrary, name); | 653 Element findHelper(String name) => find(jsHelperLibrary, name); |
| 653 Element findInterceptor(String name) => find(interceptorsLibrary, name); | 654 Element findInterceptor(String name) => find(interceptorsLibrary, name); |
| 654 | 655 |
| (...skipping 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2976 } | 2977 } |
| 2977 } | 2978 } |
| 2978 | 2979 |
| 2979 /// Records that [constant] is used by the element behind [registry]. | 2980 /// Records that [constant] is used by the element behind [registry]. |
| 2980 class Dependency { | 2981 class Dependency { |
| 2981 final ConstantValue constant; | 2982 final ConstantValue constant; |
| 2982 final Element annotatedElement; | 2983 final Element annotatedElement; |
| 2983 | 2984 |
| 2984 const Dependency(this.constant, this.annotatedElement); | 2985 const Dependency(this.constant, this.annotatedElement); |
| 2985 } | 2986 } |
| OLD | NEW |