| 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 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR"); | 9 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR"); |
| 10 | 10 |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 } | 731 } |
| 732 enqueueClass(enqueuer, cls, registry); | 732 enqueueClass(enqueuer, cls, registry); |
| 733 } | 733 } |
| 734 | 734 |
| 735 Set<ClassElement> get interceptedClasses { | 735 Set<ClassElement> get interceptedClasses { |
| 736 assert(compiler.enqueuer.resolution.queueIsClosed); | 736 assert(compiler.enqueuer.resolution.queueIsClosed); |
| 737 return _interceptedClasses; | 737 return _interceptedClasses; |
| 738 } | 738 } |
| 739 | 739 |
| 740 void registerSpecializedGetInterceptor(Set<ClassElement> classes) { | 740 void registerSpecializedGetInterceptor(Set<ClassElement> classes) { |
| 741 String name = namer.getInterceptorName(getInterceptorMethod, classes); | 741 String name = namer.getInterceptorName(classes); |
| 742 if (classes.contains(jsInterceptorClass)) { | 742 if (classes.contains(jsInterceptorClass)) { |
| 743 // We can't use a specialized [getInterceptorMethod], so we make | 743 // We can't use a specialized [getInterceptorMethod], so we make |
| 744 // sure we emit the one with all checks. | 744 // sure we emit the one with all checks. |
| 745 specializedGetInterceptors[name] = interceptedClasses; | 745 specializedGetInterceptors[name] = interceptedClasses; |
| 746 } else { | 746 } else { |
| 747 specializedGetInterceptors[name] = classes; | 747 specializedGetInterceptors[name] = classes; |
| 748 } | 748 } |
| 749 } | 749 } |
| 750 | 750 |
| 751 void registerCompileTimeConstant(ConstantValue constant, Registry registry) { | 751 void registerCompileTimeConstant(ConstantValue constant, Registry registry) { |
| (...skipping 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2527 } | 2527 } |
| 2528 } | 2528 } |
| 2529 | 2529 |
| 2530 /// Records that [constant] is used by the element behind [registry]. | 2530 /// Records that [constant] is used by the element behind [registry]. |
| 2531 class Dependency { | 2531 class Dependency { |
| 2532 final ConstantValue constant; | 2532 final ConstantValue constant; |
| 2533 final Element annotatedElement; | 2533 final Element annotatedElement; |
| 2534 | 2534 |
| 2535 const Dependency(this.constant, this.annotatedElement); | 2535 const Dependency(this.constant, this.annotatedElement); |
| 2536 } | 2536 } |
| OLD | NEW |