| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 dart2js.resolution.registry; | 5 library dart2js.resolution.registry; |
| 6 | 6 |
| 7 import '../common/backend_api.dart' show | 7 import '../common/backend_api.dart' show |
| 8 Backend; | 8 Backend; |
| 9 import '../common/registry.dart' show | 9 import '../common/registry.dart' show |
| 10 Registry; | 10 Registry; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 ResolutionEnqueuer get world => compiler.enqueuer.resolution; | 49 ResolutionEnqueuer get world => compiler.enqueuer.resolution; |
| 50 | 50 |
| 51 @override | 51 @override |
| 52 bool get isForResolution => true; | 52 bool get isForResolution => true; |
| 53 | 53 |
| 54 @override | 54 @override |
| 55 Iterable<Element> get otherDependencies => mapping.otherDependencies; | 55 Iterable<Element> get otherDependencies => mapping.otherDependencies; |
| 56 | 56 |
| 57 @override | 57 @override |
| 58 void registerAssert(bool hasMessage) { |
| 59 // TODO(johnniwinther): Do something here? |
| 60 } |
| 61 |
| 62 @override |
| 58 void registerDependency(Element element) { | 63 void registerDependency(Element element) { |
| 59 mapping.registerDependency(element); | 64 mapping.registerDependency(element); |
| 60 } | 65 } |
| 61 | 66 |
| 62 @override | 67 @override |
| 63 void registerDynamicGetter(UniverseSelector selector) { | 68 void registerDynamicGetter(UniverseSelector selector) { |
| 64 world.registerDynamicGetter(selector); | 69 world.registerDynamicGetter(selector); |
| 65 } | 70 } |
| 66 | 71 |
| 67 @override | 72 @override |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 // [registerDependency]. | 581 // [registerDependency]. |
| 577 if (element == null) return; | 582 if (element == null) return; |
| 578 registerStaticUse(element); | 583 registerStaticUse(element); |
| 579 registerDependency(element); | 584 registerDependency(element); |
| 580 } | 585 } |
| 581 | 586 |
| 582 void registerInstantiation(InterfaceType type) { | 587 void registerInstantiation(InterfaceType type) { |
| 583 world.registerInstantiatedType(type, this); | 588 world.registerInstantiatedType(type, this); |
| 584 } | 589 } |
| 585 | 590 |
| 586 void registerAssert(Send node) { | 591 void registerAssert(bool hasMessage) { |
| 587 mapping.setAssert(node); | 592 backend.resolutionCallbacks.onAssert(hasMessage, this); |
| 588 backend.resolutionCallbacks.onAssert(node, this); | |
| 589 } | |
| 590 | |
| 591 bool isAssert(Send node) { | |
| 592 return mapping.isAssert(node); | |
| 593 } | 593 } |
| 594 | 594 |
| 595 void registerSendStructure(Send node, SendStructure sendStructure) { | 595 void registerSendStructure(Send node, SendStructure sendStructure) { |
| 596 mapping.setSendStructure(node, sendStructure); | 596 mapping.setSendStructure(node, sendStructure); |
| 597 } | 597 } |
| 598 | 598 |
| 599 // TODO(johnniwinther): Remove this when [SendStructure]s are part of the | 599 // TODO(johnniwinther): Remove this when [SendStructure]s are part of the |
| 600 // [ResolutionResult]. | 600 // [ResolutionResult]. |
| 601 SendStructure getSendStructure(Send node) { | 601 SendStructure getSendStructure(Send node) { |
| 602 return mapping.getSendStructure(node); | 602 return mapping.getSendStructure(node); |
| 603 } | 603 } |
| 604 | 604 |
| 605 void registerAsyncMarker(FunctionElement element) { | 605 void registerAsyncMarker(FunctionElement element) { |
| 606 backend.registerAsyncMarker(element, world, this); | 606 backend.registerAsyncMarker(element, world, this); |
| 607 } | 607 } |
| 608 | 608 |
| 609 void registerAsyncForIn(AsyncForIn node) { | 609 void registerAsyncForIn(AsyncForIn node) { |
| 610 backend.resolutionCallbacks.onAsyncForIn(node, this); | 610 backend.resolutionCallbacks.onAsyncForIn(node, this); |
| 611 } | 611 } |
| 612 | 612 |
| 613 void registerTryStatement() { | 613 void registerTryStatement() { |
| 614 mapping.containsTryStatement = true; | 614 mapping.containsTryStatement = true; |
| 615 } | 615 } |
| 616 } | 616 } |
| OLD | NEW |