Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1104)

Side by Side Diff: pkg/compiler/lib/src/resolution/registry.dart

Issue 1325843003: Add optional message to assert in Dart2js. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 ResolutionEnqueuer get world => compiler.enqueuer.resolution; 50 ResolutionEnqueuer get world => compiler.enqueuer.resolution;
51 51
52 @override 52 @override
53 bool get isForResolution => true; 53 bool get isForResolution => true;
54 54
55 @override 55 @override
56 Iterable<Element> get otherDependencies => mapping.otherDependencies; 56 Iterable<Element> get otherDependencies => mapping.otherDependencies;
57 57
58 @override 58 @override
59 void registerAssert() {
60 //mapping.registerAssert();//TODO: SOmething here?
Johnni Winther 2015/09/01 13:32:05 Add a TODO for me to resolve this.
Lasse Reichstein Nielsen 2015/09/03 11:23:25 Done.
61 }
62
63 @override
59 void registerDependency(Element element) { 64 void registerDependency(Element element) {
60 mapping.registerDependency(element); 65 mapping.registerDependency(element);
61 } 66 }
62 67
63 @override 68 @override
64 void registerDynamicGetter(UniverseSelector selector) { 69 void registerDynamicGetter(UniverseSelector selector) {
65 world.registerDynamicGetter(selector); 70 world.registerDynamicGetter(selector);
66 } 71 }
67 72
68 @override 73 @override
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 // [registerDependency]. 578 // [registerDependency].
574 if (element == null) return; 579 if (element == null) return;
575 registerStaticUse(element); 580 registerStaticUse(element);
576 registerDependency(element); 581 registerDependency(element);
577 } 582 }
578 583
579 void registerInstantiation(InterfaceType type) { 584 void registerInstantiation(InterfaceType type) {
580 world.registerInstantiatedType(type, this); 585 world.registerInstantiatedType(type, this);
581 } 586 }
582 587
583 void registerAssert(Send node) { 588 void registerAssert() {
584 mapping.setAssert(node); 589 backend.resolutionCallbacks.onAssert(this);
585 backend.resolutionCallbacks.onAssert(node, this);
586 }
587
588 bool isAssert(Send node) {
589 return mapping.isAssert(node);
590 } 590 }
591 591
592 void registerSendStructure(Send node, SendStructure sendStructure) { 592 void registerSendStructure(Send node, SendStructure sendStructure) {
593 mapping.setSendStructure(node, sendStructure); 593 mapping.setSendStructure(node, sendStructure);
594 } 594 }
595 595
596 // TODO(johnniwinther): Remove this when [SendStructure]s are part of the 596 // TODO(johnniwinther): Remove this when [SendStructure]s are part of the
597 // [ResolutionResult]. 597 // [ResolutionResult].
598 SendStructure getSendStructure(Send node) { 598 SendStructure getSendStructure(Send node) {
599 return mapping.getSendStructure(node); 599 return mapping.getSendStructure(node);
600 } 600 }
601 601
602 void registerAsyncMarker(FunctionElement element) { 602 void registerAsyncMarker(FunctionElement element) {
603 backend.registerAsyncMarker(element, world, this); 603 backend.registerAsyncMarker(element, world, this);
604 } 604 }
605 605
606 void registerAsyncForIn(AsyncForIn node) { 606 void registerAsyncForIn(AsyncForIn node) {
607 backend.resolutionCallbacks.onAsyncForIn(node, this); 607 backend.resolutionCallbacks.onAsyncForIn(node, this);
608 } 608 }
609 } 609 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698