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

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

Issue 1342213003: Add optional message to assert in Dart2js - continued (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add --assert-message flag 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 ResolutionEnqueuer get world => compiler.enqueuer.resolution; 48 ResolutionEnqueuer get world => compiler.enqueuer.resolution;
49 49
50 @override 50 @override
51 bool get isForResolution => true; 51 bool get isForResolution => true;
52 52
53 @override 53 @override
54 Iterable<Element> get otherDependencies => mapping.otherDependencies; 54 Iterable<Element> get otherDependencies => mapping.otherDependencies;
55 55
56 @override 56 @override
57 void registerAssert(bool hasMessage) {
58 // TODO(johnniwinther): Do something here?
59 }
60
61 @override
57 void registerDependency(Element element) { 62 void registerDependency(Element element) {
58 mapping.registerDependency(element); 63 mapping.registerDependency(element);
59 } 64 }
60 65
61 @override 66 @override
62 void registerDynamicGetter(UniverseSelector selector) { 67 void registerDynamicGetter(UniverseSelector selector) {
63 world.registerDynamicGetter(selector); 68 world.registerDynamicGetter(selector);
64 } 69 }
65 70
66 @override 71 @override
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 // [registerDependency]. 576 // [registerDependency].
572 if (element == null) return; 577 if (element == null) return;
573 registerStaticUse(element); 578 registerStaticUse(element);
574 registerDependency(element); 579 registerDependency(element);
575 } 580 }
576 581
577 void registerInstantiation(InterfaceType type) { 582 void registerInstantiation(InterfaceType type) {
578 world.registerInstantiatedType(type, this); 583 world.registerInstantiatedType(type, this);
579 } 584 }
580 585
581 void registerAssert(Send node) { 586 void registerAssert(bool hasMessage) {
582 mapping.setAssert(node); 587 backend.resolutionCallbacks.onAssert(hasMessage, this);
583 backend.resolutionCallbacks.onAssert(node, this);
584 }
585
586 bool isAssert(Send node) {
587 return mapping.isAssert(node);
588 } 588 }
589 589
590 void registerSendStructure(Send node, SendStructure sendStructure) { 590 void registerSendStructure(Send node, SendStructure sendStructure) {
591 mapping.setSendStructure(node, sendStructure); 591 mapping.setSendStructure(node, sendStructure);
592 } 592 }
593 593
594 // TODO(johnniwinther): Remove this when [SendStructure]s are part of the 594 // TODO(johnniwinther): Remove this when [SendStructure]s are part of the
595 // [ResolutionResult]. 595 // [ResolutionResult].
596 SendStructure getSendStructure(Send node) { 596 SendStructure getSendStructure(Send node) {
597 return mapping.getSendStructure(node); 597 return mapping.getSendStructure(node);
598 } 598 }
599 599
600 void registerAsyncMarker(FunctionElement element) { 600 void registerAsyncMarker(FunctionElement element) {
601 backend.registerAsyncMarker(element, world, this); 601 backend.registerAsyncMarker(element, world, this);
602 } 602 }
603 603
604 void registerAsyncForIn(AsyncForIn node) { 604 void registerAsyncForIn(AsyncForIn node) {
605 backend.resolutionCallbacks.onAsyncForIn(node, this); 605 backend.resolutionCallbacks.onAsyncForIn(node, this);
606 } 606 }
607 607
608 void registerIncDecOperation() { 608 void registerIncDecOperation() {
609 backend.resolutionCallbacks.onIncDecOperation(this); 609 backend.resolutionCallbacks.onIncDecOperation(this);
610 } 610 }
611 611
612 void registerTryStatement() { 612 void registerTryStatement() {
613 mapping.containsTryStatement = true; 613 mapping.containsTryStatement = true;
614 } 614 }
615 } 615 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/resolution_result.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698