mirror of
https://github.com/dart-lang/sdk
synced 2024-10-04 20:29:39 +00:00
[vm/ffi] Add _Compound
_offsetInBytes
field
This CL changes compounds (structs, unions, and arrays) to be backed by a TypedDataBase and an int offset. Before this CL, the compounds where only backed by a TypedDataBase. This leads to the following issues: 1. Access to nested structs required code for allocating new typed data views or pointers, which the optimizer then had to prevent from being allocated after inlining. 2. Runtime branching on whether the TypedDataBase was a Pointer or TypedData increased code size and prevented inlining. https://github.com/dart-lang/sdk/issues/54892 This could not be properly optimized if in AOT both typed data and pointer were flowing into the same compound. 3. Constructing TypedData views required calculating the length of the view. After this CL, accessing nested compounds will lead to accesses on the original TypedDataBase with an extra offset. This removes the polymorphism on TypedData vs Pointer, because the final int/float/Pointer accesses in nested compounds operate on TypedDataBase. Also, it simplifies creating an `offsetBy` accessor, because it will no longer have to be polymorphic in typed data vs pointer, nor will it have to calculate the length of the field. Implementation details: * The changes in the CFE and patch files are straightforward. * VM: Struct-by-value returns (or callback params) are initialized with an offsetInBytes of 0. * VM: Struct-by-value arguments (and callback return) need to read out the offsetInBytes. Before this CL we were passing in the TypedData as tagged value. With this CL we are passing the TypedData as tagged value and the offset as unboxed int, from 1 IL input to 2 IL inputs. (The alternative would have been to take the compound as a tagged value, but that would have prevented optimizations from not allocating the compound object in the optimizer. The FfiCallInstr is updated to have two definitions for the case where we were passing in the TypedData previously. The NativeReturnInstr is refactored to be able to take two inputs instead of 1. (Note that we don't have VariadicInstr only VariadicDefinition in the code base. So the instruction is _not_ implemented as variadic, rather as having a fixed length of 2.) * dart2wasm does no longer support nested compounds due to the compound implementation only storing a pointer address. https://github.com/dart-lang/sdk/issues/55083 Intending to land this after https://dart-review.googlesource.com/c/sdk/+/353101. TEST=test/ffi CoreLibraryReviewExempt: VM and WASM-only implementation change. Closes: https://github.com/dart-lang/sdk/issues/54892 Bug: https://github.com/dart-lang/sdk/issues/44589 Change-Id: I8749e21094bf8fa2d5ff1e48b6b002c375232eb5 Cq-Include-Trybots: dart-internal/g3.dart-internal.try:g3-cbuild-try Cq-Include-Trybots: dart/try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64-try,vm-aot-win-debug-x64c-try,vm-appjit-linux-debug-x64-try,vm-asan-linux-release-x64-try,vm-checked-mac-release-arm64-try,vm-eager-optimization-linux-release-ia32-try,vm-eager-optimization-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-msan-linux-release-x64-try,vm-reload-linux-debug-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-ubsan-linux-release-x64-try,vm-win-debug-arm64-try,vm-win-debug-x64-try,vm-win-debug-x64c-try,vm-win-release-ia32-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354226 Reviewed-by: Tess Strickland <sstrickl@google.com>
This commit is contained in:
parent
8df8de82b3
commit
0bcb0c934d
|
@ -257,7 +257,7 @@ class WasmFfiNativeTransformer extends FfiNativeTransformer {
|
|||
StaticInvocation(wasmF32FromDouble, Arguments([expr])),
|
||||
NativeType.kDouble =>
|
||||
StaticInvocation(wasmF64FromDouble, Arguments([expr])),
|
||||
NativeType.kPointer || NativeType.kStruct => expr,
|
||||
NativeType.kPointer => expr,
|
||||
NativeType.kBool => StaticInvocation(wasmI32FromBool, Arguments([expr])),
|
||||
NativeType.kVoid => null,
|
||||
_ => throw '_dartValueToFfiValue: $abiTypeNativeType cannot be converted'
|
||||
|
@ -297,7 +297,6 @@ class WasmFfiNativeTransformer extends FfiNativeTransformer {
|
|||
|
||||
case NativeType.kPointer:
|
||||
case NativeType.kVoid:
|
||||
case NativeType.kStruct:
|
||||
return expr;
|
||||
|
||||
case NativeType.kUint64:
|
||||
|
@ -319,6 +318,7 @@ class WasmFfiNativeTransformer extends FfiNativeTransformer {
|
|||
case NativeType.kNativeInteger:
|
||||
case NativeType.kNativeType:
|
||||
case NativeType.kOpaque:
|
||||
case NativeType.kStruct:
|
||||
throw '_ffiValueToDartValue: $nativeType cannot be converted';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -187,10 +187,21 @@ class Intrinsifier {
|
|||
// A compound (subclass of Struct or Union) is represented by its i32
|
||||
// address. The _typedDataBase field contains a Pointer pointing to the
|
||||
// compound, whose representation is the same.
|
||||
// TODO(https://dartbug.com/55083): Implement structs backed by TypedData.
|
||||
codeGen.wrap(receiver, w.NumType.i32);
|
||||
return w.NumType.i32;
|
||||
}
|
||||
|
||||
// _Compound._offsetInBytes
|
||||
if (cls == translator.ffiCompoundClass && name == '_offsetInBytes') {
|
||||
// A compound (subclass of Struct or Union) is represented by its i32
|
||||
// address. The _offsetInBytes field contains is always 0.
|
||||
// This also breaks nested structs, which are currently not used.
|
||||
// TODO(https://dartbug.com/55083): Implement structs backed by TypedData.
|
||||
b.i64_const(0);
|
||||
return w.NumType.i64;
|
||||
}
|
||||
|
||||
// Pointer.address
|
||||
if (cls == translator.ffiPointerClass && name == 'address') {
|
||||
// A Pointer is represented by its i32 address.
|
||||
|
|
|
@ -13,18 +13,18 @@ final class Struct1ByteInt extends ffi::Struct {
|
|||
synthetic constructor •() → self::Struct1ByteInt
|
||||
: super ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::Struct1ByteInt
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Struct1ByteInt
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Struct1ByteInt
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C7
|
||||
get a0() → core::int
|
||||
return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Struct1ByteInt::a0#offsetOf);
|
||||
return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Struct1ByteInt::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C7
|
||||
set a0(synthesized core::int #externalFieldValue) → void
|
||||
return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Struct1ByteInt::a0#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Struct1ByteInt::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
@#C9
|
||||
static get a0#offsetOf() → core::int
|
||||
return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
|
@ -39,7 +39,7 @@ static method notMain() → void {
|
|||
@#C9
|
||||
static method /* from org-dartlang-testcase:///ffi_external_in_part_lib.dart */ returnStruct1ByteIntNative(core::int a0) → self::Struct1ByteInt
|
||||
return block {
|
||||
_in::_nativeEffect(new self::Struct1ByteInt::#fromTypedDataBase(typ::Uint8List::•(#C12)));
|
||||
_in::_nativeEffect(new self::Struct1ByteInt::#fromTypedDataBase(typ::Uint8List::•(#C12), #C10));
|
||||
} =>self::_returnStruct1ByteIntNative$Method$FfiNative(a0);
|
||||
@#C21
|
||||
external static method /* from org-dartlang-testcase:///ffi_external_in_part_lib.dart */ _returnStruct1ByteIntNative$Method$FfiNative(core::int #t0) → self::Struct1ByteInt;
|
||||
|
@ -70,7 +70,7 @@ constants {
|
|||
|
||||
Extra constant evaluation status:
|
||||
Evaluated: InstanceInvocation @ org-dartlang-testcase:///ffi_external_in_part_file.dart:11:36 -> IntConstant(-1)
|
||||
Extra constant evaluation: evaluated: 26, effectively constant: 1
|
||||
Extra constant evaluation: evaluated: 33, effectively constant: 1
|
||||
|
||||
|
||||
Constructor coverage from constants:
|
||||
|
|
|
@ -13,18 +13,18 @@ final class Struct1ByteInt extends ffi::Struct {
|
|||
synthetic constructor •() → self::Struct1ByteInt
|
||||
: super ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::Struct1ByteInt
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Struct1ByteInt
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Struct1ByteInt
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C7
|
||||
get a0() → core::int
|
||||
return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Struct1ByteInt::a0#offsetOf);
|
||||
return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Struct1ByteInt::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C7
|
||||
set a0(synthesized core::int #externalFieldValue) → void
|
||||
return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Struct1ByteInt::a0#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Struct1ByteInt::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
@#C9
|
||||
static get a0#offsetOf() → core::int
|
||||
return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
|
@ -39,7 +39,7 @@ static method notMain() → void {
|
|||
@#C9
|
||||
static method /* from org-dartlang-testcase:///ffi_external_in_part_lib.dart */ returnStruct1ByteIntNative(core::int a0) → self::Struct1ByteInt
|
||||
return block {
|
||||
_in::_nativeEffect(new self::Struct1ByteInt::#fromTypedDataBase(typ::Uint8List::•(#C12)));
|
||||
_in::_nativeEffect(new self::Struct1ByteInt::#fromTypedDataBase(typ::Uint8List::•(#C12), #C10));
|
||||
} =>self::_returnStruct1ByteIntNative$Method$FfiNative(a0);
|
||||
@#C21
|
||||
external static method /* from org-dartlang-testcase:///ffi_external_in_part_lib.dart */ _returnStruct1ByteIntNative$Method$FfiNative(core::int #t0) → self::Struct1ByteInt;
|
||||
|
@ -70,7 +70,7 @@ constants {
|
|||
|
||||
Extra constant evaluation status:
|
||||
Evaluated: InstanceInvocation @ org-dartlang-testcase:///ffi_external_in_part_file.dart:11:36 -> IntConstant(-1)
|
||||
Extra constant evaluation: evaluated: 26, effectively constant: 1
|
||||
Extra constant evaluation: evaluated: 33, effectively constant: 1
|
||||
|
||||
|
||||
Constructor coverage from constants:
|
||||
|
|
|
@ -28,6 +28,7 @@ class Coordinate extends ffi::Struct {
|
|||
}
|
||||
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
|
||||
abstract member-signature get _typedDataBase() → core::Object*; -> ffi::_Compound::_typedDataBase
|
||||
abstract member-signature get _offsetInBytes() → core::int*; -> ffi::_Compound::_offsetInBytes
|
||||
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
|
||||
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
|
||||
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
|
||||
|
|
|
@ -16,14 +16,14 @@ import "package:ffi/ffi.dart";
|
|||
|
||||
@#C7
|
||||
class Coordinate extends ffi::Struct {
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
static factory allocate(ffi::Allocator* allocator, core::double* x, core::double* y, ffi::Pointer<self::Coordinate*>* next) → self::Coordinate* {
|
||||
return let final self::Coordinate* #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate*>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate*>}!) in block {
|
||||
return let final self::Coordinate* #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate*>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate*>}!, #C8) in block {
|
||||
#t1.{self::Coordinate::x} = x;
|
||||
#t1.{self::Coordinate::y} = y;
|
||||
#t1.{self::Coordinate::next} = next;
|
||||
|
@ -31,6 +31,7 @@ class Coordinate extends ffi::Struct {
|
|||
}
|
||||
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
|
||||
abstract member-signature get _typedDataBase() → core::Object*; -> ffi::_Compound::_typedDataBase
|
||||
abstract member-signature get _offsetInBytes() → core::int*; -> ffi::_Compound::_offsetInBytes
|
||||
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
|
||||
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
|
||||
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
|
||||
|
@ -40,30 +41,30 @@ class Coordinate extends ffi::Struct {
|
|||
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
|
||||
abstract member-signature method toString() → core::String*; -> core::Object::toString
|
||||
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
|
||||
@#C9
|
||||
@#C10
|
||||
static get /*isNonNullableByDefault*/ x#offsetOf() → core::int
|
||||
return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C12
|
||||
get x() → core::double*
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf);
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
set x(synthesized core::double* #v) → void
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf, #v);
|
||||
@#C9
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #v);
|
||||
@#C10
|
||||
static get /*isNonNullableByDefault*/ y#offsetOf() → core::int
|
||||
return #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C12
|
||||
get y() → core::double*
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf);
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
set y(synthesized core::double* #v) → void
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf, #v);
|
||||
@#C9
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #v);
|
||||
@#C10
|
||||
static get /*isNonNullableByDefault*/ next#offsetOf() → core::int
|
||||
return #C16.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
get next() → ffi::Pointer<self::Coordinate*>*
|
||||
return ffi::_loadPointer<self::Coordinate*>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf);
|
||||
return ffi::_loadPointer<self::Coordinate*>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
set next(synthesized ffi::Pointer<self::Coordinate*>* #v) → void
|
||||
return ffi::_storePointer<self::Coordinate*>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf, #v);
|
||||
@#C9
|
||||
return ffi::_storePointer<self::Coordinate*>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #v);
|
||||
@#C10
|
||||
static get /*isNonNullableByDefault*/ #sizeOf() → core::int*
|
||||
return #C19.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
}
|
||||
|
@ -77,10 +78,10 @@ constants {
|
|||
#C5 = null
|
||||
#C6 = ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5}
|
||||
#C7 = core::pragma {name:#C1, options:#C6}
|
||||
#C8 = "vm:prefer-inline"
|
||||
#C9 = core::pragma {name:#C8, options:#C5}
|
||||
#C10 = 0
|
||||
#C11 = <core::int*>[#C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10]
|
||||
#C8 = 0
|
||||
#C9 = "vm:prefer-inline"
|
||||
#C10 = core::pragma {name:#C9, options:#C5}
|
||||
#C11 = <core::int*>[#C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8]
|
||||
#C12 = ffi::Double {}
|
||||
#C13 = 8
|
||||
#C14 = <core::int*>[#C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13]
|
||||
|
|
|
@ -21,6 +21,7 @@ class Coordinate extends ffi::Struct {
|
|||
}
|
||||
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
|
||||
abstract member-signature get _typedDataBase() → core::Object*; -> ffi::_Compound::_typedDataBase
|
||||
abstract member-signature get _offsetInBytes() → core::int*; -> ffi::_Compound::_offsetInBytes
|
||||
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
|
||||
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
|
||||
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
|
||||
|
|
|
@ -21,6 +21,7 @@ class Coordinate extends ffi::Struct {
|
|||
}
|
||||
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
|
||||
abstract member-signature get _typedDataBase() → core::Object*; -> ffi::_Compound::_typedDataBase
|
||||
abstract member-signature get _offsetInBytes() → core::int*; -> ffi::_Compound::_offsetInBytes
|
||||
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
|
||||
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
|
||||
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
|
||||
|
|
|
@ -16,6 +16,7 @@ class Coordinate extends ffi::Struct {
|
|||
;
|
||||
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
|
||||
abstract member-signature get _typedDataBase() → core::Object*; -> ffi::_Compound::_typedDataBase
|
||||
abstract member-signature get _offsetInBytes() → core::int*; -> ffi::_Compound::_offsetInBytes
|
||||
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
|
||||
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
|
||||
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
|
||||
|
|
|
@ -9,14 +9,14 @@ import "package:ffi/ffi.dart";
|
|||
|
||||
@#C7
|
||||
class Coordinate extends ffi::Struct {
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
static factory allocate(ffi::Allocator* allocator, core::double* x, core::double* y, ffi::Pointer<self::Coordinate*>* next) → self::Coordinate* {
|
||||
return let final self::Coordinate* #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate*>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate*>}!) in block {
|
||||
return let final self::Coordinate* #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate*>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate*>}!, #C8) in block {
|
||||
#t1.{self::Coordinate::x} = x;
|
||||
#t1.{self::Coordinate::y} = y;
|
||||
#t1.{self::Coordinate::next} = next;
|
||||
|
@ -24,6 +24,7 @@ class Coordinate extends ffi::Struct {
|
|||
}
|
||||
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
|
||||
abstract member-signature get _typedDataBase() → core::Object*; -> ffi::_Compound::_typedDataBase
|
||||
abstract member-signature get _offsetInBytes() → core::int*; -> ffi::_Compound::_offsetInBytes
|
||||
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
|
||||
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
|
||||
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
|
||||
|
@ -33,30 +34,30 @@ class Coordinate extends ffi::Struct {
|
|||
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
|
||||
abstract member-signature method toString() → core::String*; -> core::Object::toString
|
||||
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
|
||||
@#C9
|
||||
@#C10
|
||||
static get /*isNonNullableByDefault*/ x#offsetOf() → core::int
|
||||
return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C12
|
||||
get x() → core::double*
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf);
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
set x(synthesized core::double* #v) → void
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf, #v);
|
||||
@#C9
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #v);
|
||||
@#C10
|
||||
static get /*isNonNullableByDefault*/ y#offsetOf() → core::int
|
||||
return #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C12
|
||||
get y() → core::double*
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf);
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
set y(synthesized core::double* #v) → void
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf, #v);
|
||||
@#C9
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #v);
|
||||
@#C10
|
||||
static get /*isNonNullableByDefault*/ next#offsetOf() → core::int
|
||||
return #C16.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
get next() → ffi::Pointer<self::Coordinate*>*
|
||||
return ffi::_loadPointer<self::Coordinate*>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf);
|
||||
return ffi::_loadPointer<self::Coordinate*>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
set next(synthesized ffi::Pointer<self::Coordinate*>* #v) → void
|
||||
return ffi::_storePointer<self::Coordinate*>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf, #v);
|
||||
@#C9
|
||||
return ffi::_storePointer<self::Coordinate*>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #v);
|
||||
@#C10
|
||||
static get /*isNonNullableByDefault*/ #sizeOf() → core::int*
|
||||
return #C19.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
}
|
||||
|
@ -70,10 +71,10 @@ constants {
|
|||
#C5 = null
|
||||
#C6 = ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5}
|
||||
#C7 = core::pragma {name:#C1, options:#C6}
|
||||
#C8 = "vm:prefer-inline"
|
||||
#C9 = core::pragma {name:#C8, options:#C5}
|
||||
#C10 = 0
|
||||
#C11 = <core::int*>[#C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10]
|
||||
#C8 = 0
|
||||
#C9 = "vm:prefer-inline"
|
||||
#C10 = core::pragma {name:#C9, options:#C5}
|
||||
#C11 = <core::int*>[#C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8]
|
||||
#C12 = ffi::Double {}
|
||||
#C13 = 8
|
||||
#C14 = <core::int*>[#C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13]
|
||||
|
|
|
@ -8,18 +8,18 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
synthetic constructor •() → lib::Y
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C7
|
||||
get yy() → dart.core::int
|
||||
return dart.ffi::_loadUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::yy#offsetOf);
|
||||
return dart.ffi::_loadUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::yy#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C7
|
||||
set yy(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::yy#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::yy#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C9
|
||||
static get yy#offsetOf() → dart.core::int
|
||||
return #C11.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
@ -38,19 +38,16 @@ library from "org-dartlang-test:///main.dart" as main {
|
|||
synthetic constructor •() → main::X
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get xx() → lib::Y
|
||||
return new lib::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::xx#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::xx#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set xx(synthesized lib::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::xx#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::xx#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C9
|
||||
static get xx#offsetOf() → dart.core::int
|
||||
return #C11.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
|
|
@ -8,18 +8,18 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
synthetic constructor •() → lib::Y
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C7
|
||||
get yy() → dart.core::int
|
||||
return dart.ffi::_loadUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::yy#offsetOf);
|
||||
return dart.ffi::_loadUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::yy#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C7
|
||||
set yy(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::yy#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::yy#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C9
|
||||
static get yy#offsetOf() → dart.core::int
|
||||
return #C11.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
@ -38,19 +38,16 @@ library from "org-dartlang-test:///main.dart" as main {
|
|||
synthetic constructor •() → main::X
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get xx() → lib::Y
|
||||
return new lib::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::xx#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::xx#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set xx(synthesized lib::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::xx#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::xx#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C9
|
||||
static get xx#offsetOf() → dart.core::int
|
||||
return #C11.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
|
|
@ -26,19 +26,16 @@ library from "org-dartlang-test:///structs.dart" as str {
|
|||
synthetic constructor •() → str::A
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → str::A
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → str::A
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → str::A
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get yy() → str::Y
|
||||
return new str::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = str::A::yy#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<str::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new str::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, str::A::yy#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set yy(synthesized str::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, str::A::yy#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, str::A::yy#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C10
|
||||
static get yy#offsetOf() → dart.core::int
|
||||
return #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
@ -50,8 +47,8 @@ library from "org-dartlang-test:///structs.dart" as str {
|
|||
synthetic constructor •() → str::Y
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → str::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → str::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → str::Y
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
|
|
|
@ -26,19 +26,16 @@ library from "org-dartlang-test:///structs.dart" as str {
|
|||
synthetic constructor •() → str::A
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → str::A
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → str::A
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → str::A
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get yy() → str::Y
|
||||
return new str::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = str::A::yy#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<str::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new str::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, str::A::yy#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set yy(synthesized str::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, str::A::yy#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, str::A::yy#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C10
|
||||
static get yy#offsetOf() → dart.core::int
|
||||
return #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
@ -50,8 +47,8 @@ library from "org-dartlang-test:///structs.dart" as str {
|
|||
synthetic constructor •() → str::Y
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → str::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → str::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → str::Y
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
|
|
|
@ -5,28 +5,28 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
|
||||
@#C7
|
||||
final class Coordinate extends dart.ffi::Struct {
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C8
|
||||
get x() → dart.core::double
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf);
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set x(synthesized dart.core::double #externalFieldValue) → void
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C8
|
||||
get y() → dart.core::double
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf);
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y(synthesized dart.core::double #externalFieldValue) → void
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get next() → dart.ffi::Pointer<lib::Coordinate>
|
||||
return dart.ffi::_loadPointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf);
|
||||
return dart.ffi::_loadPointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set next(synthesized dart.ffi::Pointer<lib::Coordinate> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
static factory allocate(dart.core::double x, dart.core::double y, dart.ffi::Pointer<lib::Coordinate>? next) → lib::Coordinate {
|
||||
throw "";
|
||||
}
|
||||
|
|
|
@ -5,28 +5,28 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
|
||||
@#C7
|
||||
final class Coordinate extends dart.ffi::Struct {
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C8
|
||||
get x() → dart.core::double
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf);
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set x(synthesized dart.core::double #externalFieldValue) → void
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C8
|
||||
get y() → dart.core::double
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf);
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y(synthesized dart.core::double #externalFieldValue) → void
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get next() → dart.ffi::Pointer<lib::Coordinate>
|
||||
return dart.ffi::_loadPointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf);
|
||||
return dart.ffi::_loadPointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set next(synthesized dart.ffi::Pointer<lib::Coordinate> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
static factory allocate(dart.core::double x, dart.core::double y, dart.ffi::Pointer<lib::Coordinate>? next) → lib::Coordinate {
|
||||
throw "";
|
||||
}
|
||||
|
|
|
@ -5,28 +5,28 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
|
||||
@#C7
|
||||
final class Coordinate extends dart.ffi::Struct {
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C8
|
||||
get x() → dart.core::double
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf);
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set x(synthesized dart.core::double #externalFieldValue) → void
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C8
|
||||
get y() → dart.core::double
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf);
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y(synthesized dart.core::double #externalFieldValue) → void
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get next() → dart.ffi::Pointer<lib::Coordinate>
|
||||
return dart.ffi::_loadPointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf);
|
||||
return dart.ffi::_loadPointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set next(synthesized dart.ffi::Pointer<lib::Coordinate> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
static factory allocate(dart.core::double x, dart.core::double y, dart.ffi::Pointer<lib::Coordinate>? next) → lib::Coordinate {
|
||||
throw "";
|
||||
}
|
||||
|
|
|
@ -8,44 +8,41 @@ library from "org-dartlang-test:///a.dart" as a {
|
|||
synthetic constructor •() → a::StructA
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → a::StructA
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → a::StructA
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → a::StructA
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get a1() → dart.ffi::Pointer<dart.ffi::Void>
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a1#offsetOf);
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set a1(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a1#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get a2() → dart.ffi::Pointer<dart.ffi::Void>
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a2#offsetOf);
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set a2(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a2#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get a3() → dart.ffi::Pointer<dart.ffi::Void>
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a3#offsetOf);
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set a3(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a3#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get blah() → a::NestedStruct
|
||||
return new a::NestedStruct::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = a::StructA::blah#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<a::NestedStruct>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new a::NestedStruct::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::blah#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set blah(synthesized a::NestedStruct #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::blah#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C11, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C13
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::blah#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C12
|
||||
static get a1#offsetOf() → dart.core::int
|
||||
return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get a2#offsetOf() → dart.core::int
|
||||
return #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get a3#offsetOf() → dart.core::int
|
||||
return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get blah#offsetOf() → dart.core::int
|
||||
return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get #sizeOf() → dart.core::int*
|
||||
return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
}
|
||||
|
@ -54,34 +51,34 @@ library from "org-dartlang-test:///a.dart" as a {
|
|||
synthetic constructor •() → a::NestedStruct
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → a::NestedStruct
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → a::NestedStruct
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → a::NestedStruct
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get n1() → dart.ffi::Pointer<dart.ffi::Void>
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n1#offsetOf);
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set n1(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n1#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get n2() → dart.ffi::Pointer<dart.ffi::Void>
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n2#offsetOf);
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set n2(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n2#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get n3() → dart.ffi::Pointer<dart.ffi::Void>
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n3#offsetOf);
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set n3(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n3#offsetOf, #externalFieldValue);
|
||||
@#C13
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C12
|
||||
static get n1#offsetOf() → dart.core::int
|
||||
return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get n2#offsetOf() → dart.core::int
|
||||
return #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get n3#offsetOf() → dart.core::int
|
||||
return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get #sizeOf() → dart.core::int*
|
||||
return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
}
|
||||
|
@ -98,23 +95,20 @@ library from "org-dartlang-test:///b.dart" as b {
|
|||
synthetic constructor •() → b::StructB
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → b::StructB
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → b::StructB
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → b::StructB
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get b1() → a::StructA
|
||||
return new a::StructA::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = b::StructB::b1#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<a::StructA>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new a::StructA::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, b::StructB::b1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set b1(synthesized a::StructA #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, b::StructB::b1#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C11, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C13
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, b::StructB::b1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C12
|
||||
static get b1#offsetOf() → dart.core::int
|
||||
return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get #sizeOf() → dart.core::int*
|
||||
return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
}
|
||||
|
@ -136,10 +130,10 @@ constants {
|
|||
#C8 = 12
|
||||
#C9 = 24
|
||||
#C10 = <dart.core::int*>[#C8, #C9, #C8, #C9, #C9, #C9, #C9, #C9, #C8, #C9, #C9, #C8, #C9, #C8, #C9, #C8, #C9, #C9, #C9, #C9, #C8, #C9]
|
||||
#C11 = 0
|
||||
#C12 = "vm:prefer-inline"
|
||||
#C13 = dart.core::pragma {name:#C12, options:#C5}
|
||||
#C14 = <dart.core::int*>[#C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11]
|
||||
#C11 = "vm:prefer-inline"
|
||||
#C12 = dart.core::pragma {name:#C11, options:#C5}
|
||||
#C13 = 0
|
||||
#C14 = <dart.core::int*>[#C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13]
|
||||
#C15 = 4
|
||||
#C16 = 8
|
||||
#C17 = <dart.core::int*>[#C15, #C16, #C15, #C16, #C16, #C16, #C16, #C16, #C15, #C16, #C16, #C15, #C16, #C15, #C16, #C15, #C16, #C16, #C16, #C16, #C15, #C16]
|
||||
|
|
|
@ -8,44 +8,41 @@ library from "org-dartlang-test:///a.dart" as a {
|
|||
synthetic constructor •() → a::StructA
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → a::StructA
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → a::StructA
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → a::StructA
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get a1() → dart.ffi::Pointer<dart.ffi::Void>
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a1#offsetOf);
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set a1(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a1#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get a2() → dart.ffi::Pointer<dart.ffi::Void>
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a2#offsetOf);
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set a2(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a2#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get a3() → dart.ffi::Pointer<dart.ffi::Void>
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a3#offsetOf);
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set a3(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a3#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::a3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get blah() → a::NestedStruct
|
||||
return new a::NestedStruct::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = a::StructA::blah#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<a::NestedStruct>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new a::NestedStruct::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::blah#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set blah(synthesized a::NestedStruct #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::blah#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C11, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C13
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::StructA::blah#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C12
|
||||
static get a1#offsetOf() → dart.core::int
|
||||
return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get a2#offsetOf() → dart.core::int
|
||||
return #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get a3#offsetOf() → dart.core::int
|
||||
return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get blah#offsetOf() → dart.core::int
|
||||
return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get #sizeOf() → dart.core::int*
|
||||
return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
}
|
||||
|
@ -54,34 +51,34 @@ library from "org-dartlang-test:///a.dart" as a {
|
|||
synthetic constructor •() → a::NestedStruct
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → a::NestedStruct
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → a::NestedStruct
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → a::NestedStruct
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get n1() → dart.ffi::Pointer<dart.ffi::Void>
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n1#offsetOf);
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set n1(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n1#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get n2() → dart.ffi::Pointer<dart.ffi::Void>
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n2#offsetOf);
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set n2(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n2#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get n3() → dart.ffi::Pointer<dart.ffi::Void>
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n3#offsetOf);
|
||||
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set n3(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n3#offsetOf, #externalFieldValue);
|
||||
@#C13
|
||||
return dart.ffi::_storePointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, a::NestedStruct::n3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C12
|
||||
static get n1#offsetOf() → dart.core::int
|
||||
return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get n2#offsetOf() → dart.core::int
|
||||
return #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get n3#offsetOf() → dart.core::int
|
||||
return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get #sizeOf() → dart.core::int*
|
||||
return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
}
|
||||
|
@ -98,23 +95,20 @@ library from "org-dartlang-test:///b.dart" as b {
|
|||
synthetic constructor •() → b::StructB
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → b::StructB
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → b::StructB
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → b::StructB
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get b1() → a::StructA
|
||||
return new a::StructA::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = b::StructB::b1#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<a::StructA>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new a::StructA::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, b::StructB::b1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set b1(synthesized a::StructA #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, b::StructB::b1#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C11, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C13
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, b::StructB::b1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C12
|
||||
static get b1#offsetOf() → dart.core::int
|
||||
return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
@#C13
|
||||
@#C12
|
||||
static get #sizeOf() → dart.core::int*
|
||||
return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
}
|
||||
|
@ -136,10 +130,10 @@ constants {
|
|||
#C8 = 12
|
||||
#C9 = 24
|
||||
#C10 = <dart.core::int*>[#C8, #C9, #C8, #C9, #C9, #C9, #C9, #C9, #C8, #C9, #C9, #C8, #C9, #C8, #C9, #C8, #C9, #C9, #C9, #C9, #C8, #C9]
|
||||
#C11 = 0
|
||||
#C12 = "vm:prefer-inline"
|
||||
#C13 = dart.core::pragma {name:#C12, options:#C5}
|
||||
#C14 = <dart.core::int*>[#C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11]
|
||||
#C11 = "vm:prefer-inline"
|
||||
#C12 = dart.core::pragma {name:#C11, options:#C5}
|
||||
#C13 = 0
|
||||
#C14 = <dart.core::int*>[#C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13]
|
||||
#C15 = 4
|
||||
#C16 = 8
|
||||
#C17 = <dart.core::int*>[#C15, #C16, #C15, #C16, #C16, #C16, #C16, #C16, #C15, #C16, #C16, #C15, #C16, #C15, #C16, #C15, #C16, #C16, #C16, #C16, #C15, #C16]
|
||||
|
|
|
@ -5,28 +5,28 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
|
||||
@#C7
|
||||
final class Coordinate extends dart.ffi::Struct {
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C8
|
||||
get x() → dart.core::double
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf);
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set x(synthesized dart.core::double #externalFieldValue) → void
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C8
|
||||
get y() → dart.core::double
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf);
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y(synthesized dart.core::double #externalFieldValue) → void
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get next() → dart.ffi::Pointer<lib::Coordinate>
|
||||
return dart.ffi::_loadPointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf);
|
||||
return dart.ffi::_loadPointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set next(synthesized dart.ffi::Pointer<lib::Coordinate> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
static factory allocate(dart.core::double x, dart.core::double y, dart.ffi::Pointer<lib::Coordinate>? next) → lib::Coordinate {
|
||||
throw "";
|
||||
}
|
||||
|
|
|
@ -5,28 +5,28 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
|
||||
@#C7
|
||||
final class Coordinate extends dart.ffi::Struct {
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C8
|
||||
get x() → dart.core::double
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf);
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set x(synthesized dart.core::double #externalFieldValue) → void
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C8
|
||||
get y() → dart.core::double
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf);
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y(synthesized dart.core::double #externalFieldValue) → void
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get next() → dart.ffi::Pointer<lib::Coordinate>
|
||||
return dart.ffi::_loadPointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf);
|
||||
return dart.ffi::_loadPointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set next(synthesized dart.ffi::Pointer<lib::Coordinate> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
static factory allocate(dart.core::double x, dart.core::double y, dart.ffi::Pointer<lib::Coordinate>? next) → lib::Coordinate {
|
||||
throw "";
|
||||
}
|
||||
|
|
|
@ -5,28 +5,28 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
|
||||
@#C7
|
||||
final class Coordinate extends dart.ffi::Struct {
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Coordinate
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C8
|
||||
get x() → dart.core::double
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf);
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set x(synthesized dart.core::double #externalFieldValue) → void
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::x#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C8
|
||||
get y() → dart.core::double
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf);
|
||||
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y(synthesized dart.core::double #externalFieldValue) → void
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::y#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get next() → dart.ffi::Pointer<lib::Coordinate>
|
||||
return dart.ffi::_loadPointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf);
|
||||
return dart.ffi::_loadPointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set next(synthesized dart.ffi::Pointer<lib::Coordinate> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<lib::Coordinate>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Coordinate::next#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
static factory allocate(dart.core::double x, dart.core::double y, dart.ffi::Pointer<lib::Coordinate>? next) → lib::Coordinate {
|
||||
dart.core::print("hello");
|
||||
throw "";
|
||||
|
|
|
@ -8,30 +8,30 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
synthetic constructor •() → lib::Y
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C8
|
||||
get y1() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y1(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C8
|
||||
get y2() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y2(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C9
|
||||
get y3() → dart.core::int
|
||||
return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf);
|
||||
return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C9
|
||||
set y3(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C11
|
||||
static get y1#offsetOf() → dart.core::int
|
||||
return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
@ -56,32 +56,26 @@ library from "org-dartlang-test:///main.dart" as main {
|
|||
synthetic constructor •() → main::X
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get x1() → lib::Y
|
||||
return new lib::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::x1#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set x1(synthesized lib::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
get x2() → lib::Y
|
||||
return new lib::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::x2#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set x2(synthesized lib::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C8
|
||||
get x3() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set x3(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C11
|
||||
static get x1#offsetOf() → dart.core::int
|
||||
return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
|
|
@ -8,30 +8,30 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
synthetic constructor •() → lib::Y
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C8
|
||||
get y1() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y1(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C9
|
||||
get y3() → dart.core::int
|
||||
return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf);
|
||||
return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C9
|
||||
set y3(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C8
|
||||
get y2() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y2(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C11
|
||||
static get y1#offsetOf() → dart.core::int
|
||||
return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
@ -56,32 +56,26 @@ library from "org-dartlang-test:///main.dart" as main {
|
|||
synthetic constructor •() → main::X
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get x1() → lib::Y
|
||||
return new lib::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::x1#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set x1(synthesized lib::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
get x2() → lib::Y
|
||||
return new lib::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::x2#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set x2(synthesized lib::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C8
|
||||
get x3() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set x3(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C11
|
||||
static get x1#offsetOf() → dart.core::int
|
||||
return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
|
|
@ -8,30 +8,30 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
synthetic constructor •() → lib::Y
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C8
|
||||
get y1() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y1(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C8
|
||||
get y2() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y2(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C9
|
||||
get y3() → dart.core::int
|
||||
return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf);
|
||||
return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C9
|
||||
set y3(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C11
|
||||
static get y1#offsetOf() → dart.core::int
|
||||
return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
@ -56,32 +56,26 @@ library from "org-dartlang-test:///main.dart" as main {
|
|||
synthetic constructor •() → main::X
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get x1() → lib::Y
|
||||
return new lib::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::x1#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set x1(synthesized lib::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
get x2() → lib::Y
|
||||
return new lib::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::x2#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set x2(synthesized lib::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C8
|
||||
get x3() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set x3(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C11
|
||||
static get x1#offsetOf() → dart.core::int
|
||||
return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
|
|
@ -8,30 +8,30 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
synthetic constructor •() → lib::Y
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C8
|
||||
get y1() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y1(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C9
|
||||
get y3() → dart.core::int
|
||||
return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf);
|
||||
return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C9
|
||||
set y3(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C8
|
||||
get y2() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y2(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C11
|
||||
static get y1#offsetOf() → dart.core::int
|
||||
return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
@ -56,32 +56,26 @@ library from "org-dartlang-test:///main.dart" as main {
|
|||
synthetic constructor •() → main::X
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get x1() → lib::Y
|
||||
return new lib::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::x1#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set x1(synthesized lib::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
get x2() → lib::Y
|
||||
return new lib::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::x2#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set x2(synthesized lib::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C8
|
||||
get x3() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set x3(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C11
|
||||
static get x1#offsetOf() → dart.core::int
|
||||
return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
|
|
@ -8,30 +8,30 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
synthetic constructor •() → lib::Y
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C8
|
||||
get y1() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y1(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C8
|
||||
get y2() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y2(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C9
|
||||
get y3() → dart.core::int
|
||||
return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf);
|
||||
return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C9
|
||||
set y3(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C11
|
||||
static get y1#offsetOf() → dart.core::int
|
||||
return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
@ -246,32 +246,26 @@ library from "org-dartlang-test:///main.dart" as main {
|
|||
synthetic constructor •() → main::X
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get x1() → lib::Y
|
||||
return new lib::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::x1#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set x1(synthesized lib::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
get x2() → lib::Y
|
||||
return new lib::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::x2#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set x2(synthesized lib::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C8
|
||||
get x3() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set x3(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C11
|
||||
static get x1#offsetOf() → dart.core::int
|
||||
return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
|
|
@ -8,30 +8,30 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
synthetic constructor •() → lib::Y
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Y
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C8
|
||||
get y1() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y1(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C9
|
||||
get y3() → dart.core::int
|
||||
return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf);
|
||||
return dart.ffi::_loadUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C9
|
||||
set y3(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint64(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C8
|
||||
get y2() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set y2(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::Y::y2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C11
|
||||
static get y1#offsetOf() → dart.core::int
|
||||
return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
@ -246,32 +246,26 @@ library from "org-dartlang-test:///main.dart" as main {
|
|||
synthetic constructor •() → main::X
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get x1() → lib::Y
|
||||
return new lib::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::x1#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set x1(synthesized lib::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x1#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
get x2() → lib::Y
|
||||
return new lib::Y::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::x2#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::Y::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set x2(synthesized lib::Y #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C12, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x2#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C8
|
||||
get x3() → dart.core::int
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf);
|
||||
return dart.ffi::_loadUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
@#C8
|
||||
set x3(synthesized dart.core::int #externalFieldValue) → void
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storeUint8(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::x3#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
@#C11
|
||||
static get x1#offsetOf() → dart.core::int
|
||||
return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
|
|
@ -8,16 +8,16 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
synthetic constructor •() → lib::COMObject
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::COMObject
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::COMObject
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::COMObject
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get lpVtbl() → dart.ffi::Pointer<dart.ffi::IntPtr>
|
||||
return dart.ffi::_loadPointer<dart.ffi::IntPtr>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::COMObject::lpVtbl#offsetOf);
|
||||
return dart.ffi::_loadPointer<dart.ffi::IntPtr>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::COMObject::lpVtbl#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set lpVtbl(synthesized dart.ffi::Pointer<dart.ffi::IntPtr> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<dart.ffi::IntPtr>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::COMObject::lpVtbl#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<dart.ffi::IntPtr>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::COMObject::lpVtbl#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get vtable() → dart.ffi::Pointer<dart.ffi::IntPtr>
|
||||
return dart.ffi::Pointer::fromAddress<dart.ffi::IntPtr>(dart.ffi::_loadAbiSpecificInt<dart.ffi::IntPtr>(this.{lib::COMObject::lpVtbl}{dart.ffi::Pointer<dart.ffi::IntPtr>}, #C7));
|
||||
@#C9
|
||||
|
@ -38,19 +38,16 @@ library from "org-dartlang-test:///main.dart" as main {
|
|||
synthetic constructor •() → main::X
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get xx() → lib::COMObject
|
||||
return new lib::COMObject::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::xx#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::COMObject>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::COMObject::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::xx#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set xx(synthesized lib::COMObject #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::xx#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::xx#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C9
|
||||
static get xx#offsetOf() → dart.core::int
|
||||
return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
|
|
@ -8,16 +8,16 @@ library from "org-dartlang-test:///lib.dart" as lib {
|
|||
synthetic constructor •() → lib::COMObject
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::COMObject
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::COMObject
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::COMObject
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get lpVtbl() → dart.ffi::Pointer<dart.ffi::IntPtr>
|
||||
return dart.ffi::_loadPointer<dart.ffi::IntPtr>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::COMObject::lpVtbl#offsetOf);
|
||||
return dart.ffi::_loadPointer<dart.ffi::IntPtr>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::COMObject::lpVtbl#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set lpVtbl(synthesized dart.ffi::Pointer<dart.ffi::IntPtr> #externalFieldValue) → void
|
||||
return dart.ffi::_storePointer<dart.ffi::IntPtr>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::COMObject::lpVtbl#offsetOf, #externalFieldValue);
|
||||
return dart.ffi::_storePointer<dart.ffi::IntPtr>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, lib::COMObject::lpVtbl#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue);
|
||||
get vtable() → dart.ffi::Pointer<dart.ffi::IntPtr>
|
||||
return dart.ffi::Pointer::fromAddress<dart.ffi::IntPtr>(dart.ffi::_loadAbiSpecificInt<dart.ffi::IntPtr>(this.{lib::COMObject::lpVtbl}{dart.ffi::Pointer<dart.ffi::IntPtr>}, #C7));
|
||||
@#C9
|
||||
|
@ -38,19 +38,16 @@ library from "org-dartlang-test:///main.dart" as main {
|
|||
synthetic constructor •() → main::X
|
||||
: super dart.ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → main::X
|
||||
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get xx() → lib::COMObject
|
||||
return new lib::COMObject::#fromTypedDataBase( block {
|
||||
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
|
||||
synthesized dart.core::int #offset = main::X::xx#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} dart.ffi::Pointer<dart.ffi::NativeType> ?{dart.core::Object} dart.ffi::_fromAddress<lib::COMObject>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}) : let synthesized dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
|
||||
return new lib::COMObject::#fromTypedDataBase(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::xx#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num});
|
||||
set xx(synthesized lib::COMObject #externalFieldValue) → void
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::xx#offsetOf, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, main::X::xx#offsetOf.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #externalFieldValue.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}, #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
|
||||
@#C9
|
||||
static get xx#offsetOf() → dart.core::int
|
||||
return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
|
||||
|
|
|
@ -9,45 +9,45 @@ import "package:ffi/ffi.dart";
|
|||
|
||||
@#C7
|
||||
final class Coordinate extends ffi::Struct {
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C8
|
||||
get x() → core::double
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf);
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C8
|
||||
set x(synthesized core::double #externalFieldValue) → void
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
@#C8
|
||||
get y() → core::double
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf);
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C8
|
||||
set y(synthesized core::double #externalFieldValue) → void
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
get next() → ffi::Pointer<self::Coordinate>
|
||||
return ffi::_loadPointer<self::Coordinate>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf);
|
||||
return ffi::_loadPointer<self::Coordinate>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
set next(synthesized ffi::Pointer<self::Coordinate> #externalFieldValue) → void
|
||||
return ffi::_storePointer<self::Coordinate>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf, #externalFieldValue);
|
||||
return ffi::_storePointer<self::Coordinate>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
static factory allocate(ffi::Allocator allocator, core::double x, core::double y, ffi::Pointer<self::Coordinate> next) → self::Coordinate {
|
||||
return let final self::Coordinate #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate>}!) in block {
|
||||
return let final self::Coordinate #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate>}!, #C9) in block {
|
||||
#t1.{self::Coordinate::x} = x;
|
||||
#t1.{self::Coordinate::y} = y;
|
||||
#t1.{self::Coordinate::next} = next;
|
||||
} =>#t1;
|
||||
}
|
||||
@#C10
|
||||
@#C11
|
||||
static get x#offsetOf() → core::int
|
||||
return #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C10
|
||||
@#C11
|
||||
static get y#offsetOf() → core::int
|
||||
return #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C10
|
||||
@#C11
|
||||
static get next#offsetOf() → core::int
|
||||
return #C16.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C10
|
||||
@#C11
|
||||
static get #sizeOf() → core::int*
|
||||
return #C19.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
}
|
||||
|
@ -62,10 +62,10 @@ constants {
|
|||
#C6 = ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5}
|
||||
#C7 = core::pragma {name:#C1, options:#C6}
|
||||
#C8 = ffi::Double {}
|
||||
#C9 = "vm:prefer-inline"
|
||||
#C10 = core::pragma {name:#C9, options:#C5}
|
||||
#C11 = 0
|
||||
#C12 = <core::int*>[#C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11]
|
||||
#C9 = 0
|
||||
#C10 = "vm:prefer-inline"
|
||||
#C11 = core::pragma {name:#C10, options:#C5}
|
||||
#C12 = <core::int*>[#C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9]
|
||||
#C13 = 8
|
||||
#C14 = <core::int*>[#C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13]
|
||||
#C15 = 16
|
||||
|
|
|
@ -9,45 +9,45 @@ import "package:ffi/ffi.dart";
|
|||
|
||||
@#C7
|
||||
final class Coordinate extends ffi::Struct {
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C8
|
||||
get x() → core::double
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf);
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C8
|
||||
set x(synthesized core::double #externalFieldValue) → void
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
@#C8
|
||||
get y() → core::double
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf);
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C8
|
||||
set y(synthesized core::double #externalFieldValue) → void
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
get next() → ffi::Pointer<self::Coordinate>
|
||||
return ffi::_loadPointer<self::Coordinate>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf);
|
||||
return ffi::_loadPointer<self::Coordinate>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
set next(synthesized ffi::Pointer<self::Coordinate> #externalFieldValue) → void
|
||||
return ffi::_storePointer<self::Coordinate>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf, #externalFieldValue);
|
||||
return ffi::_storePointer<self::Coordinate>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
static factory allocate(ffi::Allocator allocator, core::double x, core::double y, ffi::Pointer<self::Coordinate> next) → self::Coordinate {
|
||||
return let final self::Coordinate #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate>}!) in block {
|
||||
return let final self::Coordinate #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate>}!, #C9) in block {
|
||||
#t1.{self::Coordinate::x} = x;
|
||||
#t1.{self::Coordinate::y} = y;
|
||||
#t1.{self::Coordinate::next} = next;
|
||||
} =>#t1;
|
||||
}
|
||||
@#C10
|
||||
@#C11
|
||||
static get x#offsetOf() → core::int
|
||||
return #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C10
|
||||
@#C11
|
||||
static get y#offsetOf() → core::int
|
||||
return #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C10
|
||||
@#C11
|
||||
static get next#offsetOf() → core::int
|
||||
return #C16.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C10
|
||||
@#C11
|
||||
static get #sizeOf() → core::int*
|
||||
return #C19.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
}
|
||||
|
@ -62,10 +62,10 @@ constants {
|
|||
#C6 = ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5}
|
||||
#C7 = core::pragma {name:#C1, options:#C6}
|
||||
#C8 = ffi::Double {}
|
||||
#C9 = "vm:prefer-inline"
|
||||
#C10 = core::pragma {name:#C9, options:#C5}
|
||||
#C11 = 0
|
||||
#C12 = <core::int*>[#C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11]
|
||||
#C9 = 0
|
||||
#C10 = "vm:prefer-inline"
|
||||
#C11 = core::pragma {name:#C10, options:#C5}
|
||||
#C12 = <core::int*>[#C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9]
|
||||
#C13 = 8
|
||||
#C14 = <core::int*>[#C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13]
|
||||
#C15 = 16
|
||||
|
|
|
@ -3,7 +3,6 @@ import self as self;
|
|||
import "dart:core" as core;
|
||||
import "dart:ffi" as ffi;
|
||||
import "dart:typed_data" as typ;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
import "dart:ffi";
|
||||
import "package:ffi/ffi.dart";
|
||||
|
@ -13,27 +12,24 @@ final class StructInlineArray extends ffi::Struct {
|
|||
synthetic constructor •() → self::StructInlineArray
|
||||
: super ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::StructInlineArray
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::StructInlineArray
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::StructInlineArray
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C9
|
||||
get a0() → ffi::Array<ffi::Uint8>
|
||||
return new ffi::Array::_<ffi::Uint8>( block {
|
||||
synthesized core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = self::StructInlineArray::a0#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} ffi::_fromAddress<ffi::Uint8>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #C10.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C3, #C11);
|
||||
return new ffi::Array::_<ffi::Uint8>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::StructInlineArray::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C3, #C10);
|
||||
@#C9
|
||||
set a0(synthesized ffi::Array<ffi::Uint8> #externalFieldValue) → void
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::StructInlineArray::a0#offsetOf, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #C12, #C10.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
@#C14
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::StructInlineArray::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #externalFieldValue.{ffi::_Compound::_offsetInBytes}{core::int}, #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
@#C13
|
||||
static get a0#offsetOf() → core::int
|
||||
return #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C14
|
||||
@#C13
|
||||
static get #sizeOf() → core::int*
|
||||
return #C10.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
||||
|
@ -47,12 +43,12 @@ constants {
|
|||
#C7 = ffi::_FfiStructLayout {fieldTypes:#C5, packing:#C6}
|
||||
#C8 = core::pragma {name:#C1, options:#C7}
|
||||
#C9 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C3, dimension2:#C6, dimension3:#C6, dimension4:#C6, dimension5:#C6, dimensions:#C6}
|
||||
#C10 = <core::int*>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3]
|
||||
#C11 = <core::int*>[]
|
||||
#C12 = 0
|
||||
#C13 = "vm:prefer-inline"
|
||||
#C14 = core::pragma {name:#C13, options:#C6}
|
||||
#C15 = <core::int*>[#C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12]
|
||||
#C10 = <core::int*>[]
|
||||
#C11 = <core::int*>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3]
|
||||
#C12 = "vm:prefer-inline"
|
||||
#C13 = core::pragma {name:#C12, options:#C6}
|
||||
#C14 = 0
|
||||
#C15 = <core::int*>[#C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14]
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ import self as self;
|
|||
import "dart:core" as core;
|
||||
import "dart:ffi" as ffi;
|
||||
import "dart:typed_data" as typ;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
import "dart:ffi";
|
||||
import "package:ffi/ffi.dart";
|
||||
|
@ -13,27 +12,24 @@ final class StructInlineArray extends ffi::Struct {
|
|||
synthetic constructor •() → self::StructInlineArray
|
||||
: super ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::StructInlineArray
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::StructInlineArray
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::StructInlineArray
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C9
|
||||
get a0() → ffi::Array<ffi::Uint8>
|
||||
return new ffi::Array::_<ffi::Uint8>( block {
|
||||
synthesized core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = self::StructInlineArray::a0#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} ffi::_fromAddress<ffi::Uint8>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #C10.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C3, #C11);
|
||||
return new ffi::Array::_<ffi::Uint8>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::StructInlineArray::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C3, #C10);
|
||||
@#C9
|
||||
set a0(synthesized ffi::Array<ffi::Uint8> #externalFieldValue) → void
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::StructInlineArray::a0#offsetOf, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #C12, #C10.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
@#C14
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::StructInlineArray::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #externalFieldValue.{ffi::_Compound::_offsetInBytes}{core::int}, #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
@#C13
|
||||
static get a0#offsetOf() → core::int
|
||||
return #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C14
|
||||
@#C13
|
||||
static get #sizeOf() → core::int*
|
||||
return #C10.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
}
|
||||
static method main() → dynamic {}
|
||||
|
||||
|
@ -47,12 +43,12 @@ constants {
|
|||
#C7 = ffi::_FfiStructLayout {fieldTypes:#C5, packing:#C6}
|
||||
#C8 = core::pragma {name:#C1, options:#C7}
|
||||
#C9 = ffi::_ArraySize<ffi::NativeType*> {dimension1:#C3, dimension2:#C6, dimension3:#C6, dimension4:#C6, dimension5:#C6, dimensions:#C6}
|
||||
#C10 = <core::int*>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3]
|
||||
#C11 = <core::int*>[]
|
||||
#C12 = 0
|
||||
#C13 = "vm:prefer-inline"
|
||||
#C14 = core::pragma {name:#C13, options:#C6}
|
||||
#C15 = <core::int*>[#C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12]
|
||||
#C10 = <core::int*>[]
|
||||
#C11 = <core::int*>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3]
|
||||
#C12 = "vm:prefer-inline"
|
||||
#C13 = core::pragma {name:#C12, options:#C6}
|
||||
#C14 = 0
|
||||
#C15 = <core::int*>[#C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14, #C14]
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ import self as self;
|
|||
import "dart:core" as core;
|
||||
import "dart:ffi" as ffi;
|
||||
import "dart:typed_data" as typ;
|
||||
import "dart:_internal" as _in;
|
||||
import "package:ffi/src/allocation.dart" as all;
|
||||
|
||||
import "dart:ffi";
|
||||
|
@ -14,31 +13,28 @@ final class StructInlineArrayMultiDimensional extends ffi::Struct {
|
|||
synthetic constructor •() → self::StructInlineArrayMultiDimensional
|
||||
: super ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::StructInlineArrayMultiDimensional
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::StructInlineArrayMultiDimensional
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::StructInlineArrayMultiDimensional
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C10
|
||||
get a0() → ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>>
|
||||
return new ffi::Array::_<ffi::Array<ffi::Array<ffi::Uint8>>>( block {
|
||||
synthesized core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = self::StructInlineArrayMultiDimensional::a0#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Array<ffi::Uint8>>>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C9, #C12);
|
||||
return new ffi::Array::_<ffi::Array<ffi::Array<ffi::Uint8>>>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::StructInlineArrayMultiDimensional::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C9, #C11);
|
||||
@#C10
|
||||
set a0(synthesized ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>> #externalFieldValue) → void
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::StructInlineArrayMultiDimensional::a0#offsetOf, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #C13, #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
@#C15
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::StructInlineArrayMultiDimensional::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #externalFieldValue.{ffi::_Compound::_offsetInBytes}{core::int}, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
@#C14
|
||||
static get a0#offsetOf() → core::int
|
||||
return #C16.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C15
|
||||
@#C14
|
||||
static get #sizeOf() → core::int*
|
||||
return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
return #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
}
|
||||
static method main() → dynamic {
|
||||
final ffi::Pointer<self::StructInlineArrayMultiDimensional> pointer = #C17.{ffi::Allocator::allocate}<self::StructInlineArrayMultiDimensional>(self::StructInlineArrayMultiDimensional::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::StructInlineArrayMultiDimensional>};
|
||||
final self::StructInlineArrayMultiDimensional struct = new self::StructInlineArrayMultiDimensional::#fromTypedDataBase(pointer!);
|
||||
final self::StructInlineArrayMultiDimensional struct = new self::StructInlineArrayMultiDimensional::#fromTypedDataBase(pointer!, #C15);
|
||||
final ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>> array = struct.{self::StructInlineArrayMultiDimensional::a0}{ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>>};
|
||||
final ffi::Array<ffi::Array<ffi::Uint8>> subArray = block {
|
||||
synthesized ffi::Array<dynamic> #array = array!;
|
||||
|
@ -47,10 +43,7 @@ static method main() → dynamic {
|
|||
synthesized core::int #singleElementSize = #C18;
|
||||
synthesized core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
|
||||
synthesized core::int #offset = #elementSize.{core::num::*}(#index){(core::num) → core::num};
|
||||
} =>new ffi::Array::_<ffi::Array<ffi::Uint8>>( block {
|
||||
synthesized core::Object #typedDataBase = #array.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = #offset;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Uint8>>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #elementSize){([core::int, core::int?]) → typ::Uint8List}, #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>});
|
||||
} =>new ffi::Array::_<ffi::Array<ffi::Uint8>>(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #array.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>});
|
||||
block {
|
||||
synthesized ffi::Array<dynamic> #array = array!;
|
||||
synthesized core::int #index = 1!;
|
||||
|
@ -58,7 +51,8 @@ static method main() → dynamic {
|
|||
synthesized core::int #singleElementSize = #C18;
|
||||
synthesized core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
|
||||
synthesized core::int #offset = #elementSize.{core::num::*}(#index){(core::num) → core::num};
|
||||
} =>ffi::_memCopy(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #offset, subArray.{ffi::_Compound::_typedDataBase}{core::Object}, #C13, #elementSize);
|
||||
synthesized ffi::Array<dynamic> #value = subArray!;
|
||||
} =>ffi::_memCopy(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #array.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #value.{ffi::_Compound::_typedDataBase}{core::Object}, #value.{ffi::_Compound::_offsetInBytes}{core::int}, #elementSize);
|
||||
#C17.{all::CallocAllocator::free}(pointer){(ffi::Pointer<ffi::NativeType>) → void};
|
||||
}
|
||||
|
||||
|
@ -73,12 +67,12 @@ constants {
|
|||
#C8 = core::pragma {name:#C1, options:#C7}
|
||||
#C9 = 2
|
||||
#C10 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C9, dimension2:#C9, dimension3:#C9, dimension4:#C6, dimension5:#C6, dimensions:#C6}
|
||||
#C11 = <core::int*>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3]
|
||||
#C12 = <core::int*>[#C9, #C9]
|
||||
#C13 = 0
|
||||
#C14 = "vm:prefer-inline"
|
||||
#C15 = core::pragma {name:#C14, options:#C6}
|
||||
#C16 = <core::int*>[#C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13]
|
||||
#C11 = <core::int*>[#C9, #C9]
|
||||
#C12 = <core::int*>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3]
|
||||
#C13 = "vm:prefer-inline"
|
||||
#C14 = core::pragma {name:#C13, options:#C6}
|
||||
#C15 = 0
|
||||
#C16 = <core::int*>[#C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15]
|
||||
#C17 = all::CallocAllocator {}
|
||||
#C18 = 1
|
||||
}
|
||||
|
@ -86,7 +80,7 @@ constants {
|
|||
Extra constant evaluation status:
|
||||
Evaluated: NullCheck @ org-dartlang-testcase:///ffi_struct_inline_array_multi_dimensional.dart:18:25 -> IntConstant(0)
|
||||
Evaluated: NullCheck @ org-dartlang-testcase:///ffi_struct_inline_array_multi_dimensional.dart:19:8 -> IntConstant(1)
|
||||
Extra constant evaluation: evaluated: 113, effectively constant: 2
|
||||
Extra constant evaluation: evaluated: 91, effectively constant: 2
|
||||
|
||||
|
||||
Constructor coverage from constants:
|
||||
|
|
|
@ -3,7 +3,6 @@ import self as self;
|
|||
import "dart:core" as core;
|
||||
import "dart:ffi" as ffi;
|
||||
import "dart:typed_data" as typ;
|
||||
import "dart:_internal" as _in;
|
||||
import "package:ffi/src/allocation.dart" as all;
|
||||
|
||||
import "dart:ffi";
|
||||
|
@ -14,31 +13,28 @@ final class StructInlineArrayMultiDimensional extends ffi::Struct {
|
|||
synthetic constructor •() → self::StructInlineArrayMultiDimensional
|
||||
: super ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::StructInlineArrayMultiDimensional
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::StructInlineArrayMultiDimensional
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::StructInlineArrayMultiDimensional
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C10
|
||||
get a0() → ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>>
|
||||
return new ffi::Array::_<ffi::Array<ffi::Array<ffi::Uint8>>>( block {
|
||||
synthesized core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = self::StructInlineArrayMultiDimensional::a0#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Array<ffi::Uint8>>>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C9, #C12);
|
||||
return new ffi::Array::_<ffi::Array<ffi::Array<ffi::Uint8>>>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::StructInlineArrayMultiDimensional::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C9, #C11);
|
||||
@#C10
|
||||
set a0(synthesized ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>> #externalFieldValue) → void
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::StructInlineArrayMultiDimensional::a0#offsetOf, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #C13, #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
@#C15
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::StructInlineArrayMultiDimensional::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #externalFieldValue.{ffi::_Compound::_offsetInBytes}{core::int}, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
@#C14
|
||||
static get a0#offsetOf() → core::int
|
||||
return #C16.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C15
|
||||
@#C14
|
||||
static get #sizeOf() → core::int*
|
||||
return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
return #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
}
|
||||
static method main() → dynamic {
|
||||
final ffi::Pointer<self::StructInlineArrayMultiDimensional> pointer = #C17.{ffi::Allocator::allocate}<self::StructInlineArrayMultiDimensional>(self::StructInlineArrayMultiDimensional::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::StructInlineArrayMultiDimensional>};
|
||||
final self::StructInlineArrayMultiDimensional struct = new self::StructInlineArrayMultiDimensional::#fromTypedDataBase(pointer!);
|
||||
final self::StructInlineArrayMultiDimensional struct = new self::StructInlineArrayMultiDimensional::#fromTypedDataBase(pointer!, #C15);
|
||||
final ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>> array = struct.{self::StructInlineArrayMultiDimensional::a0}{ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>>};
|
||||
final ffi::Array<ffi::Array<ffi::Uint8>> subArray = block {
|
||||
synthesized ffi::Array<dynamic> #array = array!;
|
||||
|
@ -47,10 +43,7 @@ static method main() → dynamic {
|
|||
synthesized core::int #singleElementSize = #C18;
|
||||
synthesized core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
|
||||
synthesized core::int #offset = #elementSize.{core::num::*}(#index){(core::num) → core::num};
|
||||
} =>new ffi::Array::_<ffi::Array<ffi::Uint8>>( block {
|
||||
synthesized core::Object #typedDataBase = #array.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = #offset;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Uint8>>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #elementSize){([core::int, core::int?]) → typ::Uint8List}, #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>});
|
||||
} =>new ffi::Array::_<ffi::Array<ffi::Uint8>>(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #array.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>});
|
||||
block {
|
||||
synthesized ffi::Array<dynamic> #array = array!;
|
||||
synthesized core::int #index = 1!;
|
||||
|
@ -58,7 +51,8 @@ static method main() → dynamic {
|
|||
synthesized core::int #singleElementSize = #C18;
|
||||
synthesized core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
|
||||
synthesized core::int #offset = #elementSize.{core::num::*}(#index){(core::num) → core::num};
|
||||
} =>ffi::_memCopy(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #offset, subArray.{ffi::_Compound::_typedDataBase}{core::Object}, #C13, #elementSize);
|
||||
synthesized ffi::Array<dynamic> #value = subArray!;
|
||||
} =>ffi::_memCopy(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #array.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #value.{ffi::_Compound::_typedDataBase}{core::Object}, #value.{ffi::_Compound::_offsetInBytes}{core::int}, #elementSize);
|
||||
#C17.{all::CallocAllocator::free}(pointer){(ffi::Pointer<ffi::NativeType>) → void};
|
||||
}
|
||||
|
||||
|
@ -73,12 +67,12 @@ constants {
|
|||
#C8 = core::pragma {name:#C1, options:#C7}
|
||||
#C9 = 2
|
||||
#C10 = ffi::_ArraySize<ffi::NativeType*> {dimension1:#C9, dimension2:#C9, dimension3:#C9, dimension4:#C6, dimension5:#C6, dimensions:#C6}
|
||||
#C11 = <core::int*>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3]
|
||||
#C12 = <core::int*>[#C9, #C9]
|
||||
#C13 = 0
|
||||
#C14 = "vm:prefer-inline"
|
||||
#C15 = core::pragma {name:#C14, options:#C6}
|
||||
#C16 = <core::int*>[#C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13]
|
||||
#C11 = <core::int*>[#C9, #C9]
|
||||
#C12 = <core::int*>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3]
|
||||
#C13 = "vm:prefer-inline"
|
||||
#C14 = core::pragma {name:#C13, options:#C6}
|
||||
#C15 = 0
|
||||
#C16 = <core::int*>[#C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15, #C15]
|
||||
#C17 = all::CallocAllocator {}
|
||||
#C18 = 1
|
||||
}
|
||||
|
@ -86,7 +80,7 @@ constants {
|
|||
Extra constant evaluation status:
|
||||
Evaluated: NullCheck @ org-dartlang-testcase:///ffi_struct_inline_array_multi_dimensional.dart:18:25 -> IntConstant(0)
|
||||
Evaluated: NullCheck @ org-dartlang-testcase:///ffi_struct_inline_array_multi_dimensional.dart:19:8 -> IntConstant(1)
|
||||
Extra constant evaluation: evaluated: 113, effectively constant: 2
|
||||
Extra constant evaluation: evaluated: 91, effectively constant: 2
|
||||
|
||||
|
||||
Constructor coverage from constants:
|
||||
|
|
|
@ -249,6 +249,7 @@ class FfiTransformer extends Transformer {
|
|||
final Procedure lookupFunctionMethod;
|
||||
final Procedure fromFunctionMethod;
|
||||
final Field compoundTypedDataBaseField;
|
||||
final Field compoundOffsetInBytesField;
|
||||
final Field arraySizeField;
|
||||
final Field arrayNestedDimensionsField;
|
||||
final Procedure arrayCheckIndex;
|
||||
|
@ -410,6 +411,8 @@ class FfiTransformer extends Transformer {
|
|||
index.getProcedure('dart:ffi', 'Pointer', 'get:address'),
|
||||
compoundTypedDataBaseField =
|
||||
index.getField('dart:ffi', '_Compound', '_typedDataBase'),
|
||||
compoundOffsetInBytesField =
|
||||
index.getField('dart:ffi', '_Compound', '_offsetInBytes'),
|
||||
arraySizeField = index.getField('dart:ffi', 'Array', '_size'),
|
||||
arrayNestedDimensionsField =
|
||||
index.getField('dart:ffi', 'Array', '_nestedDimensions'),
|
||||
|
@ -843,128 +846,6 @@ class FfiTransformer extends Transformer {
|
|||
),
|
||||
);
|
||||
|
||||
/// Generates an expression that returns a new `Pointer<dartType>` offset
|
||||
/// by [offset] from [pointer].
|
||||
///
|
||||
/// Sample output:
|
||||
///
|
||||
/// ```
|
||||
/// _fromAddress<dartType>(pointer.address + #offset)
|
||||
/// ```
|
||||
Expression _pointerOffset(Expression pointer, Expression offset,
|
||||
DartType dartType, int fileOffset) =>
|
||||
StaticInvocation(
|
||||
fromAddressInternal,
|
||||
Arguments([
|
||||
add(
|
||||
InstanceGet(
|
||||
InstanceAccessKind.Instance, pointer, addressGetter.name,
|
||||
interfaceTarget: addressGetter,
|
||||
resultType: addressGetter.getterType)
|
||||
..fileOffset = fileOffset,
|
||||
offset)
|
||||
], types: [
|
||||
dartType
|
||||
]))
|
||||
..fileOffset = fileOffset;
|
||||
|
||||
/// Generates an expression that returns a new `TypedData` offset
|
||||
/// by [offset] from [typedData].
|
||||
///
|
||||
/// Sample output:
|
||||
///
|
||||
/// ```
|
||||
/// TypedData #typedData = typedData;
|
||||
/// #typedData.buffer.asInt8List(#typedData.offsetInBytes + offset, length)
|
||||
/// ```
|
||||
Expression _typedDataOffset(Expression typedData, Expression offset,
|
||||
Expression length, int fileOffset) {
|
||||
final typedDataVar = VariableDeclaration("#typedData",
|
||||
initializer: typedData,
|
||||
type: InterfaceType(typedDataClass, Nullability.nonNullable),
|
||||
isSynthesized: true)
|
||||
..fileOffset = fileOffset;
|
||||
return Let(
|
||||
typedDataVar,
|
||||
InstanceInvocation(
|
||||
InstanceAccessKind.Instance,
|
||||
InstanceGet(InstanceAccessKind.Instance, VariableGet(typedDataVar),
|
||||
typedDataBufferGetter.name,
|
||||
interfaceTarget: typedDataBufferGetter,
|
||||
resultType: typedDataBufferGetter.getterType)
|
||||
..fileOffset = fileOffset,
|
||||
byteBufferAsUint8List.name,
|
||||
Arguments([
|
||||
add(
|
||||
InstanceGet(
|
||||
InstanceAccessKind.Instance,
|
||||
VariableGet(typedDataVar),
|
||||
typedDataOffsetInBytesGetter.name,
|
||||
interfaceTarget: typedDataOffsetInBytesGetter,
|
||||
resultType: typedDataOffsetInBytesGetter.getterType)
|
||||
..fileOffset = fileOffset,
|
||||
offset),
|
||||
length
|
||||
]),
|
||||
interfaceTarget: byteBufferAsUint8List,
|
||||
functionType: byteBufferAsUint8List.getterType as FunctionType));
|
||||
}
|
||||
|
||||
/// Generates an expression that returns a new `TypedDataBase` offset
|
||||
/// by [offset] from [typedDataBase].
|
||||
///
|
||||
/// If [typedDataBase] is a `Pointer`, returns a `Pointer<dartType>`.
|
||||
/// If [typedDataBase] is a `TypedData` returns a `TypedData`.
|
||||
///
|
||||
/// Sample output:
|
||||
///
|
||||
/// ```
|
||||
/// Object #typedDataBase = typedDataBase;
|
||||
/// int #offset = offset;
|
||||
/// #typedDataBase is Pointer ?
|
||||
/// _pointerOffset<dartType>(#typedDataBase, #offset) :
|
||||
/// _typedDataOffset((#typedDataBase as TypedData), #offset, length)
|
||||
/// ```
|
||||
Expression typedDataBaseOffset(Expression typedDataBase, Expression offset,
|
||||
Expression length, DartType dartType, int fileOffset) {
|
||||
// Avoid generating the branch on the kind of typed data and the offset
|
||||
// calculation if the end result is a no-op. This offset-generating method
|
||||
// is used to load compound subtypes, which in many cases are not using any
|
||||
// offset from their base.
|
||||
if (offset case ConstantExpression(constant: IntConstant(value: 0))) {
|
||||
return typedDataBase;
|
||||
}
|
||||
|
||||
final typedDataBaseVar = VariableDeclaration("#typedDataBase",
|
||||
initializer: typedDataBase,
|
||||
type: coreTypes.objectNonNullableRawType,
|
||||
isSynthesized: true)
|
||||
..fileOffset = fileOffset;
|
||||
final offsetVar = VariableDeclaration("#offset",
|
||||
initializer: offset,
|
||||
type: coreTypes.intNonNullableRawType,
|
||||
isSynthesized: true)
|
||||
..fileOffset = fileOffset;
|
||||
return BlockExpression(
|
||||
Block([typedDataBaseVar, offsetVar]),
|
||||
ConditionalExpression(
|
||||
IsExpression(VariableGet(typedDataBaseVar), pointerNativeTypeType),
|
||||
_pointerOffset(VariableGet(typedDataBaseVar),
|
||||
VariableGet(offsetVar), dartType, fileOffset),
|
||||
_typedDataOffset(
|
||||
StaticInvocation(
|
||||
unsafeCastMethod,
|
||||
Arguments([
|
||||
VariableGet(typedDataBaseVar)
|
||||
], types: [
|
||||
InterfaceType(typedDataClass, Nullability.nonNullable)
|
||||
])),
|
||||
VariableGet(offsetVar),
|
||||
length,
|
||||
fileOffset),
|
||||
coreTypes.objectNonNullableRawType));
|
||||
}
|
||||
|
||||
bool isPrimitiveType(DartType type) {
|
||||
if (type is InvalidType) {
|
||||
return false;
|
||||
|
@ -1169,7 +1050,9 @@ class FfiTransformer extends Transformer {
|
|||
}
|
||||
|
||||
Expression getCompoundTypedDataBaseField(
|
||||
Expression receiver, int fileOffset) {
|
||||
Expression receiver,
|
||||
int fileOffset,
|
||||
) {
|
||||
return InstanceGet(
|
||||
InstanceAccessKind.Instance, receiver, compoundTypedDataBaseField.name,
|
||||
interfaceTarget: compoundTypedDataBaseField,
|
||||
|
@ -1177,6 +1060,17 @@ class FfiTransformer extends Transformer {
|
|||
..fileOffset = fileOffset;
|
||||
}
|
||||
|
||||
Expression getCompoundOffsetInBytesField(
|
||||
Expression receiver,
|
||||
int fileOffset,
|
||||
) {
|
||||
return InstanceGet(
|
||||
InstanceAccessKind.Instance, receiver, compoundOffsetInBytesField.name,
|
||||
interfaceTarget: compoundOffsetInBytesField,
|
||||
resultType: compoundOffsetInBytesField.type)
|
||||
..fileOffset = fileOffset;
|
||||
}
|
||||
|
||||
Expression add(Expression a, Expression b) {
|
||||
return InstanceInvocation(
|
||||
InstanceAccessKind.Instance, a, numAddition.name, Arguments([b]),
|
||||
|
@ -1253,7 +1147,6 @@ class FfiTransformer extends Transformer {
|
|||
Expression? value,
|
||||
required fileOffset,
|
||||
}) {
|
||||
assert(index == null || offsetInBytes == null);
|
||||
final method = () {
|
||||
if (value != null) {
|
||||
if (index != null) {
|
||||
|
@ -1267,21 +1160,12 @@ class FfiTransformer extends Transformer {
|
|||
return loadAbiSpecificIntMethod;
|
||||
}();
|
||||
|
||||
final Expression offsetOrIndex = () {
|
||||
if (offsetInBytes != null) {
|
||||
return offsetInBytes;
|
||||
}
|
||||
if (index != null) {
|
||||
return index;
|
||||
}
|
||||
return ConstantExpression(IntConstant(0));
|
||||
}();
|
||||
|
||||
return StaticInvocation(
|
||||
method,
|
||||
Arguments([
|
||||
typedDataBase,
|
||||
offsetOrIndex,
|
||||
offsetInBytes ?? ConstantExpression(IntConstant(0)),
|
||||
if (index != null) index,
|
||||
if (value != null) value,
|
||||
], types: [
|
||||
InterfaceType(nativeTypeCfe.clazz, Nullability.nonNullable)
|
||||
|
@ -1309,6 +1193,7 @@ class FfiTransformer extends Transformer {
|
|||
ConstantExpression(IntConstant(1)),
|
||||
]))
|
||||
..fileOffset = nestedExpression.fileOffset,
|
||||
ConstantExpression(IntConstant(0)),
|
||||
]))
|
||||
..fileOffset = nestedExpression.fileOffset
|
||||
])))
|
||||
|
|
|
@ -552,26 +552,40 @@ class _FfiDefinitionTransformer extends FfiTransformer {
|
|||
/// Add a constructor which 'load' can use.
|
||||
///
|
||||
/// ```dart
|
||||
/// #fromTypedDataBase(Object #typedDataBase) :
|
||||
/// super._fromTypedDataBase(#typedDataBase);
|
||||
/// #fromTypedDataBase(Object #typedDataBase, int #offsetInBytes) :
|
||||
/// super._fromTypedDataBase(#typedDataBase, #offsetInBytes);
|
||||
/// ```
|
||||
final VariableDeclaration typedDataBase = VariableDeclaration(
|
||||
"#typedDataBase",
|
||||
type: coreTypes.objectNonNullableRawType,
|
||||
isSynthesized: true);
|
||||
"#typedDataBase",
|
||||
type: coreTypes.objectNonNullableRawType,
|
||||
isSynthesized: true,
|
||||
);
|
||||
final VariableDeclaration offsetInBytes = VariableDeclaration(
|
||||
"#offsetInBytes",
|
||||
type: coreTypes.intNonNullableRawType,
|
||||
isSynthesized: true,
|
||||
);
|
||||
final name = Name("#fromTypedDataBase");
|
||||
final reference = indexedClass?.lookupConstructorReference(name);
|
||||
final Constructor ctor = Constructor(
|
||||
FunctionNode(EmptyStatement(),
|
||||
positionalParameters: [typedDataBase],
|
||||
returnType: InterfaceType(node, Nullability.nonNullable)),
|
||||
FunctionNode(
|
||||
EmptyStatement(),
|
||||
positionalParameters: [
|
||||
typedDataBase,
|
||||
offsetInBytes,
|
||||
],
|
||||
returnType: InterfaceType(node, Nullability.nonNullable),
|
||||
),
|
||||
name: name,
|
||||
initializers: [
|
||||
SuperInitializer(
|
||||
node.superclass == structClass
|
||||
? structFromTypedDataBase
|
||||
: unionFromTypedDataBase,
|
||||
Arguments([VariableGet(typedDataBase)]))
|
||||
Arguments([
|
||||
VariableGet(typedDataBase),
|
||||
VariableGet(offsetInBytes),
|
||||
]))
|
||||
],
|
||||
fileUri: node.fileUri,
|
||||
reference: reference)
|
||||
|
|
|
@ -903,7 +903,7 @@ class FfiNativeTransformer extends FfiTransformer {
|
|||
));
|
||||
} else {
|
||||
node.function.body = ExpressionStatement(nativeTypeCfe.generateStore(
|
||||
VariableGet(node.function.positionalParameters[0]),
|
||||
node.function.positionalParameters[0],
|
||||
dartType: dartType,
|
||||
fileOffset: node.fileOffset,
|
||||
typedDataBase: _generateAddressOfField(
|
||||
|
|
|
@ -170,7 +170,7 @@ sealed class NativeTypeCfe {
|
|||
/// [offsetInBytes] and [unaligned] based on the ABI of the struct. It also
|
||||
/// wraps the expression in a return statement.
|
||||
Expression generateStore(
|
||||
Expression value, {
|
||||
VariableDeclaration value, {
|
||||
required DartType dartType,
|
||||
required int fileOffset,
|
||||
required Expression typedDataBase,
|
||||
|
@ -199,7 +199,13 @@ sealed class NativeTypeCfe {
|
|||
),
|
||||
transformer: transformer,
|
||||
unaligned: unalignedAccess,
|
||||
offsetInBytes: StaticGet(offsetGetter),
|
||||
offsetInBytes: transformer.add(
|
||||
StaticGet(offsetGetter),
|
||||
transformer.getCompoundOffsetInBytesField(
|
||||
ThisExpression(),
|
||||
fileOffset,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -216,7 +222,7 @@ sealed class NativeTypeCfe {
|
|||
Procedure offsetGetter,
|
||||
) {
|
||||
return ReturnStatement(generateStore(
|
||||
VariableGet(argument)..fileOffset = fileOffset,
|
||||
argument,
|
||||
dartType: dartType,
|
||||
fileOffset: fileOffset,
|
||||
typedDataBase: transformer.getCompoundTypedDataBaseField(
|
||||
|
@ -224,7 +230,13 @@ sealed class NativeTypeCfe {
|
|||
fileOffset,
|
||||
),
|
||||
transformer: transformer,
|
||||
offsetInBytes: StaticGet(offsetGetter),
|
||||
offsetInBytes: transformer.add(
|
||||
StaticGet(offsetGetter),
|
||||
transformer.getCompoundOffsetInBytesField(
|
||||
ThisExpression(),
|
||||
fileOffset,
|
||||
),
|
||||
),
|
||||
unaligned: unalignedAccess,
|
||||
));
|
||||
}
|
||||
|
@ -258,7 +270,7 @@ final class InvalidNativeTypeCfe extends NativeTypeCfe {
|
|||
|
||||
@override
|
||||
Expression generateStore(
|
||||
Expression value, {
|
||||
VariableDeclaration value, {
|
||||
required DartType dartType,
|
||||
required int fileOffset,
|
||||
required Expression typedDataBase,
|
||||
|
@ -359,7 +371,7 @@ class PrimitiveNativeTypeCfe extends NativeTypeCfe {
|
|||
/// ```
|
||||
@override
|
||||
Expression generateStore(
|
||||
Expression value, {
|
||||
VariableDeclaration value, {
|
||||
required DartType dartType,
|
||||
required int fileOffset,
|
||||
required Expression typedDataBase,
|
||||
|
@ -374,7 +386,7 @@ class PrimitiveNativeTypeCfe extends NativeTypeCfe {
|
|||
Arguments([
|
||||
typedDataBase,
|
||||
offsetInBytes,
|
||||
value,
|
||||
VariableGet(value)..fileOffset = fileOffset,
|
||||
]),
|
||||
)..fileOffset = fileOffset;
|
||||
}
|
||||
|
@ -446,7 +458,7 @@ class PointerNativeTypeCfe extends NativeTypeCfe {
|
|||
/// ```
|
||||
@override
|
||||
Expression generateStore(
|
||||
Expression value, {
|
||||
VariableDeclaration value, {
|
||||
required DartType dartType,
|
||||
required int fileOffset,
|
||||
required Expression typedDataBase,
|
||||
|
@ -460,7 +472,7 @@ class PointerNativeTypeCfe extends NativeTypeCfe {
|
|||
[
|
||||
typedDataBase,
|
||||
offsetInBytes,
|
||||
value,
|
||||
VariableGet(value)..fileOffset = fileOffset,
|
||||
],
|
||||
types: [(dartType as InterfaceType).typeArguments.single],
|
||||
),
|
||||
|
@ -511,7 +523,8 @@ abstract mixin class _CompoundLoadAndStoreMixin implements NativeTypeCfe {
|
|||
///
|
||||
/// ```
|
||||
/// MyStruct.#fromTypedDataBase(
|
||||
/// typedDataBaseOffset(#typedDataBase, #offsetInBytes, size)
|
||||
/// #typedDataBase,
|
||||
/// #offsetInBytes,
|
||||
/// );
|
||||
/// ```
|
||||
@override
|
||||
|
@ -530,13 +543,8 @@ abstract mixin class _CompoundLoadAndStoreMixin implements NativeTypeCfe {
|
|||
return ConstructorInvocation(
|
||||
constructor,
|
||||
Arguments([
|
||||
transformer.typedDataBaseOffset(
|
||||
typedDataBase,
|
||||
offsetInBytes,
|
||||
_generateSize(transformer),
|
||||
dartType,
|
||||
fileOffset,
|
||||
)
|
||||
typedDataBase,
|
||||
offsetInBytes,
|
||||
]),
|
||||
)..fileOffset = fileOffset;
|
||||
}
|
||||
|
@ -548,7 +556,7 @@ abstract mixin class _CompoundLoadAndStoreMixin implements NativeTypeCfe {
|
|||
/// ```
|
||||
@override
|
||||
Expression generateStore(
|
||||
Expression value, {
|
||||
VariableDeclaration value, {
|
||||
required DartType dartType,
|
||||
required int fileOffset,
|
||||
required Expression typedDataBase,
|
||||
|
@ -561,8 +569,14 @@ abstract mixin class _CompoundLoadAndStoreMixin implements NativeTypeCfe {
|
|||
Arguments([
|
||||
typedDataBase,
|
||||
offsetInBytes,
|
||||
transformer.getCompoundTypedDataBaseField(value, fileOffset),
|
||||
ConstantExpression(IntConstant(0)),
|
||||
transformer.getCompoundTypedDataBaseField(
|
||||
VariableGet(value)..fileOffset = fileOffset,
|
||||
fileOffset,
|
||||
),
|
||||
transformer.getCompoundOffsetInBytesField(
|
||||
VariableGet(value)..fileOffset = fileOffset,
|
||||
fileOffset,
|
||||
),
|
||||
_generateSize(transformer),
|
||||
]),
|
||||
)..fileOffset = fileOffset;
|
||||
|
@ -791,7 +805,9 @@ class ArrayNativeTypeCfe extends NativeTypeCfe {
|
|||
///
|
||||
/// ```
|
||||
/// Array<Int8>._(
|
||||
/// typedDataBaseOffset(#typedDataBase, #offsetInBytes, size, typeArgument)
|
||||
/// #typedDataBase,
|
||||
/// #offsetInBytes,
|
||||
/// ...
|
||||
/// );
|
||||
/// ```
|
||||
@override
|
||||
|
@ -810,13 +826,8 @@ class ArrayNativeTypeCfe extends NativeTypeCfe {
|
|||
transformer.arrayConstructor,
|
||||
Arguments(
|
||||
[
|
||||
transformer.typedDataBaseOffset(
|
||||
typedDataBase,
|
||||
offsetInBytes,
|
||||
transformer.runtimeBranchOnLayout(size),
|
||||
typeArgument,
|
||||
fileOffset,
|
||||
),
|
||||
typedDataBase,
|
||||
offsetInBytes,
|
||||
ConstantExpression(IntConstant(length)),
|
||||
transformer.intListConstantExpression(nestedDimensions)
|
||||
],
|
||||
|
@ -832,7 +843,7 @@ class ArrayNativeTypeCfe extends NativeTypeCfe {
|
|||
/// ```
|
||||
@override
|
||||
Expression generateStore(
|
||||
Expression value, {
|
||||
VariableDeclaration value, {
|
||||
required DartType dartType,
|
||||
required int fileOffset,
|
||||
required Expression typedDataBase,
|
||||
|
@ -845,8 +856,14 @@ class ArrayNativeTypeCfe extends NativeTypeCfe {
|
|||
Arguments([
|
||||
typedDataBase,
|
||||
offsetInBytes,
|
||||
transformer.getCompoundTypedDataBaseField(value, fileOffset),
|
||||
ConstantExpression(IntConstant(0)),
|
||||
transformer.getCompoundTypedDataBaseField(
|
||||
VariableGet(value)..fileOffset = fileOffset,
|
||||
fileOffset,
|
||||
),
|
||||
transformer.getCompoundOffsetInBytesField(
|
||||
VariableGet(value)..fileOffset = fileOffset,
|
||||
fileOffset,
|
||||
),
|
||||
transformer.runtimeBranchOnLayout(size),
|
||||
]),
|
||||
)..fileOffset = fileOffset;
|
||||
|
@ -897,7 +914,7 @@ class AbiSpecificNativeTypeCfe extends NativeTypeCfe {
|
|||
|
||||
@override
|
||||
Expression generateStore(
|
||||
Expression value, {
|
||||
VariableDeclaration value, {
|
||||
required DartType dartType,
|
||||
required int fileOffset,
|
||||
required Expression typedDataBase,
|
||||
|
@ -909,7 +926,7 @@ class AbiSpecificNativeTypeCfe extends NativeTypeCfe {
|
|||
this,
|
||||
typedDataBase: typedDataBase,
|
||||
offsetInBytes: offsetInBytes,
|
||||
value: value,
|
||||
value: VariableGet(value)..fileOffset = fileOffset,
|
||||
fileOffset: fileOffset,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -189,6 +189,7 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
|
|||
uint8ListFactory,
|
||||
Arguments([sizeOfExpression]),
|
||||
),
|
||||
ConstantExpression(IntConstant(0)),
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
@ -269,7 +270,13 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
|
|||
abiSpecificLoadOrStoreExpression(
|
||||
nativeTypeCfe,
|
||||
typedDataBase: getCompoundTypedDataBaseField(
|
||||
VariableGet(arrayVar), node.fileOffset),
|
||||
VariableGet(arrayVar),
|
||||
node.fileOffset,
|
||||
),
|
||||
offsetInBytes: getCompoundOffsetInBytesField(
|
||||
VariableGet(arrayVar),
|
||||
node.fileOffset,
|
||||
),
|
||||
index: VariableGet(indexVar),
|
||||
value: target == abiSpecificIntegerArraySetElemAt
|
||||
? node.arguments.positional.last
|
||||
|
@ -985,25 +992,38 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
|
|||
(node.arguments.types[0] as InterfaceType).classNode);
|
||||
|
||||
final Expression sourceStruct, targetOffset;
|
||||
final DartType sourceStructType;
|
||||
|
||||
if (node.arguments.positional.length == 3) {
|
||||
// []= call, args are (receiver, index, source)
|
||||
sourceStruct = node.arguments.positional[2];
|
||||
sourceStructType = node.arguments.types[0];
|
||||
targetOffset = multiply(node.arguments.positional[1],
|
||||
inlineSizeOf(node.arguments.types[0] as InterfaceType)!);
|
||||
} else {
|
||||
// .ref= call, args are (receiver, source)
|
||||
sourceStruct = node.arguments.positional[1];
|
||||
sourceStructType = node.arguments.types[0];
|
||||
targetOffset = ConstantExpression(IntConstant(0));
|
||||
}
|
||||
|
||||
return referencedStruct.generateStore(
|
||||
sourceStruct,
|
||||
dartType: node.arguments.types[0],
|
||||
offsetInBytes: targetOffset,
|
||||
typedDataBase: target,
|
||||
transformer: this,
|
||||
fileOffset: node.fileOffset,
|
||||
final sourceVar = VariableDeclaration(
|
||||
"#source",
|
||||
initializer: sourceStruct,
|
||||
type: sourceStructType,
|
||||
isSynthesized: true,
|
||||
)..fileOffset = node.fileOffset;
|
||||
|
||||
return BlockExpression(
|
||||
Block([sourceVar]),
|
||||
referencedStruct.generateStore(
|
||||
sourceVar,
|
||||
dartType: node.arguments.types[0],
|
||||
offsetInBytes: targetOffset,
|
||||
typedDataBase: target,
|
||||
transformer: this,
|
||||
fileOffset: node.fileOffset,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1040,14 +1060,17 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
|
|||
ConstructorInvocation(
|
||||
constructor,
|
||||
Arguments([
|
||||
typedDataBaseOffset(
|
||||
getCompoundTypedDataBaseField(
|
||||
VariableGet(arrayVar), node.fileOffset),
|
||||
multiply(VariableGet(indexVar), inlineSizeOf(dartType)!),
|
||||
inlineSizeOf(dartType)!,
|
||||
dartType,
|
||||
getCompoundTypedDataBaseField(
|
||||
VariableGet(arrayVar),
|
||||
node.fileOffset,
|
||||
)
|
||||
),
|
||||
add(
|
||||
getCompoundOffsetInBytesField(
|
||||
VariableGet(arrayVar),
|
||||
node.fileOffset,
|
||||
),
|
||||
multiply(VariableGet(indexVar), inlineSizeOf(dartType)!),
|
||||
),
|
||||
]),
|
||||
),
|
||||
);
|
||||
|
@ -1071,7 +1094,8 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
|
|||
/// int #offset = #elementSize * #index;
|
||||
///
|
||||
/// new Array<T>._(
|
||||
/// typedDataBaseOffset(#array._typedDataBase, #offset, #elementSize),
|
||||
/// #array._typedDataBase,
|
||||
/// #offset,
|
||||
/// #array.nestedDimensionsFirst,
|
||||
/// #array.nestedDimensionsRest
|
||||
/// )
|
||||
|
@ -1132,7 +1156,7 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
|
|||
isSynthesized: true)
|
||||
..fileOffset = node.fileOffset;
|
||||
|
||||
final checkIndexAndLocalVars = Block([
|
||||
final checkIndexAndLocalVars = [
|
||||
arrayVar,
|
||||
indexVar,
|
||||
ExpressionStatement(InstanceInvocation(
|
||||
|
@ -1145,23 +1169,27 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
|
|||
)),
|
||||
singleElementSizeVar,
|
||||
elementSizeVar,
|
||||
offsetVar
|
||||
]);
|
||||
offsetVar,
|
||||
];
|
||||
|
||||
if (!setter) {
|
||||
// `[]`
|
||||
return BlockExpression(
|
||||
checkIndexAndLocalVars,
|
||||
Block(checkIndexAndLocalVars),
|
||||
ConstructorInvocation(
|
||||
arrayConstructor,
|
||||
Arguments([
|
||||
typedDataBaseOffset(
|
||||
getCompoundTypedDataBaseField(
|
||||
VariableGet(arrayVar), node.fileOffset),
|
||||
VariableGet(offsetVar),
|
||||
VariableGet(elementSizeVar),
|
||||
dartType,
|
||||
node.fileOffset),
|
||||
getCompoundTypedDataBaseField(
|
||||
VariableGet(arrayVar),
|
||||
node.fileOffset,
|
||||
),
|
||||
add(
|
||||
getCompoundOffsetInBytesField(
|
||||
VariableGet(arrayVar),
|
||||
node.fileOffset,
|
||||
),
|
||||
VariableGet(offsetVar),
|
||||
),
|
||||
InstanceGet(InstanceAccessKind.Instance, VariableGet(arrayVar),
|
||||
arrayNestedDimensionsFirst.name,
|
||||
interfaceTarget: arrayNestedDimensionsFirst,
|
||||
|
@ -1176,17 +1204,39 @@ mixin _FfiUseSiteTransformer on FfiTransformer {
|
|||
}
|
||||
|
||||
// `[]=`
|
||||
final valueVar = VariableDeclaration(
|
||||
"#value",
|
||||
initializer: NullCheck(node.arguments.positional[2]),
|
||||
type: InterfaceType(arrayClass, Nullability.nonNullable),
|
||||
isSynthesized: true,
|
||||
)..fileOffset = node.fileOffset;
|
||||
return BlockExpression(
|
||||
checkIndexAndLocalVars,
|
||||
Block([
|
||||
...checkIndexAndLocalVars,
|
||||
valueVar,
|
||||
]),
|
||||
StaticInvocation(
|
||||
memCopy,
|
||||
Arguments([
|
||||
getCompoundTypedDataBaseField(
|
||||
VariableGet(arrayVar), node.fileOffset),
|
||||
VariableGet(offsetVar),
|
||||
VariableGet(arrayVar),
|
||||
node.fileOffset,
|
||||
),
|
||||
add(
|
||||
getCompoundOffsetInBytesField(
|
||||
VariableGet(arrayVar),
|
||||
node.fileOffset,
|
||||
),
|
||||
VariableGet(offsetVar),
|
||||
),
|
||||
getCompoundTypedDataBaseField(
|
||||
node.arguments.positional[2], node.fileOffset),
|
||||
ConstantExpression(IntConstant(0)),
|
||||
VariableGet(valueVar),
|
||||
node.fileOffset,
|
||||
),
|
||||
getCompoundOffsetInBytesField(
|
||||
VariableGet(valueVar),
|
||||
node.fileOffset,
|
||||
),
|
||||
VariableGet(elementSizeVar),
|
||||
]))
|
||||
..fileOffset = node.fileOffset);
|
||||
|
|
|
@ -2,7 +2,6 @@ library #lib;
|
|||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:ffi" as ffi;
|
||||
import "dart:typed_data" as typ;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
import "dart:ffi";
|
||||
|
@ -24,12 +23,12 @@ final class WCharStruct extends ffi::Struct {
|
|||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]
|
||||
[@vm.unboxing-info.metadata=()->i]
|
||||
get a0() → core::int
|
||||
return [@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificInt<self::WChar>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::WCharStruct::a0#offsetOf);
|
||||
return [@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificInt<self::WChar>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::WCharStruct::a0#offsetOf.{core::num::+}([@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
|
||||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]
|
||||
[@vm.unboxing-info.metadata=(i)->i]
|
||||
set a0([@vm.inferred-arg-type.metadata=dart.core::_Smi] synthesized core::int #externalFieldValue) → void
|
||||
return [@vm.inferred-type.metadata=int] ffi::_storeAbiSpecificInt<self::WChar>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::WCharStruct::a0#offsetOf, #externalFieldValue);
|
||||
return [@vm.inferred-type.metadata=int] ffi::_storeAbiSpecificInt<self::WChar>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::WCharStruct::a0#offsetOf.{core::num::+}([@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
|
||||
[@vm.unboxing-info.metadata=()->i]
|
||||
@#C10
|
||||
|
@ -49,10 +48,7 @@ final class WCharArrayStruct extends ffi::Struct {
|
|||
|
||||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:3]
|
||||
get a0() → ffi::Array<self::WChar>
|
||||
return new ffi::Array::_<self::WChar>( block {
|
||||
synthesized core::Object #typedDataBase = [@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::WCharArrayStruct::a0#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} [@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::_fromAddress<self::WChar>([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.direct-call.metadata=dart.ffi::Pointer.address] [@vm.inferred-type.metadata=int] #typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in [@vm.inferred-type.metadata=!] [@vm.inferred-type.metadata=!] #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi] #typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #C30.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C23, #C31);
|
||||
return new ffi::Array::_<self::WChar>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::WCharArrayStruct::a0#offsetOf.{core::num::+}([@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C23, #C28);
|
||||
|
||||
[@vm.unboxing-info.metadata=()->i]
|
||||
@#C10
|
||||
|
@ -62,7 +58,7 @@ final class WCharArrayStruct extends ffi::Struct {
|
|||
[@vm.unboxing-info.metadata=()->i]
|
||||
@#C10
|
||||
static get #sizeOf() → core::int*
|
||||
return #C30.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
return #C31.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
}
|
||||
class _DummyAllocator extends core::Object implements ffi::Allocator /*hasConstConstructor*/ {
|
||||
|
||||
|
@ -93,10 +89,10 @@ static method testStoreLoad() → void {
|
|||
}
|
||||
static method testStoreLoadIndexed() → void {
|
||||
final ffi::Pointer<self::WChar> p = let final core::num #t2 = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.*] [@vm.inferred-type.metadata=int (skip check)] 2.{core::num::*}([@vm.inferred-type.metadata=dart.core::_Smi] self::WChar::#sizeOf){(core::num) → core::num} in [@vm.direct-call.metadata=#lib::_DummyAllocator.allocate] [@vm.inferred-type.metadata=dart.ffi::Pointer (skip check)] #C32.{ffi::Allocator::allocate}<self::WChar>(){(core::int, {alignment: core::int?}) → ffi::Pointer<self::WChar>};
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::WChar>(p, 0, 10);
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::WChar>(p, 1, 3);
|
||||
core::print([@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificIntAtIndex<self::WChar>(p, 0));
|
||||
core::print([@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificIntAtIndex<self::WChar>(p, 1));
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::WChar>(p, #C19, 0, 10);
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::WChar>(p, #C19, 1, 3);
|
||||
core::print([@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificIntAtIndex<self::WChar>(p, #C19, 0));
|
||||
core::print([@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificIntAtIndex<self::WChar>(p, #C19, 1));
|
||||
[@vm.direct-call.metadata=#lib::_DummyAllocator.free] [@vm.inferred-type.metadata=!? (skip check)] #C32.{self::_DummyAllocator::free}(){(ffi::Pointer<ffi::NativeType>) → void};
|
||||
}
|
||||
static method testStruct() → void {
|
||||
|
@ -115,14 +111,14 @@ static method testInlineArray() → void {
|
|||
synthesized ffi::Array<dynamic> #array = _in::unsafeCast<ffi::Array<self::WChar>>(array);
|
||||
synthesized core::int #index = _in::unsafeCast<core::int>(i);
|
||||
[@vm.direct-call.metadata=dart.ffi::Array._checkIndex] [@vm.inferred-type.metadata=!? (skip check)] #array.{ffi::Array::_checkIndex}(#index){(core::int) → void};
|
||||
} =>ffi::_storeAbiSpecificIntAtIndex<self::WChar>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object}, #index, i);
|
||||
} =>ffi::_storeAbiSpecificIntAtIndex<self::WChar>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] #array.{ffi::_Compound::_offsetInBytes}{core::int}, #index, i);
|
||||
}
|
||||
for (core::int i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation.<] [@vm.inferred-type.metadata=dart.core::bool (skip check)] i.{core::num::<}(100){(core::num) → core::bool}; i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
core::print( block {
|
||||
synthesized ffi::Array<dynamic> #array = _in::unsafeCast<ffi::Array<self::WChar>>(array);
|
||||
synthesized core::int #index = _in::unsafeCast<core::int>(i);
|
||||
[@vm.direct-call.metadata=dart.ffi::Array._checkIndex] [@vm.inferred-type.metadata=!? (skip check)] #array.{ffi::Array::_checkIndex}(#index){(core::int) → void};
|
||||
} =>[@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificIntAtIndex<self::WChar>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object}, #index));
|
||||
} =>[@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificIntAtIndex<self::WChar>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] #array.{ffi::_Compound::_offsetInBytes}{core::int}, #index));
|
||||
}
|
||||
[@vm.direct-call.metadata=#lib::_DummyAllocator.free] [@vm.inferred-type.metadata=!? (skip check)] #C32.{self::_DummyAllocator::free}(){(ffi::Pointer<ffi::NativeType>) → void};
|
||||
}
|
||||
|
@ -154,9 +150,9 @@ constants {
|
|||
#C25 = <core::Type>[#C24]
|
||||
#C26 = ffi::_FfiStructLayout {fieldTypes:#C25, packing:#C9}
|
||||
#C27 = core::pragma {name:#C14, options:#C26}
|
||||
#C28 = 400
|
||||
#C29 = 200
|
||||
#C30 = <core::int*>[#C28, #C28, #C28, #C28, #C28, #C28, #C28, #C28, #C28, #C28, #C28, #C28, #C28, #C28, #C28, #C28, #C28, #C28, #C28, #C29, #C29, #C29]
|
||||
#C31 = <core::int*>[]
|
||||
#C28 = <core::int*>[]
|
||||
#C29 = 400
|
||||
#C30 = 200
|
||||
#C31 = <core::int*>[#C29, #C29, #C29, #C29, #C29, #C29, #C29, #C29, #C29, #C29, #C29, #C29, #C29, #C29, #C29, #C29, #C29, #C29, #C29, #C30, #C30, #C30]
|
||||
#C32 = self::_DummyAllocator {}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ import self as self;
|
|||
import "dart:ffi" as ffi;
|
||||
import "dart:core" as core;
|
||||
import "dart:typed_data" as typ;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
import "dart:ffi";
|
||||
|
||||
|
@ -22,24 +21,24 @@ final class WCharStruct extends ffi::Struct {
|
|||
synthetic constructor •() → self::WCharStruct
|
||||
: super ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::WCharStruct
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::WCharStruct
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::WCharStruct
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C74
|
||||
get a0() → core::int
|
||||
return ffi::_loadAbiSpecificInt<self::WChar>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::WCharStruct::a0#offsetOf);
|
||||
return ffi::_loadAbiSpecificInt<self::WChar>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::WCharStruct::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C74
|
||||
set a0(synthesized core::int #externalFieldValue) → void
|
||||
return ffi::_storeAbiSpecificInt<self::WChar>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::WCharStruct::a0#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeAbiSpecificInt<self::WChar>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::WCharStruct::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
@#C74
|
||||
get a1() → core::int
|
||||
return ffi::_loadAbiSpecificInt<self::WChar>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::WCharStruct::a1#offsetOf);
|
||||
return ffi::_loadAbiSpecificInt<self::WChar>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::WCharStruct::a1#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C74
|
||||
set a1(synthesized core::int #externalFieldValue) → void
|
||||
return ffi::_storeAbiSpecificInt<self::WChar>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::WCharStruct::a1#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeAbiSpecificInt<self::WChar>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::WCharStruct::a1#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
@#C67
|
||||
static get a0#offsetOf() → core::int
|
||||
return #C75.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
|
@ -55,27 +54,24 @@ final class WCharArrayStruct extends ffi::Struct {
|
|||
synthetic constructor •() → self::WCharArrayStruct
|
||||
: super ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::WCharArrayStruct
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::WCharArrayStruct
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::WCharArrayStruct
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C83
|
||||
get a0() → ffi::Array<self::WChar>
|
||||
return new ffi::Array::_<self::WChar>( block {
|
||||
synthesized core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = self::WCharArrayStruct::a0#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} ffi::_fromAddress<self::WChar>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #C86.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C78, #C87);
|
||||
return new ffi::Array::_<self::WChar>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::WCharArrayStruct::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C78, #C84);
|
||||
@#C83
|
||||
set a0(synthesized ffi::Array<self::WChar> #externalFieldValue) → void
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::WCharArrayStruct::a0#offsetOf, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #C1, #C86.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::WCharArrayStruct::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #externalFieldValue.{ffi::_Compound::_offsetInBytes}{core::int}, #C87.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
@#C67
|
||||
static get a0#offsetOf() → core::int
|
||||
return #C75.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C67
|
||||
static get #sizeOf() → core::int*
|
||||
return #C86.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
return #C87.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
}
|
||||
class _DummyAllocator extends core::Object implements ffi::Allocator /*hasConstConstructor*/ {
|
||||
const constructor •() → self::_DummyAllocator
|
||||
|
@ -108,36 +104,36 @@ static method testStoreLoad() → void {
|
|||
}
|
||||
static method testStoreLoadIndexed() → void {
|
||||
final ffi::Pointer<self::WChar> p = #C89.{ffi::Allocator::allocate}<self::WChar>(2.{core::num::*}(self::WChar::#sizeOf){(core::num) → core::num}){(core::int, {alignment: core::int?}) → ffi::Pointer<self::WChar>};
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::WChar>(p, 0, 10);
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::WChar>(p, 1, 3);
|
||||
core::print(ffi::_loadAbiSpecificIntAtIndex<self::WChar>(p, 0));
|
||||
core::print(ffi::_loadAbiSpecificIntAtIndex<self::WChar>(p, 1));
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::WChar>(p, #C1, 0, 10);
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::WChar>(p, #C1, 1, 3);
|
||||
core::print(ffi::_loadAbiSpecificIntAtIndex<self::WChar>(p, #C1, 0));
|
||||
core::print(ffi::_loadAbiSpecificIntAtIndex<self::WChar>(p, #C1, 1));
|
||||
#C89.{self::_DummyAllocator::free}(p){(ffi::Pointer<ffi::NativeType>) → void};
|
||||
}
|
||||
static method testStruct() → void {
|
||||
final ffi::Pointer<self::WCharStruct> p = #C89.{ffi::Allocator::allocate}<self::WCharStruct>(self::WCharStruct::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::WCharStruct>};
|
||||
new self::WCharStruct::#fromTypedDataBase(p!).{self::WCharStruct::a0} = 1;
|
||||
core::print(new self::WCharStruct::#fromTypedDataBase(p!).{self::WCharStruct::a0}{core::int});
|
||||
new self::WCharStruct::#fromTypedDataBase(p!).{self::WCharStruct::a0} = 2;
|
||||
core::print(new self::WCharStruct::#fromTypedDataBase(p!).{self::WCharStruct::a0}{core::int});
|
||||
new self::WCharStruct::#fromTypedDataBase(p!, #C1).{self::WCharStruct::a0} = 1;
|
||||
core::print(new self::WCharStruct::#fromTypedDataBase(p!, #C1).{self::WCharStruct::a0}{core::int});
|
||||
new self::WCharStruct::#fromTypedDataBase(p!, #C1).{self::WCharStruct::a0} = 2;
|
||||
core::print(new self::WCharStruct::#fromTypedDataBase(p!, #C1).{self::WCharStruct::a0}{core::int});
|
||||
#C89.{self::_DummyAllocator::free}(p){(ffi::Pointer<ffi::NativeType>) → void};
|
||||
}
|
||||
static method testInlineArray() → void {
|
||||
final ffi::Pointer<self::WCharArrayStruct> p = #C89.{ffi::Allocator::allocate}<self::WCharArrayStruct>(self::WCharArrayStruct::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::WCharArrayStruct>};
|
||||
final ffi::Array<self::WChar> array = new self::WCharArrayStruct::#fromTypedDataBase(p!).{self::WCharArrayStruct::a0}{ffi::Array<self::WChar>};
|
||||
final ffi::Array<self::WChar> array = new self::WCharArrayStruct::#fromTypedDataBase(p!, #C1).{self::WCharArrayStruct::a0}{ffi::Array<self::WChar>};
|
||||
for (core::int i = 0; i.{core::num::<}(100){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
block {
|
||||
synthesized ffi::Array<dynamic> #array = array!;
|
||||
synthesized core::int #index = i!;
|
||||
#array.{ffi::Array::_checkIndex}(#index){(core::int) → void};
|
||||
} =>ffi::_storeAbiSpecificIntAtIndex<self::WChar>(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #index, i);
|
||||
} =>ffi::_storeAbiSpecificIntAtIndex<self::WChar>(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #array.{ffi::_Compound::_offsetInBytes}{core::int}, #index, i);
|
||||
}
|
||||
for (core::int i = 0; i.{core::num::<}(100){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
core::print( block {
|
||||
synthesized ffi::Array<dynamic> #array = array!;
|
||||
synthesized core::int #index = i!;
|
||||
#array.{ffi::Array::_checkIndex}(#index){(core::int) → void};
|
||||
} =>ffi::_loadAbiSpecificIntAtIndex<self::WChar>(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #index));
|
||||
} =>ffi::_loadAbiSpecificIntAtIndex<self::WChar>(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #array.{ffi::_Compound::_offsetInBytes}{core::int}, #index));
|
||||
}
|
||||
#C89.{self::_DummyAllocator::free}(p){(ffi::Pointer<ffi::NativeType>) → void};
|
||||
}
|
||||
|
@ -225,10 +221,10 @@ constants {
|
|||
#C81 = ffi::_FfiStructLayout {fieldTypes:#C80, packing:#C66}
|
||||
#C82 = core::pragma {name:#C69, options:#C81}
|
||||
#C83 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C78, dimension2:#C66, dimension3:#C66, dimension4:#C66, dimension5:#C66, dimensions:#C66}
|
||||
#C84 = 400
|
||||
#C85 = 200
|
||||
#C86 = <core::int*>[#C84, #C84, #C84, #C84, #C84, #C84, #C84, #C84, #C84, #C84, #C84, #C84, #C84, #C84, #C84, #C84, #C84, #C84, #C84, #C85, #C85, #C85]
|
||||
#C87 = <core::int*>[]
|
||||
#C84 = <core::int*>[]
|
||||
#C85 = 400
|
||||
#C86 = 200
|
||||
#C87 = <core::int*>[#C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C86, #C86, #C86]
|
||||
#C88 = core::_Override {}
|
||||
#C89 = self::_DummyAllocator {}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ library #lib;
|
|||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:ffi" as ffi;
|
||||
import "dart:typed_data" as typ;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
import "dart:ffi";
|
||||
|
@ -24,12 +23,12 @@ final class IncompleteStruct extends ffi::Struct {
|
|||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]
|
||||
[@vm.unboxing-info.metadata=()->i]
|
||||
get a0() → core::int
|
||||
return [@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificInt<self::Incomplete>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::IncompleteStruct::a0#offsetOf);
|
||||
return [@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificInt<self::Incomplete>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::IncompleteStruct::a0#offsetOf.{core::num::+}([@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
|
||||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]
|
||||
[@vm.unboxing-info.metadata=(i)->i]
|
||||
set a0([@vm.inferred-arg-type.metadata=dart.core::_Smi] synthesized core::int #externalFieldValue) → void
|
||||
return [@vm.inferred-type.metadata=int] ffi::_storeAbiSpecificInt<self::Incomplete>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::IncompleteStruct::a0#offsetOf, #externalFieldValue);
|
||||
return [@vm.inferred-type.metadata=int] ffi::_storeAbiSpecificInt<self::Incomplete>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::IncompleteStruct::a0#offsetOf.{core::num::+}([@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
|
||||
[@vm.unboxing-info.metadata=()->i]
|
||||
@#C8
|
||||
|
@ -49,10 +48,7 @@ final class IncompleteArrayStruct extends ffi::Struct {
|
|||
|
||||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:3]
|
||||
get a0() → ffi::Array<self::Incomplete>
|
||||
return new ffi::Array::_<self::Incomplete>( block {
|
||||
synthesized core::Object #typedDataBase = [@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::IncompleteArrayStruct::a0#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} [@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::_fromAddress<self::Incomplete>([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.direct-call.metadata=dart.ffi::Pointer.address] [@vm.inferred-type.metadata=int] #typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in [@vm.inferred-type.metadata=!] [@vm.inferred-type.metadata=!] #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi] #typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, [@vm.inferred-type.metadata=dart.core::_Smi (value: 400)] ffi::_checkAbiSpecificIntegerMapping<core::int>(#C26.{core::List::[]}(ffi::_abi()){(core::int) → core::int*})){([core::int, core::int?]) → typ::Uint8List}, #C20, #C27);
|
||||
return new ffi::Array::_<self::Incomplete>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::IncompleteArrayStruct::a0#offsetOf.{core::num::+}([@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C20, #C25);
|
||||
|
||||
[@vm.unboxing-info.metadata=()->i]
|
||||
@#C8
|
||||
|
@ -62,7 +58,7 @@ final class IncompleteArrayStruct extends ffi::Struct {
|
|||
[@vm.unboxing-info.metadata=()->i]
|
||||
@#C8
|
||||
static get #sizeOf() → core::int*
|
||||
return [@vm.inferred-type.metadata=dart.core::_Smi (value: 400)] ffi::_checkAbiSpecificIntegerMapping<core::int>(#C26.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
return [@vm.inferred-type.metadata=dart.core::_Smi (value: 400)] ffi::_checkAbiSpecificIntegerMapping<core::int>(#C27.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
}
|
||||
class _DummyAllocator extends core::Object implements ffi::Allocator /*hasConstConstructor*/ {
|
||||
|
||||
|
@ -93,10 +89,10 @@ static method testStoreLoad() → void {
|
|||
}
|
||||
static method testStoreLoadIndexed() → void {
|
||||
final ffi::Pointer<self::Incomplete> p = let final core::num #t2 = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.*] [@vm.inferred-type.metadata=int (skip check)] 2.{core::num::*}([@vm.inferred-type.metadata=dart.core::_Smi (value: 4)] self::Incomplete::#sizeOf){(core::num) → core::num} in [@vm.direct-call.metadata=#lib::_DummyAllocator.allocate] [@vm.inferred-type.metadata=dart.ffi::Pointer (skip check)] #C28.{ffi::Allocator::allocate}<self::Incomplete>(){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Incomplete>};
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::Incomplete>(p, 0, 10);
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::Incomplete>(p, 1, 3);
|
||||
core::print([@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificIntAtIndex<self::Incomplete>(p, 0));
|
||||
core::print([@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificIntAtIndex<self::Incomplete>(p, 1));
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::Incomplete>(p, #C16, 0, 10);
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::Incomplete>(p, #C16, 1, 3);
|
||||
core::print([@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificIntAtIndex<self::Incomplete>(p, #C16, 0));
|
||||
core::print([@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificIntAtIndex<self::Incomplete>(p, #C16, 1));
|
||||
[@vm.direct-call.metadata=#lib::_DummyAllocator.free] [@vm.inferred-type.metadata=!? (skip check)] #C28.{self::_DummyAllocator::free}(){(ffi::Pointer<ffi::NativeType>) → void};
|
||||
}
|
||||
static method testStruct() → void {
|
||||
|
@ -115,14 +111,14 @@ static method testInlineArray() → void {
|
|||
synthesized ffi::Array<dynamic> #array = _in::unsafeCast<ffi::Array<self::Incomplete>>(array);
|
||||
synthesized core::int #index = _in::unsafeCast<core::int>(i);
|
||||
[@vm.direct-call.metadata=dart.ffi::Array._checkIndex] [@vm.inferred-type.metadata=!? (skip check)] #array.{ffi::Array::_checkIndex}(#index){(core::int) → void};
|
||||
} =>ffi::_storeAbiSpecificIntAtIndex<self::Incomplete>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object}, #index, i);
|
||||
} =>ffi::_storeAbiSpecificIntAtIndex<self::Incomplete>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] #array.{ffi::_Compound::_offsetInBytes}{core::int}, #index, i);
|
||||
}
|
||||
for (core::int i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation.<] [@vm.inferred-type.metadata=dart.core::bool (skip check)] i.{core::num::<}(100){(core::num) → core::bool}; i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
core::print( block {
|
||||
synthesized ffi::Array<dynamic> #array = _in::unsafeCast<ffi::Array<self::Incomplete>>(array);
|
||||
synthesized core::int #index = _in::unsafeCast<core::int>(i);
|
||||
[@vm.direct-call.metadata=dart.ffi::Array._checkIndex] [@vm.inferred-type.metadata=!? (skip check)] #array.{ffi::Array::_checkIndex}(#index){(core::int) → void};
|
||||
} =>[@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificIntAtIndex<self::Incomplete>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object}, #index));
|
||||
} =>[@vm.inferred-type.metadata=int] ffi::_loadAbiSpecificIntAtIndex<self::Incomplete>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] #array.{ffi::_Compound::_offsetInBytes}{core::int}, #index));
|
||||
}
|
||||
[@vm.direct-call.metadata=#lib::_DummyAllocator.free] [@vm.inferred-type.metadata=!? (skip check)] #C28.{self::_DummyAllocator::free}(){(ffi::Pointer<ffi::NativeType>) → void};
|
||||
}
|
||||
|
@ -151,8 +147,8 @@ constants {
|
|||
#C22 = <core::Type>[#C21]
|
||||
#C23 = ffi::_FfiStructLayout {fieldTypes:#C22, packing:#C2}
|
||||
#C24 = core::pragma {name:#C11, options:#C23}
|
||||
#C25 = 400
|
||||
#C26 = <core::int*>[#C2, #C2, #C2, #C2, #C2, #C2, #C2, #C2, #C2, #C2, #C2, #C25, #C25, #C25, #C25, #C2, #C2, #C2, #C2, #C2, #C2, #C2]
|
||||
#C27 = <core::int*>[]
|
||||
#C25 = <core::int*>[]
|
||||
#C26 = 400
|
||||
#C27 = <core::int*>[#C2, #C2, #C2, #C2, #C2, #C2, #C2, #C2, #C2, #C2, #C2, #C26, #C26, #C26, #C26, #C2, #C2, #C2, #C2, #C2, #C2, #C2]
|
||||
#C28 = self::_DummyAllocator {}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ import self as self;
|
|||
import "dart:ffi" as ffi;
|
||||
import "dart:core" as core;
|
||||
import "dart:typed_data" as typ;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
import "dart:ffi";
|
||||
|
||||
|
@ -22,24 +21,24 @@ final class IncompleteStruct extends ffi::Struct {
|
|||
synthetic constructor •() → self::IncompleteStruct
|
||||
: super ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::IncompleteStruct
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::IncompleteStruct
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::IncompleteStruct
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C37
|
||||
get a0() → core::int
|
||||
return ffi::_loadAbiSpecificInt<self::Incomplete>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::IncompleteStruct::a0#offsetOf);
|
||||
return ffi::_loadAbiSpecificInt<self::Incomplete>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::IncompleteStruct::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C37
|
||||
set a0(synthesized core::int #externalFieldValue) → void
|
||||
return ffi::_storeAbiSpecificInt<self::Incomplete>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::IncompleteStruct::a0#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeAbiSpecificInt<self::Incomplete>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::IncompleteStruct::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
@#C37
|
||||
get a1() → core::int
|
||||
return ffi::_loadAbiSpecificInt<self::Incomplete>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::IncompleteStruct::a1#offsetOf);
|
||||
return ffi::_loadAbiSpecificInt<self::Incomplete>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::IncompleteStruct::a1#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C37
|
||||
set a1(synthesized core::int #externalFieldValue) → void
|
||||
return ffi::_storeAbiSpecificInt<self::Incomplete>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::IncompleteStruct::a1#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeAbiSpecificInt<self::Incomplete>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::IncompleteStruct::a1#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
@#C29
|
||||
static get a0#offsetOf() → core::int
|
||||
return #C38.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
|
@ -55,27 +54,24 @@ final class IncompleteArrayStruct extends ffi::Struct {
|
|||
synthetic constructor •() → self::IncompleteArrayStruct
|
||||
: super ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::IncompleteArrayStruct
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::IncompleteArrayStruct
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::IncompleteArrayStruct
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C46
|
||||
get a0() → ffi::Array<self::Incomplete>
|
||||
return new ffi::Array::_<self::Incomplete>( block {
|
||||
synthesized core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = self::IncompleteArrayStruct::a0#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} ffi::_fromAddress<self::Incomplete>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, ffi::_checkAbiSpecificIntegerMapping<core::int>(#C48.{core::List::[]}(ffi::_abi()){(core::int) → core::int*})){([core::int, core::int?]) → typ::Uint8List}, #C41, #C49);
|
||||
return new ffi::Array::_<self::Incomplete>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::IncompleteArrayStruct::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C41, #C47);
|
||||
@#C46
|
||||
set a0(synthesized ffi::Array<self::Incomplete> #externalFieldValue) → void
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::IncompleteArrayStruct::a0#offsetOf, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #C4, ffi::_checkAbiSpecificIntegerMapping<core::int>(#C48.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}));
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::IncompleteArrayStruct::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #externalFieldValue.{ffi::_Compound::_offsetInBytes}{core::int}, ffi::_checkAbiSpecificIntegerMapping<core::int>(#C49.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}));
|
||||
@#C29
|
||||
static get a0#offsetOf() → core::int
|
||||
return #C38.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
@#C29
|
||||
static get #sizeOf() → core::int*
|
||||
return ffi::_checkAbiSpecificIntegerMapping<core::int>(#C48.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
return ffi::_checkAbiSpecificIntegerMapping<core::int>(#C49.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
}
|
||||
class _DummyAllocator extends core::Object implements ffi::Allocator /*hasConstConstructor*/ {
|
||||
const constructor •() → self::_DummyAllocator
|
||||
|
@ -108,36 +104,36 @@ static method testStoreLoad() → void {
|
|||
}
|
||||
static method testStoreLoadIndexed() → void {
|
||||
final ffi::Pointer<self::Incomplete> p = #C51.{ffi::Allocator::allocate}<self::Incomplete>(2.{core::num::*}(self::Incomplete::#sizeOf){(core::num) → core::num}){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Incomplete>};
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::Incomplete>(p, 0, 10);
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::Incomplete>(p, 1, 3);
|
||||
core::print(ffi::_loadAbiSpecificIntAtIndex<self::Incomplete>(p, 0));
|
||||
core::print(ffi::_loadAbiSpecificIntAtIndex<self::Incomplete>(p, 1));
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::Incomplete>(p, #C4, 0, 10);
|
||||
ffi::_storeAbiSpecificIntAtIndex<self::Incomplete>(p, #C4, 1, 3);
|
||||
core::print(ffi::_loadAbiSpecificIntAtIndex<self::Incomplete>(p, #C4, 0));
|
||||
core::print(ffi::_loadAbiSpecificIntAtIndex<self::Incomplete>(p, #C4, 1));
|
||||
#C51.{self::_DummyAllocator::free}(p){(ffi::Pointer<ffi::NativeType>) → void};
|
||||
}
|
||||
static method testStruct() → void {
|
||||
final ffi::Pointer<self::IncompleteStruct> p = #C51.{ffi::Allocator::allocate}<self::IncompleteStruct>(self::IncompleteStruct::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::IncompleteStruct>};
|
||||
new self::IncompleteStruct::#fromTypedDataBase(p!).{self::IncompleteStruct::a0} = 1;
|
||||
core::print(new self::IncompleteStruct::#fromTypedDataBase(p!).{self::IncompleteStruct::a0}{core::int});
|
||||
new self::IncompleteStruct::#fromTypedDataBase(p!).{self::IncompleteStruct::a0} = 2;
|
||||
core::print(new self::IncompleteStruct::#fromTypedDataBase(p!).{self::IncompleteStruct::a0}{core::int});
|
||||
new self::IncompleteStruct::#fromTypedDataBase(p!, #C4).{self::IncompleteStruct::a0} = 1;
|
||||
core::print(new self::IncompleteStruct::#fromTypedDataBase(p!, #C4).{self::IncompleteStruct::a0}{core::int});
|
||||
new self::IncompleteStruct::#fromTypedDataBase(p!, #C4).{self::IncompleteStruct::a0} = 2;
|
||||
core::print(new self::IncompleteStruct::#fromTypedDataBase(p!, #C4).{self::IncompleteStruct::a0}{core::int});
|
||||
#C51.{self::_DummyAllocator::free}(p){(ffi::Pointer<ffi::NativeType>) → void};
|
||||
}
|
||||
static method testInlineArray() → void {
|
||||
final ffi::Pointer<self::IncompleteArrayStruct> p = #C51.{ffi::Allocator::allocate}<self::IncompleteArrayStruct>(self::IncompleteArrayStruct::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::IncompleteArrayStruct>};
|
||||
final ffi::Array<self::Incomplete> array = new self::IncompleteArrayStruct::#fromTypedDataBase(p!).{self::IncompleteArrayStruct::a0}{ffi::Array<self::Incomplete>};
|
||||
final ffi::Array<self::Incomplete> array = new self::IncompleteArrayStruct::#fromTypedDataBase(p!, #C4).{self::IncompleteArrayStruct::a0}{ffi::Array<self::Incomplete>};
|
||||
for (core::int i = 0; i.{core::num::<}(100){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
block {
|
||||
synthesized ffi::Array<dynamic> #array = array!;
|
||||
synthesized core::int #index = i!;
|
||||
#array.{ffi::Array::_checkIndex}(#index){(core::int) → void};
|
||||
} =>ffi::_storeAbiSpecificIntAtIndex<self::Incomplete>(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #index, i);
|
||||
} =>ffi::_storeAbiSpecificIntAtIndex<self::Incomplete>(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #array.{ffi::_Compound::_offsetInBytes}{core::int}, #index, i);
|
||||
}
|
||||
for (core::int i = 0; i.{core::num::<}(100){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) {
|
||||
core::print( block {
|
||||
synthesized ffi::Array<dynamic> #array = array!;
|
||||
synthesized core::int #index = i!;
|
||||
#array.{ffi::Array::_checkIndex}(#index){(core::int) → void};
|
||||
} =>ffi::_loadAbiSpecificIntAtIndex<self::Incomplete>(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #index));
|
||||
} =>ffi::_loadAbiSpecificIntAtIndex<self::Incomplete>(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #array.{ffi::_Compound::_offsetInBytes}{core::int}, #index));
|
||||
}
|
||||
#C51.{self::_DummyAllocator::free}(p){(ffi::Pointer<ffi::NativeType>) → void};
|
||||
}
|
||||
|
@ -188,9 +184,9 @@ constants {
|
|||
#C44 = ffi::_FfiStructLayout {fieldTypes:#C43, packing:#C23}
|
||||
#C45 = core::pragma {name:#C32, options:#C44}
|
||||
#C46 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C41, dimension2:#C23, dimension3:#C23, dimension4:#C23, dimension5:#C23, dimensions:#C23}
|
||||
#C47 = 400
|
||||
#C48 = <core::int*>[#C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C47, #C47, #C47, #C47, #C23, #C23, #C23, #C23, #C23, #C23, #C23]
|
||||
#C49 = <core::int*>[]
|
||||
#C47 = <core::int*>[]
|
||||
#C48 = 400
|
||||
#C49 = <core::int*>[#C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C48, #C48, #C48, #C48, #C23, #C23, #C23, #C23, #C23, #C23, #C23]
|
||||
#C50 = core::_Override {}
|
||||
#C51 = self::_DummyAllocator {}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ import self as self;
|
|||
import "dart:core" as core;
|
||||
import "dart:ffi" as ffi;
|
||||
import "dart:typed_data" as typ;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
import "dart:ffi";
|
||||
|
||||
|
@ -12,26 +11,28 @@ final class Coordinate extends ffi::Struct {
|
|||
synthetic constructor •() → self::Coordinate
|
||||
: super ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C7
|
||||
get x() → core::int
|
||||
return ffi::_loadInt64(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf);
|
||||
return ffi::_loadInt64(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C7
|
||||
set x(synthesized core::int #externalFieldValue) → void
|
||||
return ffi::_storeInt64(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeInt64(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
@#C7
|
||||
get y() → core::int
|
||||
return ffi::_loadInt64(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf);
|
||||
return ffi::_loadInt64(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C7
|
||||
set y(synthesized core::int #externalFieldValue) → void
|
||||
return ffi::_storeInt64(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeInt64(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
method copyInto(ffi::Pointer<self::Coordinate> ptr) → void {
|
||||
ffi::_memCopy(ptr, #C8, this.{ffi::_Compound::_typedDataBase}{core::Object}, #C8, self::Coordinate::#sizeOf);
|
||||
block {
|
||||
synthesized self::Coordinate #source = this;
|
||||
} =>ffi::_memCopy(ptr, #C8, #source.{ffi::_Compound::_typedDataBase}{core::Object}, #source.{ffi::_Compound::_offsetInBytes}{core::int}, self::Coordinate::#sizeOf);
|
||||
}
|
||||
@#C10
|
||||
static get x#offsetOf() → core::int
|
||||
|
@ -48,27 +49,26 @@ final class SomeUnion extends ffi::Union {
|
|||
synthetic constructor •() → self::SomeUnion
|
||||
: super ffi::Union::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::SomeUnion
|
||||
: super ffi::Union::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::SomeUnion
|
||||
: super ffi::Union::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::SomeUnion
|
||||
: super ffi::Union::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get coordinate() → self::Coordinate
|
||||
return new self::Coordinate::#fromTypedDataBase( block {
|
||||
synthesized core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = self::SomeUnion::coordinate#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} ffi::_fromAddress<self::Coordinate>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List});
|
||||
return new self::Coordinate::#fromTypedDataBase(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::SomeUnion::coordinate#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
set coordinate(synthesized self::Coordinate #externalFieldValue) → void
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::SomeUnion::coordinate#offsetOf, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #C8, #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::SomeUnion::coordinate#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #externalFieldValue.{ffi::_Compound::_offsetInBytes}{core::int}, #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
@#C7
|
||||
get id() → core::int
|
||||
return ffi::_loadInt64(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::SomeUnion::id#offsetOf);
|
||||
return ffi::_loadInt64(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::SomeUnion::id#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C7
|
||||
set id(synthesized core::int #externalFieldValue) → void
|
||||
return ffi::_storeInt64(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::SomeUnion::id#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeInt64(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::SomeUnion::id#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
method copyIntoAtIndex(ffi::Pointer<self::SomeUnion> ptr, core::int index) → void {
|
||||
ffi::_memCopy(ptr, index.{core::num::*}(self::SomeUnion::#sizeOf){(core::num) → core::num}, this.{ffi::_Compound::_typedDataBase}{core::Object}, #C8, self::SomeUnion::#sizeOf);
|
||||
block {
|
||||
synthesized self::SomeUnion #source = this;
|
||||
} =>ffi::_memCopy(ptr, index.{core::num::*}(self::SomeUnion::#sizeOf){(core::num) → core::num}, #source.{ffi::_Compound::_typedDataBase}{core::Object}, #source.{ffi::_Compound::_offsetInBytes}{core::int}, self::SomeUnion::#sizeOf);
|
||||
}
|
||||
@#C10
|
||||
static get coordinate#offsetOf() → core::int
|
||||
|
|
|
@ -16,7 +16,7 @@ final class Struct1ByteInt extends ffi::Struct {
|
|||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1]
|
||||
[@vm.unboxing-info.metadata=()->i]
|
||||
get a0() → core::int
|
||||
return [@vm.inferred-type.metadata=int] ffi::_loadInt8([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::Struct1ByteInt::a0#offsetOf);
|
||||
return [@vm.inferred-type.metadata=int] ffi::_loadInt8([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::Struct1ByteInt::a0#offsetOf.{core::num::+}([@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
|
||||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:2,getterSelectorId:3]
|
||||
[@vm.unboxing-info.metadata=[!regcc]]
|
||||
|
|
|
@ -12,18 +12,18 @@ final class Struct1ByteInt extends ffi::Struct {
|
|||
synthetic constructor •() → self::Struct1ByteInt
|
||||
: super ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::Struct1ByteInt
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Struct1ByteInt
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Struct1ByteInt
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C7
|
||||
get a0() → core::int
|
||||
return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Struct1ByteInt::a0#offsetOf);
|
||||
return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Struct1ByteInt::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C7
|
||||
set a0(synthesized core::int #externalFieldValue) → void
|
||||
return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Struct1ByteInt::a0#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Struct1ByteInt::a0#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
method toString() → core::String
|
||||
return "(${this.{self::Struct1ByteInt::a0}{core::int}})";
|
||||
@#C9
|
||||
|
@ -42,7 +42,7 @@ static method main() → void {
|
|||
@#C9
|
||||
static method returnStruct1ByteIntNative(core::int a0) → self::Struct1ByteInt
|
||||
return block {
|
||||
_in::_nativeEffect(new self::Struct1ByteInt::#fromTypedDataBase(typ::Uint8List::•(#C12)));
|
||||
_in::_nativeEffect(new self::Struct1ByteInt::#fromTypedDataBase(typ::Uint8List::•(#C12), #C10));
|
||||
} =>self::_returnStruct1ByteIntNative$Method$FfiNative(a0);
|
||||
@#C21
|
||||
external static method _returnStruct1ByteIntNative$Method$FfiNative(core::int #t0) → self::Struct1ByteInt;
|
||||
|
|
|
@ -3,7 +3,6 @@ import self as self;
|
|||
import "dart:core" as core;
|
||||
import "dart:ffi" as ffi;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:typed_data" as typ;
|
||||
|
||||
import "dart:ffi";
|
||||
|
||||
|
@ -16,12 +15,12 @@ final class Vec2d extends ffi::Struct {
|
|||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1]
|
||||
[@vm.unboxing-info.metadata=()->d]
|
||||
get x() → core::double
|
||||
return [@vm.inferred-type.metadata=dart.core::_Double] ffi::_loadDouble([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::Vec2d::x#offsetOf);
|
||||
return [@vm.inferred-type.metadata=dart.core::_Double] ffi::_loadDouble([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::Vec2d::x#offsetOf.{core::num::+}([@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
|
||||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:2]
|
||||
[@vm.unboxing-info.metadata=()->d]
|
||||
get y() → core::double
|
||||
return [@vm.inferred-type.metadata=dart.core::_Double] ffi::_loadDouble([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.inferred-type.metadata=dart.core::_Smi (value: 8)] self::Vec2d::y#offsetOf);
|
||||
return [@vm.inferred-type.metadata=dart.core::_Double] ffi::_loadDouble([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi (value: 8)] self::Vec2d::y#offsetOf.{core::num::+}([@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
|
||||
[@vm.unboxing-info.metadata=()->i]
|
||||
@#C8
|
||||
|
@ -41,7 +40,7 @@ final class MyUnion extends ffi::Union {
|
|||
|
||||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3]
|
||||
set indirectVector([@vm.inferred-arg-type.metadata=dart.ffi::Pointer] synthesized ffi::Pointer<self::Vec2d> #externalFieldValue) → void
|
||||
return ffi::_storePointer<self::Vec2d>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::MyUnion::indirectVector#offsetOf, #externalFieldValue);
|
||||
return ffi::_storePointer<self::Vec2d>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::MyUnion::indirectVector#offsetOf.{core::num::+}([@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
|
||||
[@vm.unboxing-info.metadata=()->i]
|
||||
@#C8
|
||||
|
@ -70,9 +69,9 @@ static get union() → self::MyUnion
|
|||
return new self::MyUnion::#fromTypedDataBase([@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::Native::_addressOf<self::MyUnion>(#C31));
|
||||
@#C35
|
||||
static get manyNumbers() → ffi::Array<ffi::Array<ffi::Array<ffi::Double>>>
|
||||
return new ffi::Array::_<ffi::Array<ffi::Array<ffi::Double>>>([@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::Native::_addressOf<ffi::Array<ffi::Array<ffi::Array<ffi::Double>>>>(#C34), #C36, #C39);
|
||||
return new ffi::Array::_<ffi::Array<ffi::Array<ffi::Double>>>([@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::Native::_addressOf<ffi::Array<ffi::Array<ffi::Array<ffi::Double>>>>(#C34), #C9, #C36, #C39);
|
||||
static set manyNumbers([@vm.inferred-arg-type.metadata=dart.ffi::Array<dart.ffi::Array<dart.ffi::Array<dart.ffi::Double>>>] synthesized ffi::Array<ffi::Array<ffi::Array<ffi::Double>>> #externalFieldValue) → void
|
||||
ffi::_memCopy([@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::Native::_addressOf<ffi::Array<ffi::Array<ffi::Array<ffi::Double>>>>(#C34), #C9, [@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #C9, #C41.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
ffi::_memCopy([@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::Native::_addressOf<ffi::Array<ffi::Array<ffi::Array<ffi::Double>>>>(#C34), #C9, [@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] #externalFieldValue.{ffi::_Compound::_offsetInBytes}{core::int}, #C41.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
static method main() → void {
|
||||
core::print("first char of string: ${ffi::_loadAbiSpecificInt<ffi::Char>([@vm.inferred-type.metadata=dart.ffi::Pointer] self::aString, #C9)}");
|
||||
core::print("global int: {${self::anInt}}");
|
||||
|
@ -93,19 +92,13 @@ static method main() → void {
|
|||
synthesized core::int #singleElementSize = #C11;
|
||||
synthesized core::int #elementSize = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.*] [@vm.inferred-type.metadata=int (skip check)] #singleElementSize.{core::num::*}([@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsFlattened] [@vm.inferred-type.metadata=int] #array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
|
||||
synthesized core::int #offset = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.*] [@vm.inferred-type.metadata=int (skip check)] #elementSize.{core::num::*}(#index){(core::num) → core::num};
|
||||
} =>new ffi::Array::_<ffi::Array<ffi::Double>>( block {
|
||||
synthesized core::Object #typedDataBase = [@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = #offset;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} [@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::_fromAddress<ffi::Array<ffi::Double>>([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.direct-call.metadata=dart.ffi::Pointer.address] [@vm.inferred-type.metadata=int] #typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in [@vm.inferred-type.metadata=!] [@vm.inferred-type.metadata=!] #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi] #typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #elementSize){([core::int, core::int?]) → typ::Uint8List}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsFirst] [@vm.inferred-type.metadata=int] #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsRest] [@vm.inferred-type.metadata=!] #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}));
|
||||
} =>new ffi::Array::_<ffi::Array<ffi::Double>>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+??] [@vm.inferred-type.metadata=int (skip check)] [@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] #array.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsFirst] [@vm.inferred-type.metadata=int] #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsRest] [@vm.inferred-type.metadata=!] #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}));
|
||||
synthesized core::int #index = _in::unsafeCast<core::int>(1);
|
||||
[@vm.direct-call.metadata=dart.ffi::Array._checkIndex] [@vm.inferred-type.metadata=!? (skip check)] #array.{ffi::Array::_checkIndex}(#index){(core::int) → void};
|
||||
synthesized core::int #singleElementSize = #C11;
|
||||
synthesized core::int #elementSize = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.*] [@vm.inferred-type.metadata=int (skip check)] #singleElementSize.{core::num::*}([@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsFlattened] [@vm.inferred-type.metadata=int] #array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
|
||||
synthesized core::int #offset = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.*] [@vm.inferred-type.metadata=int (skip check)] #elementSize.{core::num::*}(#index){(core::num) → core::num};
|
||||
} =>new ffi::Array::_<ffi::Double>( block {
|
||||
synthesized core::Object #typedDataBase = [@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = #offset;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} [@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::_fromAddress<ffi::Double>([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.direct-call.metadata=dart.ffi::Pointer.address] [@vm.inferred-type.metadata=int] #typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in [@vm.inferred-type.metadata=!] [@vm.inferred-type.metadata=!] #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi] #typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #elementSize){([core::int, core::int?]) → typ::Uint8List}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsFirst] [@vm.inferred-type.metadata=int] #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsRest] [@vm.inferred-type.metadata=!] #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}), 2, 123.45);
|
||||
} =>new ffi::Array::_<ffi::Double>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+??] [@vm.inferred-type.metadata=int (skip check)] [@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] #array.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsFirst] [@vm.inferred-type.metadata=int] #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsRest] [@vm.inferred-type.metadata=!] #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}), 2, 123.45);
|
||||
self::manyNumbers = wholeArray;
|
||||
ffi::DoubleArray|[]=( block {
|
||||
synthesized ffi::Array<dynamic> #array = _in::unsafeCast<ffi::Array<ffi::Array<ffi::Double>>>( block {
|
||||
|
@ -115,19 +108,13 @@ static method main() → void {
|
|||
synthesized core::int #singleElementSize = #C11;
|
||||
synthesized core::int #elementSize = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.*] [@vm.inferred-type.metadata=int (skip check)] #singleElementSize.{core::num::*}([@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsFlattened] [@vm.inferred-type.metadata=int] #array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
|
||||
synthesized core::int #offset = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.*] [@vm.inferred-type.metadata=int (skip check)] #elementSize.{core::num::*}(#index){(core::num) → core::num};
|
||||
} =>new ffi::Array::_<ffi::Array<ffi::Double>>( block {
|
||||
synthesized core::Object #typedDataBase = [@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = #offset;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} [@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::_fromAddress<ffi::Array<ffi::Double>>([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.direct-call.metadata=dart.ffi::Pointer.address] [@vm.inferred-type.metadata=int] #typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in [@vm.inferred-type.metadata=!] [@vm.inferred-type.metadata=!] #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi] #typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #elementSize){([core::int, core::int?]) → typ::Uint8List}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsFirst] [@vm.inferred-type.metadata=int] #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsRest] [@vm.inferred-type.metadata=!] #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}));
|
||||
} =>new ffi::Array::_<ffi::Array<ffi::Double>>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+??] [@vm.inferred-type.metadata=int (skip check)] [@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] #array.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsFirst] [@vm.inferred-type.metadata=int] #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsRest] [@vm.inferred-type.metadata=!] #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}));
|
||||
synthesized core::int #index = _in::unsafeCast<core::int>(0);
|
||||
[@vm.direct-call.metadata=dart.ffi::Array._checkIndex] [@vm.inferred-type.metadata=!? (skip check)] #array.{ffi::Array::_checkIndex}(#index){(core::int) → void};
|
||||
synthesized core::int #singleElementSize = #C11;
|
||||
synthesized core::int #elementSize = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.*] [@vm.inferred-type.metadata=int (skip check)] #singleElementSize.{core::num::*}([@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsFlattened] [@vm.inferred-type.metadata=int] #array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
|
||||
synthesized core::int #offset = [@vm.direct-call.metadata=dart.core::_IntegerImplementation.*] [@vm.inferred-type.metadata=int (skip check)] #elementSize.{core::num::*}(#index){(core::num) → core::num};
|
||||
} =>new ffi::Array::_<ffi::Double>( block {
|
||||
synthesized core::Object #typedDataBase = [@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = #offset;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} [@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::_fromAddress<ffi::Double>([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.direct-call.metadata=dart.ffi::Pointer.address] [@vm.inferred-type.metadata=int] #typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in [@vm.inferred-type.metadata=!] [@vm.inferred-type.metadata=!] #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi] #typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #elementSize){([core::int, core::int?]) → typ::Uint8List}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsFirst] [@vm.inferred-type.metadata=int] #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsRest] [@vm.inferred-type.metadata=!] #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}), 0, 54.321);
|
||||
} =>new ffi::Array::_<ffi::Double>([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] #array.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+??] [@vm.inferred-type.metadata=int (skip check)] [@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] #array.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsFirst] [@vm.inferred-type.metadata=int] #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, [@vm.direct-call.metadata=dart.ffi::Array._nestedDimensionsRest] [@vm.inferred-type.metadata=!] #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}), 0, 54.321);
|
||||
}
|
||||
constants {
|
||||
#C1 = "vm:ffi:struct-fields"
|
||||
|
|
|
@ -3,7 +3,6 @@ import self as self;
|
|||
import "dart:core" as core;
|
||||
import "dart:ffi" as ffi;
|
||||
import "dart:typed_data" as typ;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
import "dart:ffi";
|
||||
|
||||
|
@ -12,24 +11,24 @@ final class Vec2d extends ffi::Struct {
|
|||
synthetic constructor •() → self::Vec2d
|
||||
: super ffi::Struct::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::Vec2d
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Vec2d
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Vec2d
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
@#C7
|
||||
get x() → core::double
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Vec2d::x#offsetOf);
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Vec2d::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C7
|
||||
set x(synthesized core::double #externalFieldValue) → void
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Vec2d::x#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Vec2d::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
@#C7
|
||||
get y() → core::double
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Vec2d::y#offsetOf);
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Vec2d::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C7
|
||||
set y(synthesized core::double #externalFieldValue) → void
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Vec2d::y#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Vec2d::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
@#C9
|
||||
static get x#offsetOf() → core::int
|
||||
return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
|
@ -45,23 +44,20 @@ final class MyUnion extends ffi::Union {
|
|||
synthetic constructor •() → self::MyUnion
|
||||
: super ffi::Union::•()
|
||||
;
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::MyUnion
|
||||
: super ffi::Union::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::MyUnion
|
||||
: super ffi::Union::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::MyUnion
|
||||
: super ffi::Union::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
get vector() → self::Vec2d
|
||||
return new self::Vec2d::#fromTypedDataBase( block {
|
||||
synthesized core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = self::MyUnion::vector#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} ffi::_fromAddress<self::Vec2d>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List});
|
||||
return new self::Vec2d::#fromTypedDataBase(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::vector#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
set vector(synthesized self::Vec2d #externalFieldValue) → void
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::vector#offsetOf, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #C10, #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::vector#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #externalFieldValue.{ffi::_Compound::_offsetInBytes}{core::int}, #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
get indirectVector() → ffi::Pointer<self::Vec2d>
|
||||
return ffi::_loadPointer<self::Vec2d>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::indirectVector#offsetOf);
|
||||
return ffi::_loadPointer<self::Vec2d>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::indirectVector#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
set indirectVector(synthesized ffi::Pointer<self::Vec2d> #externalFieldValue) → void
|
||||
return ffi::_storePointer<self::Vec2d>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::indirectVector#offsetOf, #externalFieldValue);
|
||||
return ffi::_storePointer<self::Vec2d>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::indirectVector#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
@#C9
|
||||
static get vector#offsetOf() → core::int
|
||||
return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
|
@ -89,19 +85,19 @@ static set anotherInt(synthesized core::int #externalFieldValue) → void
|
|||
ffi::_storeAbiSpecificInt<ffi::Int>(ffi::Native::_addressOf<ffi::Int>(#C31), #C10, #externalFieldValue);
|
||||
@#C35
|
||||
static get vector() → self::Vec2d
|
||||
return new self::Vec2d::#fromTypedDataBase(ffi::Native::_addressOf<self::Vec2d>(#C34));
|
||||
return new self::Vec2d::#fromTypedDataBase(ffi::Native::_addressOf<self::Vec2d>(#C34), #C10);
|
||||
@#C38
|
||||
static get union() → self::MyUnion
|
||||
return new self::MyUnion::#fromTypedDataBase(ffi::Native::_addressOf<self::MyUnion>(#C37));
|
||||
return new self::MyUnion::#fromTypedDataBase(ffi::Native::_addressOf<self::MyUnion>(#C37), #C10);
|
||||
static set union(synthesized self::MyUnion #externalFieldValue) → void
|
||||
ffi::_memCopy(ffi::Native::_addressOf<self::MyUnion>(#C37), #C10, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #C10, self::MyUnion::#sizeOf);
|
||||
ffi::_memCopy(ffi::Native::_addressOf<self::MyUnion>(#C37), #C10, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #externalFieldValue.{ffi::_Compound::_offsetInBytes}{core::int}, self::MyUnion::#sizeOf);
|
||||
@#C42
|
||||
@#C45
|
||||
static get manyNumbers() → ffi::Array<ffi::Array<ffi::Array<ffi::Double>>>
|
||||
return new ffi::Array::_<ffi::Array<ffi::Array<ffi::Double>>>(ffi::Native::_addressOf<ffi::Array<ffi::Array<ffi::Array<ffi::Double>>>>(#C44), #C39, #C46);
|
||||
return new ffi::Array::_<ffi::Array<ffi::Array<ffi::Double>>>(ffi::Native::_addressOf<ffi::Array<ffi::Array<ffi::Array<ffi::Double>>>>(#C44), #C10, #C39, #C46);
|
||||
@#C42
|
||||
static set manyNumbers(synthesized ffi::Array<ffi::Array<ffi::Array<ffi::Double>>> #externalFieldValue) → void
|
||||
ffi::_memCopy(ffi::Native::_addressOf<ffi::Array<ffi::Array<ffi::Array<ffi::Double>>>>(#C44), #C10, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #C10, #C48.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
ffi::_memCopy(ffi::Native::_addressOf<ffi::Array<ffi::Array<ffi::Array<ffi::Double>>>>(#C44), #C10, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #externalFieldValue.{ffi::_Compound::_offsetInBytes}{core::int}, #C48.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
||||
static method main() → void {
|
||||
core::print("first char of string: ${ffi::_loadAbiSpecificInt<ffi::Char>(self::aString, #C10)}");
|
||||
core::print("global int: {${self::anInt}}");
|
||||
|
@ -122,19 +118,13 @@ static method main() → void {
|
|||
synthesized core::int #singleElementSize = #C12;
|
||||
synthesized core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
|
||||
synthesized core::int #offset = #elementSize.{core::num::*}(#index){(core::num) → core::num};
|
||||
} =>new ffi::Array::_<ffi::Array<ffi::Double>>( block {
|
||||
synthesized core::Object #typedDataBase = #array.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = #offset;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Double>>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #elementSize){([core::int, core::int?]) → typ::Uint8List}, #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}))!;
|
||||
} =>new ffi::Array::_<ffi::Array<ffi::Double>>(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #array.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}))!;
|
||||
synthesized core::int #index = 1!;
|
||||
#array.{ffi::Array::_checkIndex}(#index){(core::int) → void};
|
||||
synthesized core::int #singleElementSize = #C12;
|
||||
synthesized core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
|
||||
synthesized core::int #offset = #elementSize.{core::num::*}(#index){(core::num) → core::num};
|
||||
} =>new ffi::Array::_<ffi::Double>( block {
|
||||
synthesized core::Object #typedDataBase = #array.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = #offset;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} ffi::_fromAddress<ffi::Double>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #elementSize){([core::int, core::int?]) → typ::Uint8List}, #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}), 2, 123.45);
|
||||
} =>new ffi::Array::_<ffi::Double>(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #array.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}), 2, 123.45);
|
||||
self::manyNumbers = wholeArray;
|
||||
ffi::DoubleArray|[]=( block {
|
||||
synthesized ffi::Array<dynamic> #array = ( block {
|
||||
|
@ -144,19 +134,13 @@ static method main() → void {
|
|||
synthesized core::int #singleElementSize = #C12;
|
||||
synthesized core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
|
||||
synthesized core::int #offset = #elementSize.{core::num::*}(#index){(core::num) → core::num};
|
||||
} =>new ffi::Array::_<ffi::Array<ffi::Double>>( block {
|
||||
synthesized core::Object #typedDataBase = #array.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = #offset;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} ffi::_fromAddress<ffi::Array<ffi::Double>>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #elementSize){([core::int, core::int?]) → typ::Uint8List}, #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}))!;
|
||||
} =>new ffi::Array::_<ffi::Array<ffi::Double>>(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #array.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}))!;
|
||||
synthesized core::int #index = 0!;
|
||||
#array.{ffi::Array::_checkIndex}(#index){(core::int) → void};
|
||||
synthesized core::int #singleElementSize = #C12;
|
||||
synthesized core::int #elementSize = #singleElementSize.{core::num::*}(#array.{ffi::Array::_nestedDimensionsFlattened}{core::int}){(core::num) → core::num};
|
||||
synthesized core::int #offset = #elementSize.{core::num::*}(#index){(core::num) → core::num};
|
||||
} =>new ffi::Array::_<ffi::Double>( block {
|
||||
synthesized core::Object #typedDataBase = #array.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = #offset;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} ffi::_fromAddress<ffi::Double>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #elementSize){([core::int, core::int?]) → typ::Uint8List}, #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}), 0, 54.321);
|
||||
} =>new ffi::Array::_<ffi::Double>(#array.{ffi::_Compound::_typedDataBase}{core::Object}, #array.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #array.{ffi::Array::_nestedDimensionsFirst}{core::int}, #array.{ffi::Array::_nestedDimensionsRest}{core::List<core::int>}), 0, 54.321);
|
||||
}
|
||||
constants {
|
||||
#C1 = "vm:ffi:struct-fields"
|
||||
|
|
|
@ -32,22 +32,22 @@ final class Coordinate extends ffi::Struct {
|
|||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]
|
||||
[@vm.unboxing-info.metadata=()->d]
|
||||
get x() → core::double
|
||||
return [@vm.inferred-type.metadata=dart.core::_Double] ffi::_loadDouble([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::Coordinate::x#offsetOf);
|
||||
return [@vm.inferred-type.metadata=dart.core::_Double] ffi::_loadDouble([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::Coordinate::x#offsetOf.{core::num::+}([@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
|
||||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]
|
||||
[@vm.unboxing-info.metadata=(d)->b]
|
||||
set x([@vm.inferred-arg-type.metadata=dart.core::_Double] synthesized core::double #externalFieldValue) → void
|
||||
return ffi::_storeDouble([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::Coordinate::x#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeDouble([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::Coordinate::x#offsetOf.{core::num::+}([@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
|
||||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]
|
||||
[@vm.unboxing-info.metadata=()->d]
|
||||
get y() → core::double
|
||||
return [@vm.inferred-type.metadata=dart.core::_Double] ffi::_loadDouble([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.inferred-type.metadata=dart.core::_Smi (value: 8)] self::Coordinate::y#offsetOf);
|
||||
return [@vm.inferred-type.metadata=dart.core::_Double] ffi::_loadDouble([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi (value: 8)] self::Coordinate::y#offsetOf.{core::num::+}([@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
|
||||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]
|
||||
[@vm.unboxing-info.metadata=(d)->b]
|
||||
set y([@vm.inferred-arg-type.metadata=dart.core::_Double] synthesized core::double #externalFieldValue) → void
|
||||
return ffi::_storeDouble([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.inferred-type.metadata=dart.core::_Smi (value: 8)] self::Coordinate::y#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeDouble([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi (value: 8)] self::Coordinate::y#offsetOf.{core::num::+}([@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
|
||||
[@vm.unboxing-info.metadata=()->i]
|
||||
@#C8
|
||||
|
|
|
@ -11,14 +11,14 @@ import "package:expect/expect.dart";
|
|||
|
||||
@#C6
|
||||
final class Coordinate extends ffi::Struct {
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Coordinate
|
||||
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
|
||||
;
|
||||
static factory •({core::double? x = #C4, core::double? y = #C4}) → self::Coordinate {
|
||||
final self::Coordinate result = new self::Coordinate::#fromTypedDataBase(typ::Uint8List::•(self::Coordinate::#sizeOf));
|
||||
final self::Coordinate result = new self::Coordinate::#fromTypedDataBase(typ::Uint8List::•(self::Coordinate::#sizeOf), #C7);
|
||||
if(!(x == null))
|
||||
result.{self::Coordinate::x} = x{core::double};
|
||||
if(!(y == null))
|
||||
|
@ -30,16 +30,16 @@ final class Coordinate extends ffi::Struct {
|
|||
}
|
||||
@#C8
|
||||
get x() → core::double
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf);
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C8
|
||||
set x(synthesized core::double #externalFieldValue) → void
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
@#C8
|
||||
get y() → core::double
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf);
|
||||
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
@#C8
|
||||
set y(synthesized core::double #externalFieldValue) → void
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf, #externalFieldValue);
|
||||
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
|
||||
@#C10
|
||||
static get x#offsetOf() → core::int
|
||||
return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
|
|
|
@ -2,27 +2,27 @@ library #lib;
|
|||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:ffi" as ffi;
|
||||
import "dart:typed_data" as typ;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:typed_data" as typ;
|
||||
|
||||
import "dart:ffi";
|
||||
|
||||
@#C6
|
||||
final class Struct1 extends ffi::Struct {
|
||||
constructor #fromTypedDataBase([@vm.inferred-arg-type.metadata=dart.typed_data::_Uint8List] synthesized core::Object #typedDataBase) → self::Struct1
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #C7)
|
||||
;
|
||||
}
|
||||
@#C6
|
||||
final class Struct2 extends ffi::Struct {
|
||||
constructor #fromTypedDataBase([@vm.inferred-arg-type.metadata=dart.typed_data::_Uint8List] synthesized core::Object #typedDataBase) → self::Struct2
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #C7)
|
||||
;
|
||||
}
|
||||
@#C6
|
||||
final class Struct3 extends ffi::Struct {
|
||||
constructor #fromTypedDataBase([@vm.inferred-arg-type.metadata=dart.typed_data::_Uint8List] synthesized core::Object #typedDataBase) → self::Struct3
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #C7)
|
||||
;
|
||||
}
|
||||
@#C6
|
||||
|
@ -34,36 +34,35 @@ abstract final class Struct6 extends ffi::Struct {
|
|||
@#C6
|
||||
abstract final class Struct7 extends ffi::Struct {
|
||||
}
|
||||
@#C10
|
||||
@#C11
|
||||
final class Struct11 extends ffi::Struct {
|
||||
constructor #fromTypedDataBase([@vm.inferred-arg-type.metadata=dart.ffi::Pointer] synthesized core::Object #typedDataBase) → self::Struct11
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #C7)
|
||||
;
|
||||
|
||||
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1]
|
||||
get nested() → self::Struct12
|
||||
return new self::Struct12::#fromTypedDataBase( block {
|
||||
synthesized core::Object #typedDataBase = [@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object};
|
||||
synthesized core::int #offset = [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::Struct11::nested#offsetOf;
|
||||
} =>#typedDataBase is{ForLegacy} ffi::Pointer<ffi::NativeType> ?{core::Object} [@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::_fromAddress<self::Struct12>([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.direct-call.metadata=dart.ffi::Pointer.address] [@vm.inferred-type.metadata=int] #typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let synthesized typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in [@vm.inferred-type.metadata=!] [@vm.inferred-type.metadata=!] #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi] #typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #C13.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List});
|
||||
return new self::Struct12::#fromTypedDataBase([@vm.direct-call.metadata=dart.ffi::_Compound._typedDataBase] this.{ffi::_Compound::_typedDataBase}{core::Object}, [@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] [@vm.inferred-type.metadata=dart.core::_Smi (value: 0)] self::Struct11::nested#offsetOf.{core::num::+}([@vm.direct-call.metadata=dart.ffi::_Compound._offsetInBytes] [@vm.inferred-type.metadata=int?] this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
|
||||
|
||||
[@vm.unboxing-info.metadata=()->i]
|
||||
@#C15
|
||||
@#C13
|
||||
static get nested#offsetOf() → core::int
|
||||
return #C17.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
return #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int*};
|
||||
}
|
||||
@#C6
|
||||
final class Struct12 extends ffi::Struct {
|
||||
constructor #fromTypedDataBase([@vm.inferred-arg-type.metadata=!] synthesized core::Object #typedDataBase) → self::Struct12
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
||||
|
||||
[@vm.unboxing-info.metadata=(b,i)->b]
|
||||
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, [@vm.inferred-arg-type.metadata=int] synthesized core::int #offsetInBytes) → self::Struct12
|
||||
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
|
||||
;
|
||||
}
|
||||
|
||||
[@vm.inferred-type.metadata=dart.ffi::Pointer]
|
||||
static final field ffi::Pointer<ffi::NativeFunction<(self::Struct3) → ffi::Int32>> _#ffiCallback0 = [@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::_createNativeCallableIsolateLocal<ffi::NativeFunction<(self::Struct3) → ffi::Int32>>(ffi::_nativeCallbackFunction<(self::Struct3) → ffi::Int32>(#C18, 0), null, false)/*isLegacy*/;
|
||||
static final field ffi::Pointer<ffi::NativeFunction<(self::Struct3) → ffi::Int32>> _#ffiCallback0 = [@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::_createNativeCallableIsolateLocal<ffi::NativeFunction<(self::Struct3) → ffi::Int32>>(ffi::_nativeCallbackFunction<(self::Struct3) → ffi::Int32>(#C15, 0), null, false)/*isLegacy*/;
|
||||
|
||||
[@vm.inferred-type.metadata=dart.ffi::Pointer]
|
||||
static final field ffi::Pointer<ffi::NativeFunction<() → self::Struct7>> _#ffiCallback1 = [@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::_createNativeCallableIsolateLocal<ffi::NativeFunction<() → self::Struct7>>(ffi::_nativeCallbackFunction<() → self::Struct7>(#C19, null), null, false)/*isLegacy*/;
|
||||
static final field ffi::Pointer<ffi::NativeFunction<() → self::Struct7>> _#ffiCallback1 = [@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::_createNativeCallableIsolateLocal<ffi::NativeFunction<() → self::Struct7>>(ffi::_nativeCallbackFunction<() → self::Struct7>(#C16, null), null, false)/*isLegacy*/;
|
||||
static method main() → void {
|
||||
self::testLookupFunctionReturn();
|
||||
self::testLookupFunctionArgument();
|
||||
|
@ -79,12 +78,12 @@ static method main() → void {
|
|||
static method testLookupFunctionReturn() → void {
|
||||
final ffi::DynamicLibrary dylib = [@vm.inferred-type.metadata=dart.ffi::DynamicLibrary] ffi::DynamicLibrary::executable();
|
||||
final () → self::Struct1 function1 = block {
|
||||
_in::_nativeEffect(new self::Struct1::#fromTypedDataBase([@vm.inferred-type.metadata=dart.typed_data::_Uint8List] typ::Uint8List::•(#C20)));
|
||||
_in::_nativeEffect(new self::Struct1::#fromTypedDataBase([@vm.inferred-type.metadata=dart.typed_data::_Uint8List] typ::Uint8List::•(#C17)));
|
||||
} => block {
|
||||
[@vm.inferred-type.metadata=dart.ffi::Pointer] synthesized ffi::Pointer<ffi::NativeFunction<() → self::Struct1>> #ffiTarget0 = [@vm.direct-call.metadata=dart.ffi::DynamicLibrary.lookup] [@vm.inferred-type.metadata=dart.ffi::Pointer (skip check)] dylib.{ffi::DynamicLibrary::lookup}<ffi::NativeFunction<() → self::Struct1>>("function1"){(core::String) → ffi::Pointer<ffi::NativeFunction<() → self::Struct1>>};
|
||||
|
||||
[@vm.closure-id=1]
|
||||
@#C24
|
||||
@#C21
|
||||
function #ffiClosure0() → self::Struct1 {
|
||||
return [@vm.inferred-type.metadata=#lib::Struct1] ffi::_ffiCall<self::Struct1>(#ffiTarget0);
|
||||
}
|
||||
|
@ -97,12 +96,12 @@ static method testLookupFunctionReturn() → void {
|
|||
static method testAsFunctionReturn() → void {
|
||||
final ffi::Pointer<ffi::NativeFunction<() → self::Struct2>> pointer = [@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::Pointer::fromAddress<ffi::NativeFunction<() → self::Struct2>>(3735928559);
|
||||
final () → self::Struct2 function2 = block {
|
||||
_in::_nativeEffect(new self::Struct2::#fromTypedDataBase([@vm.inferred-type.metadata=dart.typed_data::_Uint8List] typ::Uint8List::•(#C20)));
|
||||
_in::_nativeEffect(new self::Struct2::#fromTypedDataBase([@vm.inferred-type.metadata=dart.typed_data::_Uint8List] typ::Uint8List::•(#C17)));
|
||||
} => block {
|
||||
[@vm.inferred-type.metadata=dart.ffi::Pointer] synthesized ffi::Pointer<ffi::NativeFunction<() → self::Struct2>> #ffiTarget1 = pointer;
|
||||
|
||||
[@vm.closure-id=1]
|
||||
@#C26
|
||||
@#C23
|
||||
function #ffiClosure1() → self::Struct2 {
|
||||
return [@vm.inferred-type.metadata=#lib::Struct2] ffi::_ffiCall<self::Struct2>(#ffiTarget1);
|
||||
}
|
||||
|
@ -117,7 +116,7 @@ static method useStruct3(self::Struct3 struct3) → core::int {
|
|||
}
|
||||
static method testFromFunctionArgument() → void {
|
||||
final ffi::Pointer<ffi::NativeFunction<(self::Struct3) → ffi::Int32>> pointer = block {
|
||||
_in::_nativeEffect(new self::Struct3::#fromTypedDataBase([@vm.inferred-type.metadata=dart.typed_data::_Uint8List] typ::Uint8List::•(#C20)));
|
||||
_in::_nativeEffect(new self::Struct3::#fromTypedDataBase([@vm.inferred-type.metadata=dart.typed_data::_Uint8List] typ::Uint8List::•(#C17)));
|
||||
} =>[@vm.inferred-type.metadata=dart.ffi::Pointer] self::_#ffiCallback0;
|
||||
core::print(pointer);
|
||||
}
|
||||
|
@ -125,7 +124,7 @@ static method testLookupFunctionArgument() → void {
|
|||
final ffi::DynamicLibrary dylib = [@vm.inferred-type.metadata=dart.ffi::DynamicLibrary] ffi::DynamicLibrary::executable();
|
||||
final (self::Struct5) → void function5 = block {
|
||||
[@vm.inferred-type.metadata=dart.ffi::Pointer] synthesized ffi::Pointer<ffi::NativeFunction<(self::Struct5) → ffi::Void>> #ffiTarget2 = [@vm.direct-call.metadata=dart.ffi::DynamicLibrary.lookup] [@vm.inferred-type.metadata=dart.ffi::Pointer (skip check)] dylib.{ffi::DynamicLibrary::lookup}<ffi::NativeFunction<(self::Struct5) → ffi::Void>>("function5"){(core::String) → ffi::Pointer<ffi::NativeFunction<(self::Struct5) → ffi::Void>>};
|
||||
@#C28
|
||||
@#C25
|
||||
function #ffiClosure2(self::Struct5 arg1) → void {
|
||||
throw "Attempt to execute code removed by Dart AOT compiler (TFA)";
|
||||
return ffi::_ffiCall<void>(#ffiTarget2);
|
||||
|
@ -137,7 +136,7 @@ static method testAsFunctionArgument() → void {
|
|||
final ffi::Pointer<ffi::NativeFunction<(self::Struct6) → ffi::Void>> pointer = [@vm.inferred-type.metadata=dart.ffi::Pointer] ffi::Pointer::fromAddress<ffi::NativeFunction<(self::Struct6) → ffi::Void>>(3735928559);
|
||||
final (self::Struct6) → void function6 = block {
|
||||
[@vm.inferred-type.metadata=dart.ffi::Pointer] synthesized ffi::Pointer<ffi::NativeFunction<(self::Struct6) → ffi::Void>> #ffiTarget3 = pointer;
|
||||
@#C30
|
||||
@#C27
|
||||
function #ffiClosure3(self::Struct6 arg1) → void {
|
||||
throw "Attempt to execute code removed by Dart AOT compiler (TFA)";
|
||||
return ffi::_ffiCall<void>(#ffiTarget3);
|
||||
|
@ -170,28 +169,25 @@ constants {
|
|||
#C4 = null
|
||||
#C5 = ffi::_FfiStructLayout {fieldTypes:#C3, packing:#C4}
|
||||
#C6 = core::pragma {name:#C1, options:#C5}
|
||||
#C7 = TypeLiteralConstant(self::Struct12)
|
||||
#C8 = <core::Type>[#C7]
|
||||
#C9 = ffi::_FfiStructLayout {fieldTypes:#C8, packing:#C4}
|
||||
#C10 = core::pragma {name:#C1, options:#C9}
|
||||
#C11 = 4
|
||||
#C12 = 8
|
||||
#C13 = <core::int*>[#C11, #C12, #C11, #C12, #C12, #C12, #C12, #C12, #C11, #C12, #C12, #C11, #C12, #C11, #C12, #C11, #C12, #C12, #C12, #C12, #C11, #C12]
|
||||
#C14 = "vm:prefer-inline"
|
||||
#C15 = core::pragma {name:#C14, options:#C4}
|
||||
#C16 = 0
|
||||
#C17 = <core::int*>[#C16, #C16, #C16, #C16, #C16, #C16, #C16, #C16, #C16, #C16, #C16, #C16, #C16, #C16, #C16, #C16, #C16, #C16, #C16, #C16, #C16, #C16]
|
||||
#C18 = static-tearoff self::useStruct3
|
||||
#C19 = static-tearoff self::returnStruct7
|
||||
#C20 = 1
|
||||
#C21 = "vm:ffi:call-closure"
|
||||
#C22 = false
|
||||
#C23 = ffi::_FfiCall<() → self::Struct1> {isLeaf:#C22}
|
||||
#C24 = core::pragma {name:#C21, options:#C23}
|
||||
#C25 = ffi::_FfiCall<() → self::Struct2> {isLeaf:#C22}
|
||||
#C26 = core::pragma {name:#C21, options:#C25}
|
||||
#C27 = ffi::_FfiCall<(self::Struct5) → ffi::Void> {isLeaf:#C22}
|
||||
#C28 = core::pragma {name:#C21, options:#C27}
|
||||
#C29 = ffi::_FfiCall<(self::Struct6) → ffi::Void> {isLeaf:#C22}
|
||||
#C30 = core::pragma {name:#C21, options:#C29}
|
||||
#C7 = 0
|
||||
#C8 = TypeLiteralConstant(self::Struct12)
|
||||
#C9 = <core::Type>[#C8]
|
||||
#C10 = ffi::_FfiStructLayout {fieldTypes:#C9, packing:#C4}
|
||||
#C11 = core::pragma {name:#C1, options:#C10}
|
||||
#C12 = "vm:prefer-inline"
|
||||
#C13 = core::pragma {name:#C12, options:#C4}
|
||||
#C14 = <core::int*>[#C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7]
|
||||
#C15 = static-tearoff self::useStruct3
|
||||
#C16 = static-tearoff self::returnStruct7
|
||||
#C17 = 1
|
||||
#C18 = "vm:ffi:call-closure"
|
||||
#C19 = false
|
||||
#C20 = ffi::_FfiCall<() → self::Struct1> {isLeaf:#C19}
|
||||
#C21 = core::pragma {name:#C18, options:#C20}
|
||||
#C22 = ffi::_FfiCall<() → self::Struct2> {isLeaf:#C19}
|
||||
#C23 = core::pragma {name:#C18, options:#C22}
|
||||
#C24 = ffi::_FfiCall<(self::Struct5) → ffi::Void> {isLeaf:#C19}
|
||||
#C25 = core::pragma {name:#C18, options:#C24}
|
||||
#C26 = ffi::_FfiCall<(self::Struct6) → ffi::Void> {isLeaf:#C19}
|
||||
#C27 = core::pragma {name:#C18, options:#C26}
|
||||
}
|
||||
|
|
|
@ -364,13 +364,13 @@ extension ${nativeType}Array on Array<$nativeType> {
|
|||
@patch
|
||||
$dartType operator [](int index) {
|
||||
_checkIndex(index);
|
||||
return _load$nativeType(_typedDataBase, ${sizeTimes}index);
|
||||
return _load$nativeType(_typedDataBase, _offsetInBytes + ${sizeTimes}index,);
|
||||
}
|
||||
|
||||
@patch
|
||||
operator []=(int index, $dartType value) {
|
||||
_checkIndex(index);
|
||||
return _store$nativeType(_typedDataBase, ${sizeTimes}index, value);
|
||||
return _store$nativeType(_typedDataBase, _offsetInBytes + ${sizeTimes}index , value,);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "vm/compiler/jit/compiler.h"
|
||||
#include "vm/compiler/method_recognizer.h"
|
||||
#include "vm/compiler/runtime_api.h"
|
||||
#include "vm/constants.h"
|
||||
#include "vm/cpu.h"
|
||||
#include "vm/dart_entry.h"
|
||||
#include "vm/object.h"
|
||||
|
@ -7416,7 +7417,7 @@ LocationSummary* FfiCallInstr::MakeLocationSummaryInternal(
|
|||
Location::RegisterLocation(
|
||||
CallingConventions::kFirstNonArgumentRegister));
|
||||
#endif
|
||||
for (intptr_t i = 0, n = marshaller_.NumDefinitions(); i < n; ++i) {
|
||||
for (intptr_t i = 0, n = marshaller_.NumArgumentDefinitions(); i < n; ++i) {
|
||||
summary->set_in(i, marshaller_.LocInFfiCall(i));
|
||||
}
|
||||
|
||||
|
@ -7471,6 +7472,13 @@ void FfiCallInstr::EmitParamMoves(FlowGraphCompiler* compiler,
|
|||
// First deal with moving all individual definitions passed in to the
|
||||
// FfiCall to the right native location based on calling convention.
|
||||
for (intptr_t i = 0; i < num_defs; i++) {
|
||||
if (arg_target.IsPointerToMemory() && i == 1) {
|
||||
// The offset_in_bytes is not an argument for C, so don't move it.
|
||||
// It is used as offset_in_bytes_loc below and moved there if
|
||||
// necessary.
|
||||
def_index++;
|
||||
continue;
|
||||
}
|
||||
__ Comment(" def_index %" Pd, def_index);
|
||||
const Location origin = rebase.Rebase(locs()->in(def_index));
|
||||
const Representation origin_rep = RequiredInputRepresentation(def_index);
|
||||
|
@ -7558,10 +7566,27 @@ void FfiCallInstr::EmitParamMoves(FlowGraphCompiler* compiler,
|
|||
compiler->EmitNativeMove(dst, pointer_loc, &temp_alloc);
|
||||
__ LoadFromSlot(temp0, temp0, Slot::PointerBase_data());
|
||||
|
||||
__ Comment("IsPointerToMemory add offset");
|
||||
const intptr_t offset_in_bytes_def_index =
|
||||
def_index - 1; // ++'d already.
|
||||
const Location offset_in_bytes_loc =
|
||||
rebase.Rebase(locs()->in(offset_in_bytes_def_index));
|
||||
Register offset_in_bytes_reg = kNoRegister;
|
||||
if (offset_in_bytes_loc.IsRegister()) {
|
||||
offset_in_bytes_reg = offset_in_bytes_loc.reg();
|
||||
} else {
|
||||
offset_in_bytes_reg = temp1;
|
||||
NoTemporaryAllocator no_temp;
|
||||
compiler->EmitMove(Location::RegisterLocation(offset_in_bytes_reg),
|
||||
offset_in_bytes_loc, &no_temp);
|
||||
}
|
||||
__ AddRegisters(temp0, offset_in_bytes_reg);
|
||||
|
||||
// Copy chunks. The destination may be rounded up to a multiple of the
|
||||
// word size, because we do the same rounding when we allocate the space
|
||||
// on the stack. But source may not be allocated by the VM and end at a
|
||||
// page boundary.
|
||||
__ Comment("IsPointerToMemory copy chunks");
|
||||
const intptr_t sp_offset =
|
||||
marshaller_.PassByPointerStackOffset(arg_index);
|
||||
__ UnrolledMemCopy(SPREG, sp_offset, temp0, 0,
|
||||
|
@ -7890,10 +7915,17 @@ void NativeReturnInstr::EmitReturnMoves(FlowGraphCompiler* compiler) {
|
|||
return;
|
||||
}
|
||||
if (dst1.IsMultiple()) {
|
||||
__ Comment("Load TypedDataBase data pointer and apply offset.");
|
||||
ASSERT_EQUAL(locs()->input_count(), 2);
|
||||
Register typed_data_reg = locs()->in(0).reg();
|
||||
// Load the data pointer out of the TypedData/Pointer.
|
||||
__ LoadFromSlot(typed_data_reg, typed_data_reg, Slot::PointerBase_data());
|
||||
|
||||
// Apply offset.
|
||||
Register offset_reg = locs()->in(1).reg();
|
||||
__ AddRegisters(typed_data_reg, offset_reg);
|
||||
|
||||
__ Comment("Copy loop");
|
||||
const auto& multiple = dst1.AsMultiple();
|
||||
int offset_in_bytes = 0;
|
||||
for (intptr_t i = 0; i < multiple.locations().length(); i++) {
|
||||
|
@ -7921,24 +7953,31 @@ void NativeReturnInstr::EmitReturnMoves(FlowGraphCompiler* compiler) {
|
|||
|
||||
LocationSummary* NativeReturnInstr::MakeLocationSummary(Zone* zone,
|
||||
bool opt) const {
|
||||
const intptr_t kNumInputs = 1;
|
||||
const intptr_t input_count = marshaller_.NumReturnDefinitions();
|
||||
const intptr_t kNumTemps = 0;
|
||||
LocationSummary* locs = new (zone)
|
||||
LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
|
||||
ASSERT(marshaller_.NumReturnDefinitions() == 1);
|
||||
LocationSummary(zone, input_count, kNumTemps, LocationSummary::kNoCall);
|
||||
const auto& native_loc = marshaller_.Location(compiler::ffi::kResultIndex);
|
||||
const auto& native_return_loc =
|
||||
native_loc.IsPointerToMemory()
|
||||
? native_loc.AsPointerToMemory().pointer_return_location()
|
||||
: native_loc;
|
||||
|
||||
if (native_loc.IsMultiple()) {
|
||||
// We pass in a typed data for easy copying in machine code.
|
||||
ASSERT_EQUAL(input_count, 2);
|
||||
// Pass in a typed data and offset for easy copying in machine code.
|
||||
// Can be any register which does not conflict with return registers.
|
||||
Register typed_data_reg = CallingConventions::kSecondNonArgumentRegister;
|
||||
ASSERT(typed_data_reg != CallingConventions::kReturnReg);
|
||||
ASSERT(typed_data_reg != CallingConventions::kSecondReturnReg);
|
||||
locs->set_in(0, Location::RegisterLocation(typed_data_reg));
|
||||
|
||||
Register offset_in_bytes_reg = CallingConventions::kFfiAnyNonAbiRegister;
|
||||
ASSERT(offset_in_bytes_reg != CallingConventions::kReturnReg);
|
||||
ASSERT(offset_in_bytes_reg != CallingConventions::kSecondReturnReg);
|
||||
locs->set_in(1, Location::RegisterLocation(offset_in_bytes_reg));
|
||||
} else {
|
||||
ASSERT_EQUAL(input_count, 1);
|
||||
const auto& native_return_loc =
|
||||
native_loc.IsPointerToMemory()
|
||||
? native_loc.AsPointerToMemory().pointer_return_location()
|
||||
: native_loc;
|
||||
locs->set_in(0, native_return_loc.AsLocation());
|
||||
}
|
||||
return locs;
|
||||
|
|
|
@ -3504,6 +3504,15 @@ class NativeReturnInstr : public ReturnBaseInstr {
|
|||
const compiler::ffi::CallbackMarshaller& marshaller)
|
||||
: ReturnBaseInstr(), marshaller_(marshaller) {
|
||||
SetInputAt(0, value);
|
||||
inputs_[1] = nullptr;
|
||||
}
|
||||
|
||||
NativeReturnInstr(Value* typed_data_base,
|
||||
Value* offset,
|
||||
const compiler::ffi::CallbackMarshaller& marshaller)
|
||||
: ReturnBaseInstr(), marshaller_(marshaller) {
|
||||
SetInputAt(0, typed_data_base);
|
||||
SetInputAt(1, offset);
|
||||
}
|
||||
|
||||
DECLARE_INSTRUCTION(NativeReturn)
|
||||
|
@ -3511,8 +3520,14 @@ class NativeReturnInstr : public ReturnBaseInstr {
|
|||
PRINT_OPERANDS_TO_SUPPORT
|
||||
|
||||
virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
||||
ASSERT(idx == 0);
|
||||
return marshaller_.RepInFfiCall(compiler::ffi::kResultIndex);
|
||||
if (idx == 0) {
|
||||
return marshaller_.RepInFfiCall(compiler::ffi::kResultIndex);
|
||||
} else {
|
||||
ASSERT_EQUAL(idx, 1);
|
||||
ASSERT_EQUAL(InputCount(), 2);
|
||||
// Offset in bytes for compounds.
|
||||
return kUnboxedWord;
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool CanBecomeDeoptimizationTarget() const {
|
||||
|
@ -3540,7 +3555,7 @@ class NativeReturnInstr : public ReturnBaseInstr {
|
|||
#undef FIELD_LIST
|
||||
|
||||
protected:
|
||||
EmbeddedArray<Value*, 1> inputs_;
|
||||
EmbeddedArray<Value*, 2> inputs_;
|
||||
|
||||
private:
|
||||
void EmitReturnMoves(FlowGraphCompiler* compiler);
|
||||
|
@ -6019,12 +6034,14 @@ class FfiCallInstr : public VariadicDefinition {
|
|||
DECLARE_INSTRUCTION(FfiCall)
|
||||
|
||||
// Input index of the function pointer to invoke.
|
||||
intptr_t TargetAddressIndex() const { return marshaller_.NumDefinitions(); }
|
||||
intptr_t TargetAddressIndex() const {
|
||||
return marshaller_.NumArgumentDefinitions();
|
||||
}
|
||||
|
||||
// Input index of the typed data to populate if return value is struct.
|
||||
intptr_t CompoundReturnTypedDataIndex() const {
|
||||
ASSERT(marshaller_.ReturnsCompound());
|
||||
return marshaller_.NumDefinitions() + 1;
|
||||
return marshaller_.NumArgumentDefinitions() + 1;
|
||||
}
|
||||
|
||||
virtual bool MayThrow() const {
|
||||
|
@ -6065,7 +6082,7 @@ class FfiCallInstr : public VariadicDefinition {
|
|||
|
||||
static intptr_t InputCountForMarshaller(
|
||||
const compiler::ffi::CallMarshaller& marshaller) {
|
||||
return marshaller.NumDefinitions() + 1 +
|
||||
return marshaller.NumArgumentDefinitions() + 1 +
|
||||
(marshaller.ReturnsCompound() ? 1 : 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -1423,7 +1423,17 @@ void CCallInstr::PrintOperandsTo(BaseTextBuffer* f) const {
|
|||
}
|
||||
|
||||
void NativeReturnInstr::PrintOperandsTo(BaseTextBuffer* f) const {
|
||||
InputAt(0)->PrintTo(f);
|
||||
if (marshaller_.NumReturnDefinitions() == 1) {
|
||||
InputAt(0)->PrintTo(f);
|
||||
} else {
|
||||
ASSERT_EQUAL(marshaller_.NumReturnDefinitions(), 2);
|
||||
f->AddString("(");
|
||||
InputAt(0)->PrintTo(f);
|
||||
f->AddString(", ");
|
||||
InputAt(1)->PrintTo(f);
|
||||
f->AddString(")");
|
||||
}
|
||||
|
||||
f->AddString(" (@");
|
||||
marshaller_.Location(compiler::ffi::kResultIndex).PrintTo(f);
|
||||
f->AddString(")");
|
||||
|
|
|
@ -141,6 +141,48 @@ DEFINE_TYPED_LIST_NATIVE_FUNCTION_GETTER(Float64x2, float64x2)
|
|||
|
||||
#undef DEFINE_TYPED_LIST_NATIVE_FUNCTION_GETTER
|
||||
|
||||
const Class& CompilerState::CompoundClass() {
|
||||
if (compound_class_ == nullptr) {
|
||||
Thread* thread = Thread::Current();
|
||||
Zone* zone = thread->zone();
|
||||
|
||||
const auto& lib_ffi = Library::Handle(zone, Library::FfiLibrary());
|
||||
const auto& cls = Class::Handle(
|
||||
zone, lib_ffi.LookupClassAllowPrivate(Symbols::Compound()));
|
||||
ASSERT(!cls.IsNull());
|
||||
const Error& error = Error::Handle(zone, cls.EnsureIsFinalized(thread));
|
||||
ASSERT(error.IsNull());
|
||||
compound_class_ = &cls;
|
||||
}
|
||||
return *compound_class_;
|
||||
}
|
||||
|
||||
const Field& CompilerState::CompoundOffsetInBytesField() {
|
||||
if (compound_offset_in_bytes_field_ == nullptr) {
|
||||
Thread* thread = Thread::Current();
|
||||
Zone* zone = thread->zone();
|
||||
const auto& field =
|
||||
Field::ZoneHandle(zone, CompoundClass().LookupInstanceFieldAllowPrivate(
|
||||
Symbols::_offsetInBytes()));
|
||||
ASSERT(!field.IsNull());
|
||||
compound_offset_in_bytes_field_ = &field;
|
||||
}
|
||||
return *compound_offset_in_bytes_field_;
|
||||
}
|
||||
|
||||
const Field& CompilerState::CompoundTypedDataBaseField() {
|
||||
if (compound_typed_data_base_field_ == nullptr) {
|
||||
Thread* thread = Thread::Current();
|
||||
Zone* zone = thread->zone();
|
||||
const auto& field =
|
||||
Field::ZoneHandle(zone, CompoundClass().LookupInstanceFieldAllowPrivate(
|
||||
Symbols::_typedDataBase()));
|
||||
ASSERT(!field.IsNull());
|
||||
compound_typed_data_base_field_ = &field;
|
||||
}
|
||||
return *compound_typed_data_base_field_;
|
||||
}
|
||||
|
||||
void CompilerState::ReportCrash() {
|
||||
OS::PrintErr("=== Crash occurred when compiling %s in %s mode in %s pass\n",
|
||||
function() != nullptr ? function()->ToFullyQualifiedCString()
|
||||
|
|
|
@ -105,6 +105,10 @@ class CompilerState : public ThreadStackResource {
|
|||
const Function& TypedListGetFloat64x2();
|
||||
const Function& TypedListSetFloat64x2();
|
||||
|
||||
const Class& CompoundClass();
|
||||
const Field& CompoundOffsetInBytesField();
|
||||
const Field& CompoundTypedDataBaseField();
|
||||
|
||||
const Function* function() const { return function_; }
|
||||
|
||||
void set_function(const Function& function) { function_ = &function; }
|
||||
|
@ -143,6 +147,9 @@ class CompilerState : public ThreadStackResource {
|
|||
const Function* interpolate_ = nullptr;
|
||||
const Function* interpolate_single_ = nullptr;
|
||||
const Class* typed_list_class_ = nullptr;
|
||||
const Class* compound_class_ = nullptr;
|
||||
const Field* compound_offset_in_bytes_field_ = nullptr;
|
||||
const Field* compound_typed_data_base_field_ = nullptr;
|
||||
const Function* typed_list_get_float32_ = nullptr;
|
||||
const Function* typed_list_set_float32_ = nullptr;
|
||||
const Function* typed_list_get_float64_ = nullptr;
|
||||
|
|
|
@ -173,7 +173,7 @@ bool BaseMarshaller::ContainsHandles() const {
|
|||
return c_signature_.ContainsHandles();
|
||||
}
|
||||
|
||||
intptr_t BaseMarshaller::NumDefinitions() const {
|
||||
intptr_t BaseMarshaller::NumArgumentDefinitions() const {
|
||||
intptr_t total = 0;
|
||||
for (intptr_t i = 0; i < num_args(); i++) {
|
||||
total += NumDefinitions(i);
|
||||
|
@ -196,20 +196,13 @@ intptr_t BaseMarshaller::NumDefinitions(intptr_t arg_index) const {
|
|||
}
|
||||
|
||||
ASSERT(type.IsCompound());
|
||||
ASSERT(!loc.IsPointerToMemory()); // Handled in overrides.
|
||||
if (loc.IsMultiple()) {
|
||||
// One IL definition for every nested location.
|
||||
const auto& multiple = loc.AsMultiple();
|
||||
return multiple.locations().length();
|
||||
}
|
||||
|
||||
if (loc.IsPointerToMemory()) {
|
||||
// For FFI calls, pass in TypedDataBase (1 IL definition) in IL, and copy
|
||||
// contents to stack and pass pointer in right location in MC.
|
||||
// For FFI callbacks, get the pointer in a NativeParameter and construct
|
||||
// the TypedDataBase in IL.
|
||||
return 1;
|
||||
}
|
||||
|
||||
ASSERT(loc.IsStack());
|
||||
// For stack, word size definitions in IL. In FFI calls passed into the
|
||||
// native call, in FFI callbacks read in separate NativeParams.
|
||||
|
@ -220,15 +213,67 @@ intptr_t BaseMarshaller::NumDefinitions(intptr_t arg_index) const {
|
|||
return num_defs;
|
||||
}
|
||||
|
||||
intptr_t BaseMarshaller::NumReturnDefinitions() const {
|
||||
// For FFI calls we always have 1 definition, because the IL instruction can
|
||||
// only be 1 definition. We pass in a TypedDataBase in IL and fill it in
|
||||
// machine code.
|
||||
intptr_t CallMarshaller::NumDefinitions(intptr_t arg_index) const {
|
||||
if (!ArgumentIndexIsReturn(arg_index)) {
|
||||
const auto& loc = Location(arg_index);
|
||||
const auto& type = loc.payload_type();
|
||||
if (type.IsCompound() && loc.IsPointerToMemory()) {
|
||||
// For FFI calls, pass in TypedDataBase and offsetInBytes in IL, and copy
|
||||
// contents to stack and pass pointer in right location in MC.
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
return BaseMarshaller::NumDefinitions(arg_index);
|
||||
}
|
||||
|
||||
intptr_t CallbackMarshaller::NumDefinitions(intptr_t arg_index) const {
|
||||
if (!ArgumentIndexIsReturn(arg_index)) {
|
||||
const auto& loc = Location(arg_index);
|
||||
const auto& type = loc.payload_type();
|
||||
if (type.IsCompound() && loc.IsPointerToMemory()) {
|
||||
// For FFI callbacks, get the pointer in a NativeParameter and construct
|
||||
// the TypedDataBase in IL (always offset in bytes 0).
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return BaseMarshaller::NumDefinitions(arg_index);
|
||||
}
|
||||
|
||||
intptr_t CallMarshaller::NumReturnDefinitions() const {
|
||||
// An FFICall is a Definition, and Definitions currently only have one
|
||||
// return value.
|
||||
//
|
||||
// For FFI callbacks we always have 1 definition. If it's a struct and the
|
||||
// native ABI is passing a pointer, we copy to it in IL. If it's a multiple
|
||||
// locations return value we copy the value in machine code because some
|
||||
// native locations cannot be expressed in IL in Location.
|
||||
// For compound returns, the IL generated by the flow graph builder allocates
|
||||
// a TypedDataBase object that is passed into the FfiCall. The generated
|
||||
// machine code for the FfiCall instruction then fills in the contents.
|
||||
// After the call, the generated IL wraps the TypedDataBase object in a
|
||||
// Compound object with an offset in bytes of 0.
|
||||
return 1;
|
||||
}
|
||||
|
||||
intptr_t CallbackMarshaller::NumReturnDefinitions() const {
|
||||
const auto& loc = Location(kResultIndex);
|
||||
|
||||
if (loc.IsMultiple()) {
|
||||
const auto& type = loc.payload_type();
|
||||
ASSERT(type.IsCompound());
|
||||
// For multiple locations, some native locations cannot be expressed as
|
||||
// Locations, which means the flow graph builder cannot generate appropriate
|
||||
// IL for those cases.
|
||||
//
|
||||
// Instead, the flow graph builder generates IL to extract the
|
||||
// _typedDataBase and _offsetInBytes fields of the Dart value and passes
|
||||
// those into the NativeReturn instruction as separate arguments. The
|
||||
// generated machine code for the NativeReturn instruction then
|
||||
// appropriately copies the contents to a non-GC-managed block of memory. A
|
||||
// pointer to that block of memory is returned to the C code.
|
||||
return 2;
|
||||
}
|
||||
|
||||
// If it's a compound and the native ABI is passing a pointer, copy to it in
|
||||
// IL. If non-compound, also 1 definition. If it's a primitive, the flow graph
|
||||
// builder generates IL to create an appropriate Dart value from the single
|
||||
// value returned from C.
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -248,7 +293,7 @@ intptr_t BaseMarshaller::ArgumentIndex(intptr_t def_index_global) const {
|
|||
ASSERT(def < NumReturnDefinitions());
|
||||
return kResultIndex;
|
||||
}
|
||||
ASSERT(def_index_global < NumDefinitions());
|
||||
ASSERT(def_index_global < NumArgumentDefinitions());
|
||||
intptr_t defs = 0;
|
||||
intptr_t arg_index = 0;
|
||||
for (; arg_index < num_args(); arg_index++) {
|
||||
|
@ -282,7 +327,7 @@ intptr_t BaseMarshaller::DefinitionInArgument(intptr_t def_index_global,
|
|||
} else {
|
||||
// Counting up for arguments in consecutive order.
|
||||
const intptr_t def = def_index_global - FirstDefinitionIndex(arg_index);
|
||||
ASSERT(def < NumDefinitions());
|
||||
ASSERT(def < NumArgumentDefinitions());
|
||||
return def;
|
||||
}
|
||||
}
|
||||
|
@ -352,6 +397,9 @@ Representation BaseMarshaller::RepInFfiCall(intptr_t def_index_global) const {
|
|||
UNREACHABLE(); // Implemented in subclasses.
|
||||
}
|
||||
|
||||
static const intptr_t kTypedDataBaseIndex = 0;
|
||||
static const intptr_t kOffsetInBytesIndex = 1;
|
||||
|
||||
Representation CallMarshaller::RepInFfiCall(intptr_t def_index_global) const {
|
||||
intptr_t arg_index = ArgumentIndex(def_index_global);
|
||||
if (IsHandle(arg_index)) {
|
||||
|
@ -378,7 +426,17 @@ Representation CallMarshaller::RepInFfiCall(intptr_t def_index_global) const {
|
|||
// passed to the FfiCall instruction. (The machine code generated by
|
||||
// FfiCall handles copying the data into non-GC-moveable memory and
|
||||
// passing a pointer to that memory to the C code.)
|
||||
return kTagged;
|
||||
const intptr_t def_index_in_arg =
|
||||
def_index_global - FirstDefinitionIndex(arg_index);
|
||||
if (def_index_in_arg == kTypedDataBaseIndex) {
|
||||
// The TypedDataBase object is managed by the GC, so the payload address
|
||||
// cannot be eagerly extracted in the IL, as that would create an
|
||||
// unsafe untagged address as an input to a GC-triggering instruction.
|
||||
return kTagged;
|
||||
} else {
|
||||
ASSERT_EQUAL(def_index_in_arg, kOffsetInBytesIndex);
|
||||
return kUnboxedUword;
|
||||
}
|
||||
}
|
||||
return BaseMarshaller::RepInFfiCall(def_index_global);
|
||||
}
|
||||
|
@ -497,13 +555,20 @@ Location CallMarshaller::LocInFfiCall(intptr_t def_index_global) const {
|
|||
}
|
||||
|
||||
if (loc.IsPointerToMemory()) {
|
||||
const auto& pointer_location = loc.AsPointerToMemory().pointer_location();
|
||||
if (pointer_location.IsStack()) {
|
||||
// Don't pin stack locations, they need to be moved anyway.
|
||||
return ConvertToAnyLocation(pointer_location.AsStack(),
|
||||
RepInFfiCall(def_index_global));
|
||||
const intptr_t def_index_in_arg =
|
||||
def_index_global - FirstDefinitionIndex(arg_index);
|
||||
if (def_index_in_arg == kTypedDataBaseIndex) {
|
||||
const auto& pointer_location = loc.AsPointerToMemory().pointer_location();
|
||||
if (pointer_location.IsStack()) {
|
||||
// Don't pin stack locations, they need to be moved anyway.
|
||||
return ConvertToAnyLocation(pointer_location.AsStack(),
|
||||
RepInFfiCall(def_index_global));
|
||||
}
|
||||
return pointer_location.AsLocation();
|
||||
} else {
|
||||
ASSERT_EQUAL(def_index_in_arg, kOffsetInBytesIndex);
|
||||
return Location::Any();
|
||||
}
|
||||
return pointer_location.AsLocation();
|
||||
}
|
||||
|
||||
if (loc.IsStack()) {
|
||||
|
|
|
@ -56,9 +56,9 @@ class BaseMarshaller : public ZoneAllocated {
|
|||
// `arg_index` is the index of an argument.
|
||||
// `def_index_in_argument` is the definition in one argument.
|
||||
// `def_index_global` is the index of the definition in all arguments.
|
||||
intptr_t NumDefinitions() const;
|
||||
intptr_t NumDefinitions(intptr_t arg_index) const;
|
||||
intptr_t NumReturnDefinitions() const;
|
||||
intptr_t NumArgumentDefinitions() const;
|
||||
virtual intptr_t NumDefinitions(intptr_t arg_index) const;
|
||||
virtual intptr_t NumReturnDefinitions() const = 0;
|
||||
bool ArgumentIndexIsReturn(intptr_t arg_index) const;
|
||||
bool DefinitionIndexIsReturn(intptr_t def_index_global) const;
|
||||
intptr_t ArgumentIndex(intptr_t def_index_global) const;
|
||||
|
@ -197,6 +197,9 @@ class CallMarshaller : public BaseMarshaller {
|
|||
c_signature,
|
||||
native_calling_convention) {}
|
||||
|
||||
virtual intptr_t NumDefinitions(intptr_t arg_index) const;
|
||||
virtual intptr_t NumReturnDefinitions() const;
|
||||
|
||||
virtual Representation RepInFfiCall(intptr_t def_index_global) const;
|
||||
|
||||
// The location of the inputs to the IL FfiCall instruction.
|
||||
|
@ -240,6 +243,9 @@ class CallbackMarshaller : public BaseMarshaller {
|
|||
|
||||
virtual Representation RepInFfiCall(intptr_t def_index_global) const;
|
||||
|
||||
virtual intptr_t NumDefinitions(intptr_t arg_index) const;
|
||||
virtual intptr_t NumReturnDefinitions() const;
|
||||
|
||||
// All parameters are saved on stack to do safe-point transition.
|
||||
const NativeLocation& NativeLocationOfNativeParameter(
|
||||
intptr_t def_index) const;
|
||||
|
|
|
@ -3387,13 +3387,16 @@ Fragment StreamingFlowGraphBuilder::BuildStaticInvocation(TokenPosition* p) {
|
|||
case MethodRecognizer::kFfiNativeAsyncCallbackFunction:
|
||||
return BuildFfiNativeCallbackFunction(FfiCallbackKind::kAsyncCallback);
|
||||
case MethodRecognizer::kFfiLoadAbiSpecificInt:
|
||||
return BuildLoadAbiSpecificInt(/*at_index=*/false);
|
||||
return BuildLoadStoreAbiSpecificInt(/*is_store=*/false,
|
||||
/*at_index=*/false);
|
||||
case MethodRecognizer::kFfiLoadAbiSpecificIntAtIndex:
|
||||
return BuildLoadAbiSpecificInt(/*at_index=*/true);
|
||||
return BuildLoadStoreAbiSpecificInt(/*is_store=*/false,
|
||||
/*at_index=*/true);
|
||||
case MethodRecognizer::kFfiStoreAbiSpecificInt:
|
||||
return BuildStoreAbiSpecificInt(/*at_index=*/false);
|
||||
return BuildLoadStoreAbiSpecificInt(/*is_store=*/true,
|
||||
/*at_index=*/false);
|
||||
case MethodRecognizer::kFfiStoreAbiSpecificIntAtIndex:
|
||||
return BuildStoreAbiSpecificInt(/*at_index=*/true);
|
||||
return BuildLoadStoreAbiSpecificInt(/*is_store=*/true, /*at_index=*/true);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -6023,57 +6026,16 @@ static void ReportIfNotNull(const char* error) {
|
|||
}
|
||||
}
|
||||
|
||||
Fragment StreamingFlowGraphBuilder::BuildLoadAbiSpecificInt(bool at_index) {
|
||||
const intptr_t argument_count = ReadUInt(); // Read argument count.
|
||||
ASSERT(argument_count == 2); // TypedDataBase, offset/index
|
||||
const intptr_t list_length = ReadListLength(); // Read types list length.
|
||||
ASSERT(list_length == 1); // AbiSpecificInt.
|
||||
// Read types.
|
||||
const TypeArguments& type_arguments = T.BuildTypeArguments(list_length);
|
||||
const AbstractType& type_argument =
|
||||
AbstractType::Handle(type_arguments.TypeAt(0));
|
||||
|
||||
// AbiSpecificTypes can have an incomplete mapping.
|
||||
const char* error = nullptr;
|
||||
const auto* native_type =
|
||||
compiler::ffi::NativeType::FromAbstractType(zone_, type_argument, &error);
|
||||
ReportIfNotNull(error);
|
||||
|
||||
Fragment code;
|
||||
// Read positional argument count.
|
||||
const intptr_t positional_count = ReadListLength();
|
||||
ASSERT(positional_count == 2);
|
||||
code += BuildExpression(); // Argument 1: typedDataBase.
|
||||
code += BuildExpression(); // Argument 2: offsetInBytes or index.
|
||||
if (at_index) {
|
||||
code += IntConstant(native_type->SizeInBytes());
|
||||
code += B->BinaryIntegerOp(Token::kMUL, kTagged, /* truncate= */ true);
|
||||
}
|
||||
|
||||
// Skip (empty) named arguments list.
|
||||
const intptr_t named_args_len = ReadListLength();
|
||||
ASSERT(named_args_len == 0);
|
||||
|
||||
// This call site is not guaranteed to be optimized. So, do a call to the
|
||||
// correct force optimized function instead of compiling the body.
|
||||
MethodRecognizer::Kind kind = compiler::ffi::FfiLoad(*native_type);
|
||||
const char* function_name = MethodRecognizer::KindToFunctionNameCString(kind);
|
||||
const Library& ffi_library = Library::Handle(Z, Library::FfiLibrary());
|
||||
const Function& target = Function::ZoneHandle(
|
||||
Z, ffi_library.LookupFunctionAllowPrivate(
|
||||
String::Handle(Z, String::New(function_name))));
|
||||
Array& argument_names = Array::ZoneHandle(Z);
|
||||
code += StaticCall(TokenPosition::kNoSource, target, argument_count,
|
||||
argument_names, ICData::kStatic);
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
Fragment StreamingFlowGraphBuilder::BuildStoreAbiSpecificInt(bool at_index) {
|
||||
const intptr_t argument_count = ReadUInt();
|
||||
ASSERT(argument_count == 3);
|
||||
Fragment StreamingFlowGraphBuilder::BuildLoadStoreAbiSpecificInt(
|
||||
bool is_store,
|
||||
bool at_index) {
|
||||
const intptr_t argument_count = ReadUInt(); // Read argument count.
|
||||
const intptr_t expected_argument_count = 2 // TypedDataBase, offset
|
||||
+ (at_index ? 1 : 0) // index
|
||||
+ (is_store ? 1 : 0); // value
|
||||
ASSERT_EQUAL(argument_count, expected_argument_count);
|
||||
const intptr_t list_length = ReadListLength();
|
||||
ASSERT(list_length == 1);
|
||||
ASSERT_EQUAL(list_length, 1);
|
||||
// Read types.
|
||||
const TypeArguments& type_arguments = T.BuildTypeArguments(list_length);
|
||||
const AbstractType& type_argument =
|
||||
|
@ -6088,14 +6050,18 @@ Fragment StreamingFlowGraphBuilder::BuildStoreAbiSpecificInt(bool at_index) {
|
|||
Fragment code;
|
||||
// Read positional argument count.
|
||||
const intptr_t positional_count = ReadListLength();
|
||||
ASSERT(positional_count == 3);
|
||||
ASSERT(positional_count == argument_count);
|
||||
code += BuildExpression(); // Argument 1: typedDataBase.
|
||||
code += BuildExpression(); // Argument 2: offsetInBytes or index.
|
||||
code += BuildExpression(); // Argument 2: offsetInBytes
|
||||
if (at_index) {
|
||||
code += BuildExpression(); // Argument 3: index
|
||||
code += IntConstant(native_type->SizeInBytes());
|
||||
code += B->BinaryIntegerOp(Token::kMUL, kTagged, /* truncate= */ true);
|
||||
code += B->BinaryIntegerOp(Token::kADD, kTagged, /* truncate= */ true);
|
||||
}
|
||||
if (is_store) {
|
||||
code += BuildExpression(); // Argument 4: value
|
||||
}
|
||||
code += BuildExpression(); // Argument 3: value
|
||||
|
||||
// Skip (empty) named arguments list.
|
||||
const intptr_t named_args_len = ReadListLength();
|
||||
|
@ -6103,7 +6069,12 @@ Fragment StreamingFlowGraphBuilder::BuildStoreAbiSpecificInt(bool at_index) {
|
|||
|
||||
// This call site is not guaranteed to be optimized. So, do a call to the
|
||||
// correct force optimized function instead of compiling the body.
|
||||
MethodRecognizer::Kind kind = compiler::ffi::FfiStore(*native_type);
|
||||
MethodRecognizer::Kind kind;
|
||||
if (is_store) {
|
||||
kind = compiler::ffi::FfiStore(*native_type);
|
||||
} else {
|
||||
kind = compiler::ffi::FfiLoad(*native_type);
|
||||
}
|
||||
const char* function_name = MethodRecognizer::KindToFunctionNameCString(kind);
|
||||
const Library& ffi_library = Library::Handle(Z, Library::FfiLibrary());
|
||||
const Function& target = Function::ZoneHandle(
|
||||
|
@ -6111,7 +6082,8 @@ Fragment StreamingFlowGraphBuilder::BuildStoreAbiSpecificInt(bool at_index) {
|
|||
String::Handle(Z, String::New(function_name))));
|
||||
ASSERT(!target.IsNull());
|
||||
Array& argument_names = Array::ZoneHandle(Z);
|
||||
code += StaticCall(TokenPosition::kNoSource, target, argument_count,
|
||||
const intptr_t static_call_arg_count = 2 + (is_store ? 1 : 0);
|
||||
code += StaticCall(TokenPosition::kNoSource, target, static_call_arg_count,
|
||||
argument_names, ICData::kStatic);
|
||||
|
||||
return code;
|
||||
|
|
|
@ -383,11 +383,7 @@ class StreamingFlowGraphBuilder : public KernelReaderHelper {
|
|||
// Build flow graph for '_loadAbiSpecificInt' and
|
||||
// '_loadAbiSpecificIntAtIndex', '_storeAbiSpecificInt', and
|
||||
// '_storeAbiSpecificIntAtIndex' call sites.
|
||||
//
|
||||
// The second argument is either offsetInBytes (at_index==false), or
|
||||
// index (at_index==true).
|
||||
Fragment BuildLoadAbiSpecificInt(bool at_index);
|
||||
Fragment BuildStoreAbiSpecificInt(bool at_index);
|
||||
Fragment BuildLoadStoreAbiSpecificInt(bool is_store, bool at_index);
|
||||
|
||||
// Build FG for FFI call.
|
||||
Fragment BuildFfiCall();
|
||||
|
|
|
@ -4528,7 +4528,6 @@ Fragment FlowGraphBuilder::LoadIndexedTypedDataUnboxed(
|
|||
return fragment;
|
||||
}
|
||||
|
||||
|
||||
Fragment FlowGraphBuilder::RawLoadField(int32_t offset) {
|
||||
Fragment code;
|
||||
code += UnboxedIntConstant(offset, kUnboxedIntPtr);
|
||||
|
@ -4696,8 +4695,14 @@ Fragment FlowGraphBuilder::IntRelationalOp(TokenPosition position,
|
|||
Fragment FlowGraphBuilder::NativeReturn(
|
||||
const compiler::ffi::CallbackMarshaller& marshaller) {
|
||||
const intptr_t num_return_defs = marshaller.NumReturnDefinitions();
|
||||
ASSERT_EQUAL(num_return_defs, 1);
|
||||
auto* instr = new (Z) NativeReturnInstr(Pop(), marshaller);
|
||||
if (num_return_defs == 1) {
|
||||
auto* instr = new (Z) NativeReturnInstr(Pop(), marshaller);
|
||||
return Fragment(instr).closed();
|
||||
}
|
||||
ASSERT_EQUAL(num_return_defs, 2);
|
||||
auto* offset = Pop();
|
||||
auto* typed_data_base = Pop();
|
||||
auto* instr = new (Z) NativeReturnInstr(typed_data_base, offset, marshaller);
|
||||
return Fragment(instr).closed();
|
||||
}
|
||||
|
||||
|
@ -4732,36 +4737,38 @@ Fragment FlowGraphBuilder::WrapTypedDataBaseInCompound(
|
|||
const auto& compound_sub_class =
|
||||
Class::ZoneHandle(Z, compound_type.type_class());
|
||||
compound_sub_class.EnsureIsFinalized(thread_);
|
||||
const auto& lib_ffi = Library::Handle(Z, Library::FfiLibrary());
|
||||
const auto& compound_class =
|
||||
Class::Handle(Z, lib_ffi.LookupClassAllowPrivate(Symbols::Compound()));
|
||||
const auto& compound_typed_data_base =
|
||||
Field::ZoneHandle(Z, compound_class.LookupInstanceFieldAllowPrivate(
|
||||
Symbols::_typedDataBase()));
|
||||
ASSERT(!compound_typed_data_base.IsNull());
|
||||
|
||||
auto& state = thread_->compiler_state();
|
||||
|
||||
Fragment body;
|
||||
LocalVariable* typed_data = MakeTemporary("typed_data_base");
|
||||
body += AllocateObject(TokenPosition::kNoSource, compound_sub_class, 0);
|
||||
body += LoadLocal(MakeTemporary("compound")); // Duplicate Struct or Union.
|
||||
LocalVariable* compound = MakeTemporary("compound");
|
||||
body += LoadLocal(compound);
|
||||
body += LoadLocal(typed_data);
|
||||
body += StoreField(compound_typed_data_base,
|
||||
body += StoreField(state.CompoundTypedDataBaseField(),
|
||||
StoreFieldInstr::Kind::kInitializing);
|
||||
body += LoadLocal(compound);
|
||||
body += IntConstant(0);
|
||||
body += StoreField(state.CompoundOffsetInBytesField(),
|
||||
StoreFieldInstr::Kind::kInitializing);
|
||||
body += DropTempsPreserveTop(1); // Drop TypedData.
|
||||
return body;
|
||||
}
|
||||
|
||||
Fragment FlowGraphBuilder::LoadTypedDataBaseFromCompound() {
|
||||
const auto& lib_ffi = Library::Handle(Z, Library::FfiLibrary());
|
||||
const auto& compound_class =
|
||||
Class::Handle(Z, lib_ffi.LookupClassAllowPrivate(Symbols::Compound()));
|
||||
const auto& compound_typed_data_base =
|
||||
Field::ZoneHandle(Z, compound_class.LookupInstanceFieldAllowPrivate(
|
||||
Symbols::_typedDataBase()));
|
||||
ASSERT(!compound_typed_data_base.IsNull());
|
||||
|
||||
Fragment body;
|
||||
body += LoadField(compound_typed_data_base, /*calls_initializer=*/false);
|
||||
auto& state = thread_->compiler_state();
|
||||
body += LoadField(state.CompoundTypedDataBaseField(),
|
||||
/*calls_initializer=*/false);
|
||||
return body;
|
||||
}
|
||||
|
||||
Fragment FlowGraphBuilder::LoadOffsetInBytesFromCompound() {
|
||||
Fragment body;
|
||||
auto& state = thread_->compiler_state();
|
||||
body += LoadField(state.CompoundOffsetInBytesField(),
|
||||
/*calls_initializer=*/false);
|
||||
return body;
|
||||
}
|
||||
|
||||
|
@ -4840,7 +4847,12 @@ Fragment FlowGraphBuilder::LoadTail(LocalVariable* variable,
|
|||
if (size == 8 || size == 4) {
|
||||
body += LoadLocal(variable);
|
||||
body += LoadTypedDataBaseFromCompound();
|
||||
body += LoadNativeField(Slot::PointerBase_data(),
|
||||
InnerPointerAccess::kMayBeInnerPointer);
|
||||
body += LoadLocal(variable);
|
||||
body += LoadOffsetInBytesFromCompound();
|
||||
body += IntConstant(offset_in_bytes);
|
||||
body += BinaryIntegerOp(Token::kADD, kTagged, /*is_truncating=*/true);
|
||||
body += LoadIndexedTypedDataUnboxed(representation, /*index_scale=*/1,
|
||||
/*index_unboxed=*/false);
|
||||
return body;
|
||||
|
@ -4853,7 +4865,12 @@ Fragment FlowGraphBuilder::LoadTail(LocalVariable* variable,
|
|||
while (remaining >= part_bytes) {
|
||||
body += LoadLocal(variable);
|
||||
body += LoadTypedDataBaseFromCompound();
|
||||
body += LoadNativeField(Slot::PointerBase_data(),
|
||||
InnerPointerAccess::kMayBeInnerPointer);
|
||||
body += LoadLocal(variable);
|
||||
body += LoadOffsetInBytesFromCompound();
|
||||
body += IntConstant(offset_in_bytes);
|
||||
body += BinaryIntegerOp(Token::kADD, kTagged, /*is_truncating=*/true);
|
||||
body += LoadIndexed(part_cid, /*index_scale*/ 1,
|
||||
/*index_unboxed=*/false);
|
||||
if (shift != 0) {
|
||||
|
@ -4935,6 +4952,9 @@ Fragment FlowGraphBuilder::FfiCallConvertCompoundArgumentToNative(
|
|||
// Only load the typed data, do copying in the FFI call machine code.
|
||||
body += LoadLocal(variable); // User-defined struct.
|
||||
body += LoadTypedDataBaseFromCompound();
|
||||
body += LoadLocal(variable); // User-defined struct.
|
||||
body += LoadOffsetInBytesFromCompound();
|
||||
body += UnboxTruncate(kUnboxedWord);
|
||||
}
|
||||
return body;
|
||||
}
|
||||
|
@ -5043,17 +5063,30 @@ Fragment FlowGraphBuilder::FfiCallbackConvertCompoundReturnToNative(
|
|||
Fragment body;
|
||||
const auto& native_loc = marshaller.Location(arg_index);
|
||||
if (native_loc.IsMultiple()) {
|
||||
// We pass in typed data to native return instruction, and do the copying
|
||||
// in machine code.
|
||||
// Pass in typed data and offset to native return instruction, and do the
|
||||
// copying in machine code.
|
||||
LocalVariable* compound = MakeTemporary("compound");
|
||||
body += LoadLocal(compound);
|
||||
body += LoadOffsetInBytesFromCompound();
|
||||
body += UnboxTruncate(kUnboxedWord);
|
||||
body += StoreLocal(TokenPosition::kNoSource,
|
||||
parsed_function_->expression_temp_var());
|
||||
body += Drop();
|
||||
body += LoadTypedDataBaseFromCompound();
|
||||
body += LoadLocal(parsed_function_->expression_temp_var());
|
||||
} else {
|
||||
ASSERT(native_loc.IsPointerToMemory());
|
||||
// We copy the data into the right location in IL.
|
||||
const intptr_t length_in_bytes =
|
||||
marshaller.Location(arg_index).payload_type().SizeInBytes();
|
||||
|
||||
LocalVariable* compound = MakeTemporary("compound");
|
||||
body += LoadLocal(compound);
|
||||
body += LoadTypedDataBaseFromCompound();
|
||||
LocalVariable* typed_data_base = MakeTemporary("typed_data_base");
|
||||
body += LoadLocal(compound);
|
||||
body += LoadOffsetInBytesFromCompound();
|
||||
LocalVariable* offset = MakeTemporary("offset");
|
||||
|
||||
auto* pointer_to_return =
|
||||
new (Z) NativeParameterInstr(marshaller, compiler::ffi::kResultIndex);
|
||||
|
@ -5067,7 +5100,9 @@ Fragment FlowGraphBuilder::FfiCallbackConvertCompoundReturnToNative(
|
|||
const intptr_t chunk_sizee = chunk_size(bytes_left);
|
||||
|
||||
body += LoadLocal(typed_data_base);
|
||||
body += LoadLocal(offset);
|
||||
body += IntConstant(offset_in_bytes);
|
||||
body += BinaryIntegerOp(Token::kADD, kTagged, /*is_truncating=*/true);
|
||||
body += LoadIndexed(typed_data_cid(chunk_sizee), /*index_scale=*/1,
|
||||
/*index_unboxed=*/false);
|
||||
LocalVariable* chunk_value = MakeTemporary("chunk_value");
|
||||
|
@ -5084,7 +5119,7 @@ Fragment FlowGraphBuilder::FfiCallbackConvertCompoundReturnToNative(
|
|||
}
|
||||
|
||||
ASSERT(offset_in_bytes == length_in_bytes);
|
||||
body += DropTempsPreserveTop(1); // Keep address, drop typed_data_base.
|
||||
body += DropTempsPreserveTop(3);
|
||||
}
|
||||
return body;
|
||||
}
|
||||
|
@ -5697,6 +5732,7 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfAsyncFfiCallback(
|
|||
Call1ArgStubInstr::StubId::kFfiAsyncCallbackSend);
|
||||
|
||||
body += FfiConvertPrimitiveToNative(marshaller, compiler::ffi::kResultIndex);
|
||||
ASSERT_EQUAL(marshaller.NumReturnDefinitions(), 1);
|
||||
body += NativeReturn(marshaller);
|
||||
|
||||
--try_depth_;
|
||||
|
@ -5712,6 +5748,7 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfAsyncFfiCallback(
|
|||
catch_body += NullConstant();
|
||||
catch_body +=
|
||||
FfiConvertPrimitiveToNative(marshaller, compiler::ffi::kResultIndex);
|
||||
ASSERT_EQUAL(marshaller.NumReturnDefinitions(), 1);
|
||||
catch_body += NativeReturn(marshaller);
|
||||
--catch_depth_;
|
||||
|
||||
|
|
|
@ -381,6 +381,7 @@ class FlowGraphBuilder : public BaseFlowGraphBuilder {
|
|||
|
||||
// Loads the _typedDataBase field from a subclass of _Compound.
|
||||
Fragment LoadTypedDataBaseFromCompound();
|
||||
Fragment LoadOffsetInBytesFromCompound();
|
||||
|
||||
// Copy `definitions` into TypedData.
|
||||
//
|
||||
|
|
|
@ -281,7 +281,7 @@ namespace dart {
|
|||
FfiNativeIsolateLocalCallbackFunction, 0x03e1a51f) \
|
||||
V(::, _nativeEffect, NativeEffect, 0x536f42b1) \
|
||||
V(::, _loadAbiSpecificInt, FfiLoadAbiSpecificInt, 0x77f96053) \
|
||||
V(::, _loadAbiSpecificIntAtIndex, FfiLoadAbiSpecificIntAtIndex, 0x6a964295) \
|
||||
V(::, _loadAbiSpecificIntAtIndex, FfiLoadAbiSpecificIntAtIndex, 0xaab9c762) \
|
||||
V(::, _loadInt8, FfiLoadInt8, 0x0ef657b7) \
|
||||
V(::, _loadInt16, FfiLoadInt16, 0xec35a90e) \
|
||||
V(::, _loadInt32, FfiLoadInt32, 0xee13b7a4) \
|
||||
|
@ -296,7 +296,7 @@ namespace dart {
|
|||
V(::, _loadDoubleUnaligned, FfiLoadDoubleUnaligned, 0xc9903159) \
|
||||
V(::, _loadPointer, FfiLoadPointer, 0x99f984e4) \
|
||||
V(::, _storeAbiSpecificInt, FfiStoreAbiSpecificInt, 0xc6facca1) \
|
||||
V(::, _storeAbiSpecificIntAtIndex, FfiStoreAbiSpecificIntAtIndex, 0xc640762c)\
|
||||
V(::, _storeAbiSpecificIntAtIndex, FfiStoreAbiSpecificIntAtIndex, 0x5b85a53f)\
|
||||
V(::, _storeInt8, FfiStoreInt8, 0xdf4226ed) \
|
||||
V(::, _storeInt16, FfiStoreInt16, 0xd83f6b13) \
|
||||
V(::, _storeInt32, FfiStoreInt32, 0xfbd7a43e) \
|
||||
|
|
|
@ -1524,7 +1524,7 @@ void KernelLoader::FinishClassLoading(const Class& klass,
|
|||
// subsequently with TypedData with field guards.
|
||||
if (klass.UserVisibleName() == Symbols::Compound().ptr() &&
|
||||
Library::Handle(Z, klass.library()).url() == Symbols::DartFfi().ptr()) {
|
||||
ASSERT(fields_.length() == 1);
|
||||
ASSERT_EQUAL(fields_.length(), 2);
|
||||
ASSERT(String::Handle(Z, fields_[0]->name())
|
||||
.StartsWith(Symbols::_typedDataBase()));
|
||||
fields_[0]->set_guarded_cid(kDynamicCid);
|
||||
|
|
|
@ -468,6 +468,7 @@ class ObjectPointerVisitor;
|
|||
V(_objectHashCode, "_objectHashCode") \
|
||||
V(_objectNoSuchMethod, "_objectNoSuchMethod") \
|
||||
V(_objectToString, "_objectToString") \
|
||||
V(_offsetInBytes, "_offsetInBytes") \
|
||||
V(_onData, "_onData") \
|
||||
V(_onDone, "_onDone") \
|
||||
V(_onError, "_onError") \
|
||||
|
|
|
@ -327,8 +327,12 @@ final class Array<T extends NativeType> extends _Compound {
|
|||
List<int>? _nestedDimensionsRestCache;
|
||||
|
||||
@pragma("vm:entry-point")
|
||||
Array._(super._typedDataBase, this._size, this._nestedDimensions)
|
||||
: super._fromTypedDataBase();
|
||||
Array._(
|
||||
super._typedDataBase,
|
||||
super._offsetInBytes,
|
||||
this._size,
|
||||
this._nestedDimensions,
|
||||
) : super._fromTypedDataBase();
|
||||
|
||||
int get _nestedDimensionsFlattened =>
|
||||
_nestedDimensionsFlattenedCache ??= _nestedDimensions.fold<int>(
|
||||
|
@ -438,7 +442,7 @@ external int _loadAbiSpecificInt<T extends AbiSpecificInteger>(
|
|||
@pragma("vm:recognized", "other")
|
||||
@pragma("vm:idempotent")
|
||||
external int _loadAbiSpecificIntAtIndex<T extends AbiSpecificInteger>(
|
||||
Object typedDataBase, int index);
|
||||
Object typedDataBase, int offsetInBytes, int index);
|
||||
|
||||
@pragma("vm:recognized", "other")
|
||||
@pragma("vm:idempotent")
|
||||
|
@ -509,7 +513,7 @@ external int _storeAbiSpecificInt<T extends AbiSpecificInteger>(
|
|||
@pragma("vm:recognized", "other")
|
||||
@pragma("vm:idempotent")
|
||||
external int _storeAbiSpecificIntAtIndex<T extends AbiSpecificInteger>(
|
||||
Object typedDataBase, int index, int value);
|
||||
Object typedDataBase, int offsetInBytes, int index, int value);
|
||||
|
||||
@pragma("vm:recognized", "other")
|
||||
@pragma("vm:idempotent")
|
||||
|
@ -962,13 +966,20 @@ extension Int8Array on Array<Int8> {
|
|||
@patch
|
||||
int operator [](int index) {
|
||||
_checkIndex(index);
|
||||
return _loadInt8(_typedDataBase, index);
|
||||
return _loadInt8(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + index,
|
||||
);
|
||||
}
|
||||
|
||||
@patch
|
||||
operator []=(int index, int value) {
|
||||
_checkIndex(index);
|
||||
return _storeInt8(_typedDataBase, index, value);
|
||||
return _storeInt8(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + index,
|
||||
value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -977,13 +988,20 @@ extension Int16Array on Array<Int16> {
|
|||
@patch
|
||||
int operator [](int index) {
|
||||
_checkIndex(index);
|
||||
return _loadInt16(_typedDataBase, 2 * index);
|
||||
return _loadInt16(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 2 * index,
|
||||
);
|
||||
}
|
||||
|
||||
@patch
|
||||
operator []=(int index, int value) {
|
||||
_checkIndex(index);
|
||||
return _storeInt16(_typedDataBase, 2 * index, value);
|
||||
return _storeInt16(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 2 * index,
|
||||
value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -992,13 +1010,20 @@ extension Int32Array on Array<Int32> {
|
|||
@patch
|
||||
int operator [](int index) {
|
||||
_checkIndex(index);
|
||||
return _loadInt32(_typedDataBase, 4 * index);
|
||||
return _loadInt32(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 4 * index,
|
||||
);
|
||||
}
|
||||
|
||||
@patch
|
||||
operator []=(int index, int value) {
|
||||
_checkIndex(index);
|
||||
return _storeInt32(_typedDataBase, 4 * index, value);
|
||||
return _storeInt32(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 4 * index,
|
||||
value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1007,13 +1032,20 @@ extension Int64Array on Array<Int64> {
|
|||
@patch
|
||||
int operator [](int index) {
|
||||
_checkIndex(index);
|
||||
return _loadInt64(_typedDataBase, 8 * index);
|
||||
return _loadInt64(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 8 * index,
|
||||
);
|
||||
}
|
||||
|
||||
@patch
|
||||
operator []=(int index, int value) {
|
||||
_checkIndex(index);
|
||||
return _storeInt64(_typedDataBase, 8 * index, value);
|
||||
return _storeInt64(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 8 * index,
|
||||
value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1022,13 +1054,20 @@ extension Uint8Array on Array<Uint8> {
|
|||
@patch
|
||||
int operator [](int index) {
|
||||
_checkIndex(index);
|
||||
return _loadUint8(_typedDataBase, index);
|
||||
return _loadUint8(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + index,
|
||||
);
|
||||
}
|
||||
|
||||
@patch
|
||||
operator []=(int index, int value) {
|
||||
_checkIndex(index);
|
||||
return _storeUint8(_typedDataBase, index, value);
|
||||
return _storeUint8(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + index,
|
||||
value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1037,13 +1076,20 @@ extension Uint16Array on Array<Uint16> {
|
|||
@patch
|
||||
int operator [](int index) {
|
||||
_checkIndex(index);
|
||||
return _loadUint16(_typedDataBase, 2 * index);
|
||||
return _loadUint16(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 2 * index,
|
||||
);
|
||||
}
|
||||
|
||||
@patch
|
||||
operator []=(int index, int value) {
|
||||
_checkIndex(index);
|
||||
return _storeUint16(_typedDataBase, 2 * index, value);
|
||||
return _storeUint16(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 2 * index,
|
||||
value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1052,13 +1098,20 @@ extension Uint32Array on Array<Uint32> {
|
|||
@patch
|
||||
int operator [](int index) {
|
||||
_checkIndex(index);
|
||||
return _loadUint32(_typedDataBase, 4 * index);
|
||||
return _loadUint32(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 4 * index,
|
||||
);
|
||||
}
|
||||
|
||||
@patch
|
||||
operator []=(int index, int value) {
|
||||
_checkIndex(index);
|
||||
return _storeUint32(_typedDataBase, 4 * index, value);
|
||||
return _storeUint32(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 4 * index,
|
||||
value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1067,13 +1120,20 @@ extension Uint64Array on Array<Uint64> {
|
|||
@patch
|
||||
int operator [](int index) {
|
||||
_checkIndex(index);
|
||||
return _loadUint64(_typedDataBase, 8 * index);
|
||||
return _loadUint64(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 8 * index,
|
||||
);
|
||||
}
|
||||
|
||||
@patch
|
||||
operator []=(int index, int value) {
|
||||
_checkIndex(index);
|
||||
return _storeUint64(_typedDataBase, 8 * index, value);
|
||||
return _storeUint64(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 8 * index,
|
||||
value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1082,13 +1142,20 @@ extension FloatArray on Array<Float> {
|
|||
@patch
|
||||
double operator [](int index) {
|
||||
_checkIndex(index);
|
||||
return _loadFloat(_typedDataBase, 4 * index);
|
||||
return _loadFloat(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 4 * index,
|
||||
);
|
||||
}
|
||||
|
||||
@patch
|
||||
operator []=(int index, double value) {
|
||||
_checkIndex(index);
|
||||
return _storeFloat(_typedDataBase, 4 * index, value);
|
||||
return _storeFloat(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 4 * index,
|
||||
value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1097,13 +1164,20 @@ extension DoubleArray on Array<Double> {
|
|||
@patch
|
||||
double operator [](int index) {
|
||||
_checkIndex(index);
|
||||
return _loadDouble(_typedDataBase, 8 * index);
|
||||
return _loadDouble(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 8 * index,
|
||||
);
|
||||
}
|
||||
|
||||
@patch
|
||||
operator []=(int index, double value) {
|
||||
_checkIndex(index);
|
||||
return _storeDouble(_typedDataBase, 8 * index, value);
|
||||
return _storeDouble(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + 8 * index,
|
||||
value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1112,13 +1186,20 @@ extension BoolArray on Array<Bool> {
|
|||
@patch
|
||||
bool operator [](int index) {
|
||||
_checkIndex(index);
|
||||
return _loadBool(_typedDataBase, index);
|
||||
return _loadBool(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + index,
|
||||
);
|
||||
}
|
||||
|
||||
@patch
|
||||
operator []=(int index, bool value) {
|
||||
_checkIndex(index);
|
||||
return _storeBool(_typedDataBase, index, value);
|
||||
return _storeBool(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + index,
|
||||
value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1253,13 +1334,20 @@ extension PointerArray<T extends NativeType> on Array<Pointer<T>> {
|
|||
@patch
|
||||
Pointer<T> operator [](int index) {
|
||||
_checkIndex(index);
|
||||
return _loadPointer(_typedDataBase, _intPtrSize * index);
|
||||
return _loadPointer(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + _intPtrSize * index,
|
||||
);
|
||||
}
|
||||
|
||||
@patch
|
||||
void operator []=(int index, Pointer<T> value) {
|
||||
_checkIndex(index);
|
||||
return _storePointer(_typedDataBase, _intPtrSize * index, value);
|
||||
return _storePointer(
|
||||
_typedDataBase,
|
||||
_offsetInBytes + _intPtrSize * index,
|
||||
value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1400,6 +1488,8 @@ final class _ArraySize<T extends NativeType> implements Array<T> {
|
|||
|
||||
Object get _typedDataBase =>
|
||||
throw UnsupportedError('_ArraySize._typedDataBase');
|
||||
|
||||
int get _offsetInBytes => throw UnsupportedError('_ArraySize._offsetInBytes');
|
||||
}
|
||||
|
||||
@patch
|
||||
|
|
|
@ -14,9 +14,16 @@ abstract final class _Compound implements NativeType {
|
|||
@pragma("vm:entry-point")
|
||||
final Object _typedDataBase;
|
||||
|
||||
/// Offset in bytes into [_typedDataBase].
|
||||
@pragma("vm:entry-point")
|
||||
final int _offsetInBytes;
|
||||
|
||||
external _Compound._();
|
||||
|
||||
_Compound._fromTypedDataBase(this._typedDataBase);
|
||||
_Compound._fromTypedDataBase(
|
||||
this._typedDataBase,
|
||||
this._offsetInBytes,
|
||||
);
|
||||
|
||||
/// Constructs a view on [typedData].
|
||||
///
|
||||
|
@ -25,7 +32,8 @@ abstract final class _Compound implements NativeType {
|
|||
TypedData typedData,
|
||||
int offset,
|
||||
int sizeInBytes,
|
||||
) : _typedDataBase = Uint8List.sublistView(typedData, offset) {
|
||||
) : _typedDataBase = typedData,
|
||||
_offsetInBytes = typedData.elementSizeInBytes * offset {
|
||||
if (typedData.lengthInBytes <
|
||||
typedData.elementSizeInBytes * offset + sizeInBytes) {
|
||||
throw RangeError.range(
|
||||
|
@ -147,7 +155,10 @@ abstract base class Struct extends _Compound implements SizedNativeType {
|
|||
/// Creates a view on a [TypedData] or [Pointer].
|
||||
///
|
||||
/// Used in [StructPointer.ref], FFI calls, and FFI callbacks.
|
||||
Struct._fromTypedDataBase(super._typedDataBase) : super._fromTypedDataBase();
|
||||
Struct._fromTypedDataBase(
|
||||
super._typedDataBase,
|
||||
super._offsetInBytes,
|
||||
) : super._fromTypedDataBase();
|
||||
|
||||
/// Creates a view on [typedData].
|
||||
///
|
||||
|
|
|
@ -116,7 +116,10 @@ abstract base class Union extends _Compound implements SizedNativeType {
|
|||
/// Creates a view on a [TypedData] or [Pointer].
|
||||
///
|
||||
/// Used in [UnionPointer.ref], FFI calls, and FFI callbacks.
|
||||
Union._fromTypedDataBase(super._typedDataBase) : super._fromTypedDataBase();
|
||||
Union._fromTypedDataBase(
|
||||
super._typedDataBase,
|
||||
super._offsetInBytes,
|
||||
) : super._fromTypedDataBase();
|
||||
|
||||
/// Creates a view on [typedData].
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue