| 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 import 'dart:math' as math; | 5 import 'dart:math' as math; |
| 6 import 'dart:collection' show Queue; | 6 import 'dart:collection' show Queue; |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 8 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 9 import '../common/tasks.dart' show CompilerTask; | 9 import '../common/tasks.dart' show CompilerTask; |
| 10 import '../constants/constant_system.dart'; | 10 import '../constants/constant_system.dart'; |
| (...skipping 2091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2102 node.instantiatedTypes?.forEach(_registry.registerInstantiation); | 2102 node.instantiatedTypes?.forEach(_registry.registerInstantiation); |
| 2103 if (node.callMethod != null) { | 2103 if (node.callMethod != null) { |
| 2104 _registry | 2104 _registry |
| 2105 ?.registerStaticUse(new StaticUse.implicitInvoke(node.callMethod)); | 2105 ?.registerStaticUse(new StaticUse.implicitInvoke(node.callMethod)); |
| 2106 } | 2106 } |
| 2107 if (node.localFunction != null) { | 2107 if (node.localFunction != null) { |
| 2108 _registry?.registerInstantiatedClosure(node.localFunction); | 2108 _registry?.registerInstantiatedClosure(node.localFunction); |
| 2109 } | 2109 } |
| 2110 } | 2110 } |
| 2111 | 2111 |
| 2112 visitCreateBox(HCreateBox node) { |
| 2113 push(new js.ObjectInitializer(<js.Property>[])); |
| 2114 } |
| 2115 |
| 2112 js.Expression newLiteralBool( | 2116 js.Expression newLiteralBool( |
| 2113 bool value, SourceInformation sourceInformation) { | 2117 bool value, SourceInformation sourceInformation) { |
| 2114 if (_options.enableMinification) { | 2118 if (_options.enableMinification) { |
| 2115 // Use !0 for true, !1 for false. | 2119 // Use !0 for true, !1 for false. |
| 2116 return new js.Prefix("!", new js.LiteralNumber(value ? "0" : "1")) | 2120 return new js.Prefix("!", new js.LiteralNumber(value ? "0" : "1")) |
| 2117 .withSourceInformation(sourceInformation); | 2121 .withSourceInformation(sourceInformation); |
| 2118 } else { | 2122 } else { |
| 2119 return new js.LiteralBool(value).withSourceInformation(sourceInformation); | 2123 return new js.LiteralBool(value).withSourceInformation(sourceInformation); |
| 2120 } | 2124 } |
| 2121 } | 2125 } |
| (...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3035 return _closedWorld.anyStrictSubclassOf(cls, (ClassEntity subclass) { | 3039 return _closedWorld.anyStrictSubclassOf(cls, (ClassEntity subclass) { |
| 3036 return !_rtiSubstitutions.isTrivialSubstitution(subclass, cls); | 3040 return !_rtiSubstitutions.isTrivialSubstitution(subclass, cls); |
| 3037 }); | 3041 }); |
| 3038 } | 3042 } |
| 3039 | 3043 |
| 3040 @override | 3044 @override |
| 3041 void visitRef(HRef node) { | 3045 void visitRef(HRef node) { |
| 3042 visit(node.value); | 3046 visit(node.value); |
| 3043 } | 3047 } |
| 3044 } | 3048 } |
| OLD | NEW |