| 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 2556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2567 assert(registry.isForResolution); | 2567 assert(registry.isForResolution); |
| 2568 type = type.unalias(backend.compiler); | 2568 type = type.unalias(backend.compiler); |
| 2569 registerBackendInstantiation(backend.compiler.boolClass, registry); | 2569 registerBackendInstantiation(backend.compiler.boolClass, registry); |
| 2570 bool inCheckedMode = backend.compiler.enableTypeAssertions; | 2570 bool inCheckedMode = backend.compiler.enableTypeAssertions; |
| 2571 if (inCheckedMode) { | 2571 if (inCheckedMode) { |
| 2572 registerBackendStaticInvocation(backend.getThrowRuntimeError(), registry); | 2572 registerBackendStaticInvocation(backend.getThrowRuntimeError(), registry); |
| 2573 } | 2573 } |
| 2574 if (type.isMalformed) { | 2574 if (type.isMalformed) { |
| 2575 registerBackendStaticInvocation(backend.getThrowTypeError(), registry); | 2575 registerBackendStaticInvocation(backend.getThrowTypeError(), registry); |
| 2576 } | 2576 } |
| 2577 if (!type.treatAsRaw || type.containsTypeVariables) { | 2577 if (!type.treatAsRaw || type.containsTypeVariables || type.isFunctionType) { |
| 2578 // TODO(johnniwinther): Investigate why this is needed. | 2578 // TODO(johnniwinther): Investigate why this is needed. |
| 2579 registerBackendStaticInvocation( | 2579 registerBackendStaticInvocation( |
| 2580 backend.getSetRuntimeTypeInfo(), registry); | 2580 backend.getSetRuntimeTypeInfo(), registry); |
| 2581 registerBackendStaticInvocation( | 2581 registerBackendStaticInvocation( |
| 2582 backend.getGetRuntimeTypeInfo(), registry); | 2582 backend.getGetRuntimeTypeInfo(), registry); |
| 2583 backend.registerGetRuntimeTypeArgument(registry); | 2583 backend.registerGetRuntimeTypeArgument(registry); |
| 2584 if (inCheckedMode) { | 2584 if (inCheckedMode) { |
| 2585 registerBackendStaticInvocation(backend.getAssertSubtype(), registry); | 2585 registerBackendStaticInvocation(backend.getAssertSubtype(), registry); |
| 2586 } | 2586 } |
| 2587 registerBackendStaticInvocation(backend.getCheckSubtype(), registry); | 2587 registerBackendStaticInvocation(backend.getCheckSubtype(), registry); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2681 } | 2681 } |
| 2682 } | 2682 } |
| 2683 | 2683 |
| 2684 /// Records that [constant] is used by the element behind [registry]. | 2684 /// Records that [constant] is used by the element behind [registry]. |
| 2685 class Dependency { | 2685 class Dependency { |
| 2686 final ConstantValue constant; | 2686 final ConstantValue constant; |
| 2687 final Element annotatedElement; | 2687 final Element annotatedElement; |
| 2688 | 2688 |
| 2689 const Dependency(this.constant, this.annotatedElement); | 2689 const Dependency(this.constant, this.annotatedElement); |
| 2690 } | 2690 } |
| OLD | NEW |