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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/annotations.dart

Issue 2994203002: Optimize DDC private library files. (Closed)
Patch Set: Address comments Created 3 years, 4 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/dev_compiler/tool/input_sdk/private/annotations.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/annotations.dart b/pkg/dev_compiler/tool/input_sdk/private/annotations.dart
index 2e52c82508ee3d990a77a20240f9fff7f9afd18d..f900aec3112c5ce6ca223003002e9231014d84c8 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/annotations.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/annotations.dart
@@ -9,6 +9,25 @@ class ForceInline {
const ForceInline();
}
+/// Marks a variable or API to be non-nullable
+/// Currently unchecked
+/// TODO(leafp): Consider adding static checking and exposing
+/// this to user code.
+class NotNull {
+ const NotNull();
+}
+
+const notNull = const NotNull();
+
+/// Tells the development compiler to check a variable for null at its
+/// declaration point, and then to assume that the variable is non-null
+/// from that point forward.
+class NullCheck {
+ const NullCheck();
+}
+
+const nullCheck = const NullCheck();
+
/// Tells the optimizing compiler that the annotated method cannot throw.
/// Requires @NoInline() to function correctly.
class NoThrows {

Powered by Google App Engine
This is Rietveld 408576698