Files
sdk/pkg/dev_compiler/tool/input_sdk/private/annotations.dart
T
G?nter Z?chbauer 2da0b9f4f1 fix some typos
Closes #34738
https://github.com/dart-lang/sdk/pull/34738

GitOrigin-RevId: d211bbacfe65355cf7304c990ffb6c79d7a229cf
Change-Id: If690e6d378e543b300e1f6a353ceae73e39c29db
Reviewed-on: https://dart-review.googlesource.com/c/78900
Reviewed-by: Alexander Thomas <athom@google.com>
2018-10-10 19:15:30 +00:00

84 lines
2.5 KiB
Dart

// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
part of dart._js_helper;
/// Tells the optimizing compiler to always inline the annotated method.
class ForceInline {
const ForceInline();
}
class _NotNull {
const _NotNull();
}
/// Marks a variable or API to be non-nullable.
/// ****CAUTION******
/// This is currently unchecked, and hence should never be used
/// on any public interface where user code could subclass, implement,
/// or otherwise cause the contract to be violated.
/// TODO(leafp): Consider adding static checking and exposing
/// this to user code.
const notNull = _NotNull();
/// Marks a generic function or static method API to be not reified.
/// ****CAUTION******
/// This is currently unchecked, and hence should be used very carefully for
/// internal SDK APIs only.
class NoReifyGeneric {
const NoReifyGeneric();
}
/// Enables/disables reification of functions within the body of this function.
/// ****CAUTION******
/// This is currently unchecked, and hence should be used very carefully for
/// internal SDK APIs only.
class ReifyFunctionTypes {
final bool value;
const ReifyFunctionTypes(this.value);
}
class _NullCheck {
const _NullCheck();
}
/// 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.
/// ****CAUTION******
/// This is currently unchecked, and hence will not catch re-assignments
/// of a variable with null
const nullCheck = _NullCheck();
/// Tells the optimizing compiler that the annotated method cannot throw.
/// Requires @NoInline() to function correctly.
class NoThrows {
const NoThrows();
}
/// Tells the optimizing compiler to not inline the annotated method.
class NoInline {
const NoInline();
}
/// Marks a class as native and defines its JavaScript name(s).
class Native {
final String name;
const Native(this.name);
}
class JsPeerInterface {
/// The JavaScript type that we should match the API of.
/// Used for classes where Dart subclasses should be callable from JavaScript
/// matching the JavaScript calling conventions.
final String name;
const JsPeerInterface({this.name});
}
/// A Dart interface may only be implemented by a native JavaScript object
/// if it is marked with this annotation.
class SupportJsExtensionMethods {
const SupportJsExtensionMethods();
}