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

Unified 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: Reintroduce assertHelper for asserts without messages. 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/resolution/registry.dart
diff --git a/pkg/compiler/lib/src/resolution/registry.dart b/pkg/compiler/lib/src/resolution/registry.dart
index 6a407543753e807d9561ac66e47eb0bde3902bd4..c4f7a193e81fb453cde5afa31638a0fdd8558d90 100644
--- a/pkg/compiler/lib/src/resolution/registry.dart
+++ b/pkg/compiler/lib/src/resolution/registry.dart
@@ -55,6 +55,11 @@ class EagerRegistry implements Registry {
Iterable<Element> get otherDependencies => mapping.otherDependencies;
@override
+ void registerAssert(bool hasMessage) {
+ // TODO(johnniwinther): Do something here?
+ }
+
+ @override
void registerDependency(Element element) {
mapping.registerDependency(element);
}
@@ -583,13 +588,8 @@ class ResolutionRegistry implements Registry {
world.registerInstantiatedType(type, this);
}
- void registerAssert(Send node) {
- mapping.setAssert(node);
- backend.resolutionCallbacks.onAssert(node, this);
- }
-
- bool isAssert(Send node) {
- return mapping.isAssert(node);
+ void registerAssert(bool hasMessage) {
+ backend.resolutionCallbacks.onAssert(hasMessage, this);
}
void registerSendStructure(Send node, SendStructure sendStructure) {

Powered by Google App Engine
This is Rietveld 408576698