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