| library #lib; |
| import self as self; |
| import "dart:core" as core; |
| import "dart:nativewrappers" as nat; |
| import "dart:ffi" as ffi; |
| import "dart:_internal" as _in; |
| |
| import "dart:ffi"; |
| import "dart:nativewrappers"; |
| |
| class Classy extends core::Object { |
| synthetic constructor •() → self::Classy |
| : super core::Object::•() |
| ; |
| @#C6 |
| @#C8 |
| external static method returnIntPtrStatic(core::int x) → core::int; |
| } |
| class NativeClassy extends nat::NativeFieldWrapperClass1 { |
| synthetic constructor •() → self::NativeClassy |
| : super nat::NativeFieldWrapperClass1::•() |
| ; |
| @#C11 |
| @#C14 |
| method goodHasReceiverPointer(core::int v) → void |
| return block { |
| final nat::NativeFieldWrapperClass1 #t1 = this; |
| final core::int #t2 = v; |
| final void #t3 = self::NativeClassy::_goodHasReceiverPointer$Method$FfiNative(ffi::_fromAddress<ffi::Void>( block { |
| synthesized core::int #pointerAddress = nat::_getNativeField(#t1); |
| if(#pointerAddress.{core::Object::==}(#C15){(core::Object) → core::bool}) |
| core::StateError::_throwNew(#C16); |
| else |
| ; |
| } =>#pointerAddress), #t2); |
| _in::reachabilityFence(#t1); |
| } =>#t3; |
| @#C18 |
| @#C14 |
| method goodHasReceiverHandle(core::int v) → void |
| return self::NativeClassy::_goodHasReceiverHandle$Method$FfiNative(this, v); |
| @#C20 |
| @#C14 |
| method goodHasReceiverHandleAndPtr(self::NativeClassy v) → void |
| return block { |
| final self::NativeClassy #t4 = this; |
| final nat::NativeFieldWrapperClass1 #t5 = v; |
| final void #t6 = self::NativeClassy::_goodHasReceiverHandleAndPtr$Method$FfiNative(#t4, ffi::_fromAddress<ffi::Void>(nat::_getNativeField(#t5))); |
| _in::reachabilityFence(#t5); |
| } =>#t6; |
| @#C22 |
| @#C14 |
| method goodHasReceiverHandleAndHandle(self::NativeClassy v) → void |
| return self::NativeClassy::_goodHasReceiverHandleAndHandle$Method$FfiNative(this, v); |
| @#C24 |
| @#C14 |
| method goodHasReceiverPtrAndHandle(self::NativeClassy v) → void |
| return block { |
| final nat::NativeFieldWrapperClass1 #t7 = this; |
| final self::NativeClassy #t8 = v; |
| final void #t9 = self::NativeClassy::_goodHasReceiverPtrAndHandle$Method$FfiNative(ffi::_fromAddress<ffi::Void>( block { |
| synthesized core::int #pointerAddress = nat::_getNativeField(#t7); |
| if(#pointerAddress.{core::Object::==}(#C15){(core::Object) → core::bool}) |
| core::StateError::_throwNew(#C16); |
| else |
| ; |
| } =>#pointerAddress), #t8); |
| _in::reachabilityFence(#t7); |
| } =>#t9; |
| @#C26 |
| @#C14 |
| method meh(core::bool blah) → core::String? |
| return block { |
| final nat::NativeFieldWrapperClass1 #t10 = this; |
| final core::bool #t11 = blah; |
| final core::String? #t12 = _in::unsafeCast<core::String?>(self::NativeClassy::_meh$Method$FfiNative(ffi::_fromAddress<ffi::Void>( block { |
| synthesized core::int #pointerAddress = nat::_getNativeField(#t10); |
| if(#pointerAddress.{core::Object::==}(#C15){(core::Object) → core::bool}) |
| core::StateError::_throwNew(#C16); |
| else |
| ; |
| } =>#pointerAddress), #t11)); |
| _in::reachabilityFence(#t10); |
| } =>#t12; |
| @#C28 |
| @#C14 |
| method blah() → core::bool |
| return block { |
| final nat::NativeFieldWrapperClass1 #t13 = this; |
| final core::bool #t14 = self::NativeClassy::_blah$Method$FfiNative(ffi::_fromAddress<ffi::Void>( block { |
| synthesized core::int #pointerAddress = nat::_getNativeField(#t13); |
| if(#pointerAddress.{core::Object::==}(#C15){(core::Object) → core::bool}) |
| core::StateError::_throwNew(#C16); |
| else |
| ; |
| } =>#pointerAddress)); |
| _in::reachabilityFence(#t13); |
| } =>#t14; |
| @#C31 |
| @#C14 |
| get myField() → core::bool |
| return block { |
| final nat::NativeFieldWrapperClass1 #t15 = this; |
| final core::bool #t16 = self::NativeClassy::_myField$Getter$FfiNative(ffi::_fromAddress<ffi::Void>( block { |
| synthesized core::int #pointerAddress = nat::_getNativeField(#t15); |
| if(#pointerAddress.{core::Object::==}(#C15){(core::Object) → core::bool}) |
| core::StateError::_throwNew(#C16); |
| else |
| ; |
| } =>#pointerAddress)); |
| _in::reachabilityFence(#t15); |
| } =>#t16; |
| @#C33 |
| @#C14 |
| set myField(core::bool value) → void |
| return block { |
| final nat::NativeFieldWrapperClass1 #t17 = this; |
| final core::bool #t18 = value; |
| final void #t19 = self::NativeClassy::_myField$Setter$FfiNative(ffi::_fromAddress<ffi::Void>( block { |
| synthesized core::int #pointerAddress = nat::_getNativeField(#t17); |
| if(#pointerAddress.{core::Object::==}(#C15){(core::Object) → core::bool}) |
| core::StateError::_throwNew(#C16); |
| else |
| ; |
| } =>#pointerAddress), #t18); |
| _in::reachabilityFence(#t17); |
| } =>#t19; |
| @#C34 |
| external static method _goodHasReceiverPointer$Method$FfiNative(ffi::Pointer<ffi::Void> #t0, core::int #t1) → void; |
| @#C35 |
| external static method _goodHasReceiverHandle$Method$FfiNative(self::NativeClassy #t0, core::int #t1) → void; |
| @#C36 |
| external static method _goodHasReceiverHandleAndPtr$Method$FfiNative(self::NativeClassy #t0, ffi::Pointer<ffi::Void> #t1) → void; |
| @#C37 |
| external static method _goodHasReceiverHandleAndHandle$Method$FfiNative(self::NativeClassy #t0, self::NativeClassy #t1) → void; |
| @#C38 |
| external static method _goodHasReceiverPtrAndHandle$Method$FfiNative(ffi::Pointer<ffi::Void> #t0, self::NativeClassy #t1) → void; |
| @#C39 |
| external static method _meh$Method$FfiNative(ffi::Pointer<ffi::Void> #t0, core::bool #t1) → core::Object?; |
| @#C40 |
| external static method _blah$Method$FfiNative(ffi::Pointer<ffi::Void> #t0) → core::bool; |
| @#C41 |
| external static method _myField$Getter$FfiNative(ffi::Pointer<ffi::Void> #t0) → core::bool; |
| @#C42 |
| external static method _myField$Setter$FfiNative(ffi::Pointer<ffi::Void> #t0, core::bool #t1) → void; |
| } |
| @#C6 |
| @#C8 |
| external static method returnIntPtr(core::int x) → core::int; |
| @#C44 |
| @#C45 |
| external static method returnIntPtrLeaf(core::int x) → core::int; |
| @#C48 |
| @#C49 |
| external static method returnNativeIntPtrLeaf(core::int x) → core::int; |
| static method main() → void { |
| self::returnIntPtr(13); |
| self::returnIntPtrLeaf(37); |
| self::Classy::returnIntPtrStatic(222); |
| new self::NativeClassy::•().{self::NativeClassy::goodHasReceiverPointer}(175){(core::int) → void}; |
| new self::NativeClassy::•().{self::NativeClassy::goodHasReceiverHandle}(175){(core::int) → void}; |
| new self::NativeClassy::•().{self::NativeClassy::goodHasReceiverHandleAndPtr}(new self::NativeClassy::•()){(self::NativeClassy) → void}; |
| new self::NativeClassy::•().{self::NativeClassy::goodHasReceiverHandleAndHandle}(new self::NativeClassy::•()){(self::NativeClassy) → void}; |
| new self::NativeClassy::•().{self::NativeClassy::goodHasReceiverPtrAndHandle}(new self::NativeClassy::•()){(self::NativeClassy) → void}; |
| new self::NativeClassy::•().{self::NativeClassy::meh}(true){(core::bool) → core::String?}; |
| new self::NativeClassy::•().{self::NativeClassy::blah}(){() → core::bool}; |
| final core::bool b = new self::NativeClassy::•().{self::NativeClassy::myField}{core::bool}; |
| new self::NativeClassy::•().{self::NativeClassy::myField} = !b; |
| ffi::Native::_addressOf<ffi::NativeFunction<(ffi::IntPtr) → ffi::IntPtr>>(#C5); |
| } |
| constants { |
| #C1 = "cfe:ffi:native-marker" |
| #C2 = "ReturnIntPtr" |
| #C3 = "#lib" |
| #C4 = false |
| #C5 = ffi::Native<(ffi::IntPtr) → ffi::IntPtr> {symbol:#C2, assetId:#C3, isLeaf:#C4} |
| #C6 = core::pragma {name:#C1, options:#C5} |
| #C7 = "vm:ffi:native" |
| #C8 = core::pragma {name:#C7, options:#C5} |
| #C9 = "doesntmatter" |
| #C10 = ffi::Native<(ffi::Pointer<ffi::Void>, ffi::IntPtr) → ffi::Void> {symbol:#C9, assetId:#C3, isLeaf:#C4} |
| #C11 = core::pragma {name:#C1, options:#C10} |
| #C12 = "vm:prefer-inline" |
| #C13 = null |
| #C14 = core::pragma {name:#C12, options:#C13} |
| #C15 = 0 |
| #C16 = "A Dart object attempted to access a native peer, but the native peer has been collected (nullptr). This is usually the result of calling methods on a native-backed object when the native resources have already been disposed." |
| #C17 = ffi::Native<(ffi::Handle, ffi::IntPtr) → ffi::Void> {symbol:#C9, assetId:#C3, isLeaf:#C4} |
| #C18 = core::pragma {name:#C1, options:#C17} |
| #C19 = ffi::Native<(ffi::Handle, ffi::Pointer<ffi::Void>) → ffi::Void> {symbol:#C9, assetId:#C3, isLeaf:#C4} |
| #C20 = core::pragma {name:#C1, options:#C19} |
| #C21 = ffi::Native<(ffi::Handle, ffi::Handle) → ffi::Void> {symbol:#C9, assetId:#C3, isLeaf:#C4} |
| #C22 = core::pragma {name:#C1, options:#C21} |
| #C23 = ffi::Native<(ffi::Pointer<ffi::Void>, ffi::Handle) → ffi::Void> {symbol:#C9, assetId:#C3, isLeaf:#C4} |
| #C24 = core::pragma {name:#C1, options:#C23} |
| #C25 = ffi::Native<(ffi::Pointer<ffi::Void>, ffi::Bool) → ffi::Handle> {symbol:#C9, assetId:#C3, isLeaf:#C4} |
| #C26 = core::pragma {name:#C1, options:#C25} |
| #C27 = ffi::Native<(ffi::Pointer<ffi::Void>) → ffi::Bool> {symbol:#C9, assetId:#C3, isLeaf:#C4} |
| #C28 = core::pragma {name:#C1, options:#C27} |
| #C29 = true |
| #C30 = ffi::Native<(ffi::Pointer<ffi::Void>) → ffi::Bool> {symbol:#C9, assetId:#C3, isLeaf:#C29} |
| #C31 = core::pragma {name:#C1, options:#C30} |
| #C32 = ffi::Native<(ffi::Pointer<ffi::Void>, ffi::Bool) → ffi::Void> {symbol:#C9, assetId:#C3, isLeaf:#C29} |
| #C33 = core::pragma {name:#C1, options:#C32} |
| #C34 = core::pragma {name:#C7, options:#C10} |
| #C35 = core::pragma {name:#C7, options:#C17} |
| #C36 = core::pragma {name:#C7, options:#C19} |
| #C37 = core::pragma {name:#C7, options:#C21} |
| #C38 = core::pragma {name:#C7, options:#C23} |
| #C39 = core::pragma {name:#C7, options:#C25} |
| #C40 = core::pragma {name:#C7, options:#C27} |
| #C41 = core::pragma {name:#C7, options:#C30} |
| #C42 = core::pragma {name:#C7, options:#C32} |
| #C43 = ffi::Native<(ffi::IntPtr) → ffi::IntPtr> {symbol:#C2, assetId:#C3, isLeaf:#C29} |
| #C44 = core::pragma {name:#C1, options:#C43} |
| #C45 = core::pragma {name:#C7, options:#C43} |
| #C46 = "returnNativeIntPtrLeaf" |
| #C47 = ffi::Native<(ffi::IntPtr) → ffi::IntPtr> {symbol:#C46, assetId:#C3, isLeaf:#C29} |
| #C48 = core::pragma {name:#C1, options:#C47} |
| #C49 = core::pragma {name:#C7, options:#C47} |
| } |