mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 08:41:10 +00:00
Remove obsolete internal dart2js annotations
These annotations have all been replaced with @pragma('dart2js:xxx') versions: @ForceInline, @NoInline, @NoThrows, @NoSideEffects, @AssumeDynamic. Change-Id: Ia4730670c6864ccbe0fa4120108c3c16ab887c23 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208863 Reviewed-by: Sigmund Cherem <sigmund@google.com> Commit-Queue: Stephen Adams <sra@google.com>
This commit is contained in:
parent
dcec1aca37
commit
5ff2459d88
|
@ -265,15 +265,15 @@ abstract class AnnotationsData {
|
|||
/// Serializes this [AnnotationsData] to [sink].
|
||||
void writeToDataSink(DataSink sink);
|
||||
|
||||
/// Returns `true` if [member] has an `@pragma('dart2js:assumeDynamic')` annotation.
|
||||
/// Returns `true` if [member] has an `@pragma('dart2js:assumeDynamic')`
|
||||
/// annotation.
|
||||
bool hasAssumeDynamic(MemberEntity member);
|
||||
|
||||
/// Returns `true` if [member] has a `@pragma('dart2js:noInline')`, or
|
||||
/// `@pragma('dart2js:noInline')` annotation.
|
||||
/// Returns `true` if [member] has a `@pragma('dart2js:noInline')` annotation.
|
||||
bool hasNoInline(MemberEntity member);
|
||||
|
||||
/// Returns `true` if [member] has a `@pragma('dart2js:tryInline')`, or
|
||||
/// `@pragma('dart2js:tryInline')` annotation.
|
||||
/// Returns `true` if [member] has a `@pragma('dart2js:tryInline')`
|
||||
/// annotation.
|
||||
bool hasTryInline(MemberEntity member);
|
||||
|
||||
/// Returns `true` if [member] has a `@pragma('dart2js:disableFinal')`
|
||||
|
@ -284,18 +284,19 @@ abstract class AnnotationsData {
|
|||
/// annotation.
|
||||
bool hasNoElision(MemberEntity member);
|
||||
|
||||
/// Returns `true` if [member] has a `@NoThrows()` annotation.
|
||||
/// Returns `true` if [member] has a `@pragma('dart2js:noThrows')` annotation.
|
||||
bool hasNoThrows(MemberEntity member);
|
||||
|
||||
/// Returns `true` if [member] has a `@NoSideEffects()` annotation.
|
||||
/// Returns `true` if [member] has a `@pragma('dart2js:noSideEffects')`
|
||||
/// annotation.
|
||||
bool hasNoSideEffects(MemberEntity member);
|
||||
|
||||
/// Calls [f] for all functions with a `@pragma('dart2js:noInline')`, or
|
||||
/// `@pragma('dart2js:noInline')` annotation.
|
||||
/// Calls [f] for all functions with a `@pragma('dart2js:noInline')`
|
||||
/// annotation.
|
||||
void forEachNoInline(void f(FunctionEntity function));
|
||||
|
||||
/// Calls [f] for all functions with a `@pragma('dart2js:tryInline')`, or
|
||||
/// `@pragma('dart2js:tryInline')` annotation.
|
||||
/// Calls [f] for all functions with a `@pragma('dart2js:tryInline')`
|
||||
/// annotation.
|
||||
void forEachTryInline(void f(FunctionEntity function));
|
||||
|
||||
/// Calls [f] for all functions with a `@pragma('dart2js:noThrows')`
|
||||
|
|
|
@ -8,9 +8,6 @@ import 'dart:_runtime' as dart;
|
|||
import 'dart:_interceptors' show JSArray;
|
||||
import 'dart:_js_helper'
|
||||
show
|
||||
NoInline,
|
||||
NoSideEffects,
|
||||
NoThrows,
|
||||
patch,
|
||||
LinkedMap,
|
||||
IdentityMap,
|
||||
|
|
|
@ -12,7 +12,6 @@ import 'dart:_js_helper'
|
|||
getRuntimeType,
|
||||
LinkedMap,
|
||||
JSSyntaxRegExp,
|
||||
NoInline,
|
||||
notNull,
|
||||
nullCheck,
|
||||
Primitives,
|
||||
|
@ -903,7 +902,6 @@ class _Uri {
|
|||
@patch
|
||||
class StackTrace {
|
||||
@patch
|
||||
@NoInline()
|
||||
static StackTrace get current {
|
||||
return dart.stackTrace(JS('', 'Error()'));
|
||||
}
|
||||
|
|
|
@ -59,17 +59,6 @@ class _Undefined {
|
|||
/// 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;
|
||||
|
|
|
@ -479,7 +479,6 @@ class Primitives {
|
|||
* Diagnoses an indexing error. Returns the ArgumentError or RangeError that
|
||||
* describes the problem.
|
||||
*/
|
||||
@NoInline()
|
||||
Error diagnoseIndexError(indexable, int index) {
|
||||
int length = indexable.length;
|
||||
// The following returns the same error that would be thrown by calling
|
||||
|
@ -495,7 +494,6 @@ Error diagnoseIndexError(indexable, int index) {
|
|||
* Diagnoses a range error. Returns the ArgumentError or RangeError that
|
||||
* describes the problem.
|
||||
*/
|
||||
@NoInline()
|
||||
Error diagnoseRangeError(int? start, int? end, int length) {
|
||||
if (start == null) {
|
||||
return ArgumentError.value(start, 'start');
|
||||
|
@ -517,7 +515,6 @@ int stringLastIndexOfUnchecked(receiver, element, start) =>
|
|||
JS<int>('!', r'#.lastIndexOf(#, #)', receiver, element, start);
|
||||
|
||||
/// 'factory' for constructing ArgumentError.value to keep the call sites small.
|
||||
@NoInline()
|
||||
ArgumentError argumentErrorValue(object) {
|
||||
return ArgumentError.value(object);
|
||||
}
|
||||
|
@ -539,7 +536,6 @@ throwAbstractClassInstantiationError(className) {
|
|||
throw AbstractClassInstantiationError(className);
|
||||
}
|
||||
|
||||
@NoInline()
|
||||
throwConcurrentModificationError(collection) {
|
||||
throw ConcurrentModificationError(collection);
|
||||
}
|
||||
|
|
|
@ -9,9 +9,6 @@ import 'dart:_js_helper'
|
|||
fillLiteralMap,
|
||||
fillLiteralSet,
|
||||
InternalMap,
|
||||
NoInline,
|
||||
NoSideEffects,
|
||||
NoThrows,
|
||||
patch,
|
||||
JsLinkedHashMap,
|
||||
LinkedHashMapCell,
|
||||
|
|
|
@ -17,7 +17,6 @@ import 'dart:_js_helper'
|
|||
JsLinkedHashMap,
|
||||
jsonEncodeNative,
|
||||
JSSyntaxRegExp,
|
||||
NoInline,
|
||||
objectHashCode,
|
||||
patch,
|
||||
Primitives,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
// Patch file for dart:developer library.
|
||||
|
||||
import 'dart:_js_helper' show patch, ForceInline;
|
||||
import 'dart:_js_helper' show patch;
|
||||
import 'dart:_foreign_helper' show JS;
|
||||
import 'dart:async' show Zone;
|
||||
import 'dart:isolate';
|
||||
|
|
|
@ -40,8 +40,7 @@ import 'dart:_js_helper'
|
|||
throwConcurrentModificationError,
|
||||
lookupAndCacheInterceptor,
|
||||
StringMatch,
|
||||
firstMatchAfter,
|
||||
NoInline;
|
||||
firstMatchAfter;
|
||||
|
||||
import 'dart:_foreign_helper'
|
||||
show
|
||||
|
|
|
@ -50,7 +50,6 @@ import 'dart:_js_helper'
|
|||
JSName,
|
||||
Native,
|
||||
Returns,
|
||||
ForceInline,
|
||||
findDispatchTagForInterceptorClass,
|
||||
setNativeSubclassDispatchRecord,
|
||||
makeLeafDispatchRecord,
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
import 'package:expect/minitest.dart';
|
||||
|
||||
import 'package:expect/expect.dart' show NoInline, AssumeDynamic;
|
||||
|
||||
import 'js_dispatch_property_test_lib.dart';
|
||||
|
||||
@pragma('dart2js:noInline')
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
@JS()
|
||||
library util;
|
||||
|
||||
import 'package:expect/expect.dart' show NoInline, AssumeDynamic;
|
||||
import 'package:js/js.dart';
|
||||
|
||||
@JS()
|
||||
|
|
|
@ -7,7 +7,6 @@ library js_typed_interop_callable_object_test;
|
|||
|
||||
import 'dart:html';
|
||||
|
||||
import 'package:expect/expect.dart' show NoInline, AssumeDynamic;
|
||||
import 'package:js/js.dart';
|
||||
import 'package:expect/minitest.dart';
|
||||
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
import 'package:expect/minitest.dart';
|
||||
|
||||
import 'package:expect/expect.dart' show NoInline, AssumeDynamic;
|
||||
|
||||
import 'js_dispatch_property_test_lib.dart';
|
||||
|
||||
@pragma('dart2js:noInline')
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
@JS()
|
||||
library util;
|
||||
|
||||
import 'package:expect/expect.dart' show NoInline, AssumeDynamic;
|
||||
import 'package:js/js.dart';
|
||||
|
||||
@JS()
|
||||
|
|
|
@ -9,7 +9,6 @@ library js_typed_interop_callable_object_test;
|
|||
|
||||
import 'dart:html';
|
||||
|
||||
import 'package:expect/expect.dart' show NoInline, AssumeDynamic;
|
||||
import 'package:js/js.dart';
|
||||
import 'package:expect/minitest.dart';
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import 'package:expect/expect.dart';
|
|||
class B extends A {}
|
||||
|
||||
/// If the check `y is A` is generated as `y.$isA` then the issue is not
|
||||
/// exposed. We use `AssumeDynamic` to ensure that we generate as `y instanceof
|
||||
/// exposed. We use `assumeDynamic` to ensure that we generate as `y instanceof
|
||||
/// A` in JS.
|
||||
@pragma('dart2js:noInline')
|
||||
@pragma('dart2js:assumeDynamic')
|
||||
|
|
|
@ -246,10 +246,6 @@ const Map<String, String> DEFAULT_JS_HELPER_LIBRARY = const <String, String>{
|
|||
'listTypeCheck': 'listTypeCheck(value) {}',
|
||||
'makeLiteralMap': 'makeLiteralMap(List keyValuePairs) {}',
|
||||
'Native': 'class Native {}',
|
||||
'NoInline': 'class NoInline {}',
|
||||
'ForceInline': 'class ForceInline {}',
|
||||
'NoSideEffects': 'class NoSideEffects {}',
|
||||
'NoThrows': 'class NoThrows {}',
|
||||
'numberOrStringSuperNativeTypeCast':
|
||||
'numberOrStringSuperNativeTypeCast(value) {}',
|
||||
'numberOrStringSuperNativeTypeCheck':
|
||||
|
|
|
@ -4,6 +4,4 @@
|
|||
|
||||
library compiler_test_internals;
|
||||
|
||||
export 'dart:_js_helper' show NoSideEffects, NoThrows, NoInline;
|
||||
|
||||
export 'dart:_foreign_helper' show JS;
|
||||
|
|
|
@ -18,7 +18,7 @@ import 'package:expect/expect.dart';
|
|||
class B extends A {}
|
||||
|
||||
/// If the check `y is A` is generated as `y.$isA` then the issue is not
|
||||
/// exposed. We use `AssumeDynamic` to ensure that we generate as `y instanceof
|
||||
/// exposed. We use `assumeDynamic` to ensure that we generate as `y instanceof
|
||||
/// A` in JS.
|
||||
@pragma('dart2js:noInline')
|
||||
@pragma('dart2js:assumeDynamic')
|
||||
|
|
|
@ -218,10 +218,6 @@ const Map<String, String> DEFAULT_JS_HELPER_LIBRARY = const <String, String>{
|
|||
}''',
|
||||
'makeLiteralMap': 'makeLiteralMap(List keyValuePairs) {}',
|
||||
'Native': 'class Native {}',
|
||||
'NoInline': 'class NoInline {}',
|
||||
'ForceInline': 'class ForceInline {}',
|
||||
'NoSideEffects': 'class NoSideEffects {}',
|
||||
'NoThrows': 'class NoThrows {}',
|
||||
'_Patch': 'class _Patch { final tag; const _Patch(this.tag); }',
|
||||
'patch': 'const patch = const _Patch(null);',
|
||||
'patch_full': 'const patch_full = const _Patch("full");',
|
||||
|
|
|
@ -6,6 +6,4 @@
|
|||
|
||||
library compiler_test_internals;
|
||||
|
||||
export 'dart:_js_helper' show NoSideEffects, NoThrows, NoInline;
|
||||
|
||||
export 'dart:_foreign_helper' show JS;
|
||||
|
|
|
@ -42,7 +42,7 @@ import 'dart:web_gl' show RenderingContext,RenderingContext2;
|
|||
import 'dart:web_sql';
|
||||
import 'dart:_js_helper' show
|
||||
convertDartClosureToJS, Creates, JavaScriptIndexingBehavior,
|
||||
JSName, Native, Returns, ForceInline,
|
||||
JSName, Native, Returns,
|
||||
findDispatchTagForInterceptorClass, setNativeSubclassDispatchRecord,
|
||||
makeLeafDispatchRecord, registerGlobalObject, applyExtension;
|
||||
import 'dart:_interceptors' show
|
||||
|
|
Loading…
Reference in a new issue