| 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 library js_backend.backend; | 5 library js_backend.backend; |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; | 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; |
| 10 | 10 |
| (...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1649 // Enable runtime type support if we discover a getter called | 1649 // Enable runtime type support if we discover a getter called |
| 1650 // runtimeType. We have to enable runtime type before hitting the | 1650 // runtimeType. We have to enable runtime type before hitting the |
| 1651 // codegen, so that constructors know whether they need to generate code | 1651 // codegen, so that constructors know whether they need to generate code |
| 1652 // for runtime type. | 1652 // for runtime type. |
| 1653 hasRuntimeTypeSupport = true; | 1653 hasRuntimeTypeSupport = true; |
| 1654 // TODO(ahe): Record precise dependency here. | 1654 // TODO(ahe): Record precise dependency here. |
| 1655 worldImpact.addImpact(registerRuntimeType()); | 1655 worldImpact.addImpact(registerRuntimeType()); |
| 1656 } else if (compiler.commonElements.isFunctionApplyMethod(element)) { | 1656 } else if (compiler.commonElements.isFunctionApplyMethod(element)) { |
| 1657 hasFunctionApplySupport = true; | 1657 hasFunctionApplySupport = true; |
| 1658 } | 1658 } |
| 1659 } else { | |
| 1660 // TODO(sigmund): add other missing dependencies (internals, selectors | |
| 1661 // enqueued after allocations). | |
| 1662 compiler.dumpInfoTask.registerDependency(element); | |
| 1663 } | 1659 } |
| 1664 return worldImpact; | 1660 return worldImpact; |
| 1665 } | 1661 } |
| 1666 | 1662 |
| 1667 /// Called when [:const Symbol(name):] is seen. | 1663 /// Called when [:const Symbol(name):] is seen. |
| 1668 void registerConstSymbol(String name) { | 1664 void registerConstSymbol(String name) { |
| 1669 symbolsUsed.add(name); | 1665 symbolsUsed.add(name); |
| 1670 if (name.endsWith('=')) { | 1666 if (name.endsWith('=')) { |
| 1671 symbolsUsed.add(name.substring(0, name.length - 1)); | 1667 symbolsUsed.add(name.substring(0, name.length - 1)); |
| 1672 } | 1668 } |
| (...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3191 } | 3187 } |
| 3192 | 3188 |
| 3193 @override | 3189 @override |
| 3194 FieldEntity get symbolField => helpers.symbolImplementationField; | 3190 FieldEntity get symbolField => helpers.symbolImplementationField; |
| 3195 | 3191 |
| 3196 @override | 3192 @override |
| 3197 InterfaceType get symbolType { | 3193 InterfaceType get symbolType { |
| 3198 return _env.getRawType(helpers.symbolImplementationClass); | 3194 return _env.getRawType(helpers.symbolImplementationClass); |
| 3199 } | 3195 } |
| 3200 } | 3196 } |
| OLD | NEW |