mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
[io/unix-domain-sockets] Ensure runtime-looked up entry points are marked as such.
This is needed to ensure that entry points looked from native code are preserved, not tree-shaken. This is follow-up to https://dart.googlesource.com/sdk/+/935ee25f3b72e7fe81047220cadae1f61c505da4 Fixes https://github.com/dart-lang/sdk/issues/47416 TEST=unix_socket_test on dartkp bots Change-Id: I5cf3071507947b1c24b2808e46dc92186e4b9476 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216062 Commit-Queue: Alexander Aprelev <aam@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
This commit is contained in:
parent
47f9067cad
commit
e270bbe95c
|
@ -22,6 +22,6 @@ class Class extends core::Object {
|
|||
synthetic constructor •() → self::Class
|
||||
: super core::Object::•()
|
||||
;
|
||||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3261,getterSelectorId:3262] method method([@vm.inferred-type.metadata=dart.core::Null? (value: null)] self::Enum e) → core::int
|
||||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3266,getterSelectorId:3267] method method([@vm.inferred-type.metadata=dart.core::Null? (value: null)] self::Enum e) → core::int
|
||||
return [@vm.inferred-type.metadata=!] e.{core::_Enum::index}{core::int};
|
||||
}
|
||||
|
|
|
@ -51,6 +51,6 @@ class ConstClass extends core::Object {
|
|||
synthetic constructor •() → self::ConstClass
|
||||
: super core::Object::•()
|
||||
;
|
||||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3265,getterSelectorId:3266] method method([@vm.inferred-type.metadata=dart.core::Null? (value: null)] self::ConstEnum e) → core::int
|
||||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3270,getterSelectorId:3271] method method([@vm.inferred-type.metadata=dart.core::Null? (value: null)] self::ConstEnum e) → core::int
|
||||
return [@vm.inferred-type.metadata=!] e.{core::_Enum::index}{core::int};
|
||||
}
|
||||
|
|
|
@ -2545,7 +2545,9 @@ class ResourceHandle {
|
|||
|
||||
@pragma("vm:entry-point")
|
||||
class _ResourceHandleImpl implements ResourceHandle {
|
||||
@pragma("vm:entry-point")
|
||||
int _handle; // file descriptor on linux
|
||||
@pragma("vm:entry-point")
|
||||
_ResourceHandleImpl(this._handle);
|
||||
|
||||
@pragma("vm:external-name", "ResourceHandleImpl_toFile")
|
||||
|
@ -2572,6 +2574,7 @@ class _ResourceHandleImpl implements ResourceHandle {
|
|||
@pragma("vm:external-name", "ResourceHandleImpl_toRawDatagramSocket")
|
||||
external RawDatagramSocket toRawDatagramSocket();
|
||||
|
||||
@pragma("vm:entry-point")
|
||||
static final _ResourceHandleImpl _sentinel = _ResourceHandleImpl(-1);
|
||||
}
|
||||
|
||||
|
@ -2581,11 +2584,16 @@ class SocketControlMessage {
|
|||
native "SocketControlMessage_fromHandles";
|
||||
}
|
||||
|
||||
@pragma("vm:entry-point")
|
||||
class _SocketControlMessageImpl implements SocketControlMessage {
|
||||
@pragma("vm:entry-point")
|
||||
final int level;
|
||||
@pragma("vm:entry-point")
|
||||
final int type;
|
||||
@pragma("vm:entry-point")
|
||||
final Uint8List data;
|
||||
|
||||
@pragma("vm:entry-point")
|
||||
_SocketControlMessageImpl(this.level, this.type, this.data);
|
||||
|
||||
@pragma("vm:external-name", "SocketControlMessageImpl_extractHandles")
|
||||
|
|
|
@ -662,6 +662,7 @@ abstract class _RandomAccessFileOps {
|
|||
lock(int lock, int start, int end);
|
||||
}
|
||||
|
||||
@pragma("vm:entry-point")
|
||||
class _RandomAccessFile implements RandomAccessFile {
|
||||
static bool _connectedResourceHandler = false;
|
||||
|
||||
|
@ -672,6 +673,7 @@ class _RandomAccessFile implements RandomAccessFile {
|
|||
late _FileResourceInfo _resourceInfo;
|
||||
_RandomAccessFileOps _ops;
|
||||
|
||||
@pragma("vm:entry-point")
|
||||
_RandomAccessFile(int pointer, this.path)
|
||||
: _ops = new _RandomAccessFileOps(pointer) {
|
||||
_resourceInfo = new _FileResourceInfo(this);
|
||||
|
|
Loading…
Reference in a new issue