mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:07:06 +00:00
[vm] Remove of old native syntax in VM corelib implementations
Issue https://github.com/dart-lang/sdk/issues/28791 TEST=ci Change-Id: I37ff9eaada17484a5fef4f97ec3bdcf83edf6f36 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229962 Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>
This commit is contained in:
parent
ae38d892b3
commit
3b2b126f60
|
@ -648,6 +648,13 @@ ObjectPtr KernelLoader::LoadProgram(bool process_pending_classes) {
|
|||
}
|
||||
}
|
||||
|
||||
// Ensure that `ExternalName` and `pragma` classes are looked up before we
|
||||
// install the constants table: Once the constants table is installed
|
||||
// finalization of classes will eagerly want to evaluate constants and doing
|
||||
// so will require those two classes to be available.
|
||||
EnsureExternalClassIsLookedUp();
|
||||
EnsurePragmaClassIsLookedUp();
|
||||
|
||||
// Sets the constants array to an empty array with the length equal to
|
||||
// the number of constants. The array gets filled lazily while reading
|
||||
// constants.
|
||||
|
|
|
@ -2704,8 +2704,9 @@ class _ResourceHandleImpl implements ResourceHandle {
|
|||
|
||||
@patch
|
||||
class SocketControlMessage {
|
||||
factory SocketControlMessage.fromHandles(List<ResourceHandle> handles)
|
||||
native "SocketControlMessage_fromHandles";
|
||||
@pragma("vm:external-name", "SocketControlMessage_fromHandles")
|
||||
external factory SocketControlMessage.fromHandles(
|
||||
List<ResourceHandle> handles);
|
||||
}
|
||||
|
||||
@pragma("vm:entry-point")
|
||||
|
|
|
@ -130,19 +130,21 @@ abstract class _HashVMImmutableBase extends _HashVMBase
|
|||
@pragma("vm:recognized", "other")
|
||||
@pragma("vm:exact-result-type", "dart:core#_ImmutableList")
|
||||
@pragma("vm:prefer-inline")
|
||||
List<Object?> get _data native "ImmutableLinkedHashBase_getData";
|
||||
@pragma("vm:external-name", "ImmutableLinkedHashBase_getData")
|
||||
external List<Object?> get _data;
|
||||
|
||||
// The index is nullable rather than not nullable.
|
||||
@pragma("vm:recognized", "other")
|
||||
@pragma("vm:prefer-inline")
|
||||
Uint32List? get _indexNullable native "ImmutableLinkedHashBase_getIndex";
|
||||
@pragma("vm:external-name", "ImmutableLinkedHashBase_getIndex")
|
||||
external Uint32List? get _indexNullable;
|
||||
Uint32List get _index => _indexNullable!;
|
||||
|
||||
// Uses store-release atomic.
|
||||
@pragma("vm:recognized", "other")
|
||||
@pragma("vm:prefer-inline")
|
||||
void set _index(Uint32List value)
|
||||
native "ImmutableLinkedHashBase_setIndexStoreRelease";
|
||||
@pragma("vm:external-name", "ImmutableLinkedHashBase_setIndexStoreRelease")
|
||||
external void set _index(Uint32List value);
|
||||
}
|
||||
|
||||
// This mixin can be applied to _HashFieldBase or _HashVMBase (for
|
||||
|
|
|
@ -105,7 +105,9 @@ class CodeUnits extends UnmodifiableListBase<int> {
|
|||
///
|
||||
/// On a library, it provides a Uri that can be used to locate the native
|
||||
/// library's implementation.
|
||||
@pragma('vm:entry-point')
|
||||
class ExternalName {
|
||||
@pragma('vm:entry-point')
|
||||
final String name;
|
||||
const ExternalName(this.name);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue