[vm] Force inlining of various Struct helpers Specifically apply prefer-inline to: * All generated accessors. In general we almost always seem to select them for inlining through small-accessor heuristic, but sometimes it does not hit. Marking with pragma ensures that we are not dependent on specific heuristics to produce good code. * Various helpers involved in creating struct instances from typed data. These we *not* hit by normal heuristics and consequently not inlined prior to this change. Inlining them opens possibilities to fully eliminate allocations associated with `Struct.create(...)` if Struct does not escape. * Array creation helpers and accessors. They were also not inlined which meant we were producing unnecessary temporary objects when reading from inline arrays. TEST=/vm/dart/ffi_structs_optimizations_il_test CoreLibraryReviewExempt: no API or behavioral changes Cq-Include-Trybots: luci.dart.try:vm-aot-linux-product-x64-try,vm-aot-linux-release-x64-try Change-Id: I1650023200446bd5289118777365627ca19d3e5b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384261 Commit-Queue: Slava Egorov <vegorov@google.com> Reviewed-by: Daco Harkes <dacoharkes@google.com>
diff --git a/pkg/front_end/testcases/general/ffi_external_in_part_file.dart.strong.transformed.expect b/pkg/front_end/testcases/general/ffi_external_in_part_file.dart.strong.transformed.expect index 8256913..74f6a90 100644 --- a/pkg/front_end/testcases/general/ffi_external_in_part_file.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/ffi_external_in_part_file.dart.strong.transformed.expect
@@ -16,19 +16,22 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Struct1ByteInt : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Struct1ByteInt : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) ; - @#C7 + @#C9 + @#C8 get a0() → core::int 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 + @#C9 + @#C8 set a0(synthesized core::int #externalFieldValue) → void 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 + @#C8 static get a0#offsetOf() → core::int return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C9 + @#C8 static get #sizeOf() → core::int return #C13.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -36,7 +39,7 @@ core::print(self::returnStruct1ByteIntNative(1.{core::int::unary-}(){() → core::int})); } @#C19 -@#C9 +@#C8 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), #C10)); @@ -51,9 +54,9 @@ #C4 = null #C5 = ffi::_FfiStructLayout {fieldTypes:#C3, packing:#C4} #C6 = core::pragma {name:#C1, options:#C5} - #C7 = ffi::Int8 {} - #C8 = "vm:prefer-inline" - #C9 = core::pragma {name:#C8, options:#C4} + #C7 = "vm:prefer-inline" + #C8 = core::pragma {name:#C7, options:#C4} + #C9 = ffi::Int8 {} #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] #C12 = 1
diff --git a/pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect b/pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect index d51ed96..523fd22 100644 --- a/pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect
@@ -26,42 +26,49 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Coordinate : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Coordinate : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) ; - @#C8 + @#C10 + @#C9 get x() → core::double 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 + @#C10 + @#C9 set x(synthesized core::double #externalFieldValue) → void 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 + @#C10 + @#C9 get y() → core::double 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 + @#C10 + @#C9 set y(synthesized core::double #externalFieldValue) → void 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); 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>}!, #C9) 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>}!, #C11) in block { #t1.{self::Coordinate::x} = x; #t1.{self::Coordinate::y} = y; #t1.{self::Coordinate::next} = next; } =>#t1; } - @#C11 + @#C9 static get x#offsetOf() → core::int return #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C11 + @#C9 static get y#offsetOf() → core::int return #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C11 + @#C9 static get next#offsetOf() → core::int return #C16.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; + @#C9 get next() → ffi::Pointer<self::Coordinate> 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}); + @#C9 set next(synthesized ffi::Pointer<self::Coordinate> #v) → void 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); - @#C11 + @#C9 static get #sizeOf() → core::int return #C19.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -75,11 +82,11 @@ #C5 = null #C6 = ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = core::pragma {name:#C1, options:#C6} - #C8 = ffi::Double {} - #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] + #C8 = "vm:prefer-inline" + #C9 = core::pragma {name:#C8, options:#C5} + #C10 = ffi::Double {} + #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] #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
diff --git a/pkg/front_end/testcases/incremental/crash_05.yaml.world.1.expect b/pkg/front_end/testcases/incremental/crash_05.yaml.world.1.expect index 5e5039a..caf85e6 100644 --- a/pkg/front_end/testcases/incremental/crash_05.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/crash_05.yaml.world.1.expect
@@ -11,19 +11,22 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 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 + @#C9 + @#C8 get yy() → dart.core::int 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 + @#C9 + @#C8 set yy(synthesized dart.core::int #externalFieldValue) → void 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 + @#C8 static get yy#offsetOf() → dart.core::int return #C11.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C9 + @#C8 static get #sizeOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -41,17 +44,20 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 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) ; + @#C8 get xx() → lib::Y 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}); + @#C8 set xx(synthesized lib::Y #externalFieldValue) → void 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 + @#C8 static get xx#offsetOf() → dart.core::int return #C11.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C9 + @#C8 static get #sizeOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -63,9 +69,9 @@ #C4 = null #C5 = dart.ffi::_FfiStructLayout {fieldTypes:#C3, packing:#C4} #C6 = dart.core::pragma {name:#C1, options:#C5} - #C7 = dart.ffi::Uint32 {} - #C8 = "vm:prefer-inline" - #C9 = dart.core::pragma {name:#C8, options:#C4} + #C7 = "vm:prefer-inline" + #C8 = dart.core::pragma {name:#C7, options:#C4} + #C9 = dart.ffi::Uint32 {} #C10 = 0 #C11 = <dart.core::int>[#C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10] #C12 = 4
diff --git a/pkg/front_end/testcases/incremental/crash_05.yaml.world.2.expect b/pkg/front_end/testcases/incremental/crash_05.yaml.world.2.expect index 5e5039a..caf85e6 100644 --- a/pkg/front_end/testcases/incremental/crash_05.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/crash_05.yaml.world.2.expect
@@ -11,19 +11,22 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 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 + @#C9 + @#C8 get yy() → dart.core::int 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 + @#C9 + @#C8 set yy(synthesized dart.core::int #externalFieldValue) → void 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 + @#C8 static get yy#offsetOf() → dart.core::int return #C11.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C9 + @#C8 static get #sizeOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -41,17 +44,20 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 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) ; + @#C8 get xx() → lib::Y 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}); + @#C8 set xx(synthesized lib::Y #externalFieldValue) → void 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 + @#C8 static get xx#offsetOf() → dart.core::int return #C11.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C9 + @#C8 static get #sizeOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -63,9 +69,9 @@ #C4 = null #C5 = dart.ffi::_FfiStructLayout {fieldTypes:#C3, packing:#C4} #C6 = dart.core::pragma {name:#C1, options:#C5} - #C7 = dart.ffi::Uint32 {} - #C8 = "vm:prefer-inline" - #C9 = dart.core::pragma {name:#C8, options:#C4} + #C7 = "vm:prefer-inline" + #C8 = dart.core::pragma {name:#C7, options:#C4} + #C9 = dart.ffi::Uint32 {} #C10 = 0 #C11 = <dart.core::int>[#C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10, #C10] #C12 = 4
diff --git a/pkg/front_end/testcases/incremental/crash_06.yaml.world.1.expect b/pkg/front_end/testcases/incremental/crash_06.yaml.world.1.expect index dbbbe2b..c0922b2 100644 --- a/pkg/front_end/testcases/incremental/crash_06.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/crash_06.yaml.world.1.expect
@@ -29,19 +29,22 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → str::A : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 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) ; + @#C8 get yy() → str::Y 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}); + @#C8 set yy(synthesized str::Y #externalFieldValue) → void - 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 + 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}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}); + @#C8 static get yy#offsetOf() → dart.core::int - return #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; + @#C8 static get #sizeOf() → dart.core::int - return #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; + return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } final class Y extends dart.ffi::Struct { synthetic constructor •() → str::Y @@ -50,14 +53,15 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → str::Y : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 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) ; external get zz() → invalid-type; external set zz(synthesized invalid-type #externalFieldValue) → void; - @#C10 + @#C8 static get #sizeOf() → dart.core::int - return #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; + return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } } constants { @@ -67,8 +71,8 @@ #C4 = null #C5 = dart.ffi::_FfiStructLayout {fieldTypes:#C3, packing:#C4} #C6 = dart.core::pragma {name:#C1, options:#C5} - #C7 = 0 - #C8 = <dart.core::int>[#C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7] - #C9 = "vm:prefer-inline" - #C10 = dart.core::pragma {name:#C9, options:#C4} + #C7 = "vm:prefer-inline" + #C8 = dart.core::pragma {name:#C7, options:#C4} + #C9 = 0 + #C10 = <dart.core::int>[#C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9] }
diff --git a/pkg/front_end/testcases/incremental/crash_06.yaml.world.2.expect b/pkg/front_end/testcases/incremental/crash_06.yaml.world.2.expect index dbbbe2b..c0922b2 100644 --- a/pkg/front_end/testcases/incremental/crash_06.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/crash_06.yaml.world.2.expect
@@ -29,19 +29,22 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → str::A : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 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) ; + @#C8 get yy() → str::Y 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}); + @#C8 set yy(synthesized str::Y #externalFieldValue) → void - 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 + 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}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}); + @#C8 static get yy#offsetOf() → dart.core::int - return #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; + @#C8 static get #sizeOf() → dart.core::int - return #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; + return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } final class Y extends dart.ffi::Struct { synthetic constructor •() → str::Y @@ -50,14 +53,15 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → str::Y : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 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) ; external get zz() → invalid-type; external set zz(synthesized invalid-type #externalFieldValue) → void; - @#C10 + @#C8 static get #sizeOf() → dart.core::int - return #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; + return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } } constants { @@ -67,8 +71,8 @@ #C4 = null #C5 = dart.ffi::_FfiStructLayout {fieldTypes:#C3, packing:#C4} #C6 = dart.core::pragma {name:#C1, options:#C5} - #C7 = 0 - #C8 = <dart.core::int>[#C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7] - #C9 = "vm:prefer-inline" - #C10 = dart.core::pragma {name:#C9, options:#C4} + #C7 = "vm:prefer-inline" + #C8 = dart.core::pragma {name:#C7, options:#C4} + #C9 = 0 + #C10 = <dart.core::int>[#C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9] }
diff --git a/pkg/front_end/testcases/incremental/ffi_01.yaml.world.1.expect b/pkg/front_end/testcases/incremental/ffi_01.yaml.world.1.expect index 2429dd7..e4b6bb2 100644 --- a/pkg/front_end/testcases/incremental/ffi_01.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/ffi_01.yaml.world.1.expect
@@ -8,38 +8,45 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Coordinate : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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 + @#C10 + @#C9 get x() → dart.core::double 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 + @#C10 + @#C9 set x(synthesized dart.core::double #externalFieldValue) → void 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 + @#C10 + @#C9 get y() → dart.core::double 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 + @#C10 + @#C9 set y(synthesized dart.core::double #externalFieldValue) → void 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); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{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 ""; } - @#C10 + @#C9 static get x#offsetOf() → dart.core::int return #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get y#offsetOf() → dart.core::int return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get next#offsetOf() → dart.core::int return #C16.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get #sizeOf() → dart.core::int return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -63,9 +70,9 @@ #C5 = null #C6 = dart.ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = dart.core::pragma {name:#C1, options:#C6} - #C8 = dart.ffi::Double {} - #C9 = "vm:prefer-inline" - #C10 = dart.core::pragma {name:#C9, options:#C5} + #C8 = "vm:prefer-inline" + #C9 = dart.core::pragma {name:#C8, options:#C5} + #C10 = dart.ffi::Double {} #C11 = 0 #C12 = <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] #C13 = 8
diff --git a/pkg/front_end/testcases/incremental/ffi_01.yaml.world.2.expect b/pkg/front_end/testcases/incremental/ffi_01.yaml.world.2.expect index ecbfece..70d7f9e 100644 --- a/pkg/front_end/testcases/incremental/ffi_01.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/ffi_01.yaml.world.2.expect
@@ -8,38 +8,45 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Coordinate : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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 + @#C10 + @#C9 get x() → dart.core::double 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 + @#C10 + @#C9 set x(synthesized dart.core::double #externalFieldValue) → void 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 + @#C10 + @#C9 get y() → dart.core::double 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 + @#C10 + @#C9 set y(synthesized dart.core::double #externalFieldValue) → void 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); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{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 ""; } - @#C10 + @#C9 static get x#offsetOf() → dart.core::int return #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get y#offsetOf() → dart.core::int return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get next#offsetOf() → dart.core::int return #C16.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get #sizeOf() → dart.core::int return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -67,9 +74,9 @@ #C5 = null #C6 = dart.ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = dart.core::pragma {name:#C1, options:#C6} - #C8 = dart.ffi::Double {} - #C9 = "vm:prefer-inline" - #C10 = dart.core::pragma {name:#C9, options:#C5} + #C8 = "vm:prefer-inline" + #C9 = dart.core::pragma {name:#C8, options:#C5} + #C10 = dart.ffi::Double {} #C11 = 0 #C12 = <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] #C13 = 8
diff --git a/pkg/front_end/testcases/incremental/ffi_02.yaml.world.1.expect b/pkg/front_end/testcases/incremental/ffi_02.yaml.world.1.expect index b8aaa72..736d82e 100644 --- a/pkg/front_end/testcases/incremental/ffi_02.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/ffi_02.yaml.world.1.expect
@@ -8,38 +8,45 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Coordinate : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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 + @#C10 + @#C9 get x() → dart.core::double 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 + @#C10 + @#C9 set x(synthesized dart.core::double #externalFieldValue) → void 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 + @#C10 + @#C9 get y() → dart.core::double 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 + @#C10 + @#C9 set y(synthesized dart.core::double #externalFieldValue) → void 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); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{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 ""; } - @#C10 + @#C9 static get x#offsetOf() → dart.core::int return #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get y#offsetOf() → dart.core::int return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get next#offsetOf() → dart.core::int return #C16.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get #sizeOf() → dart.core::int return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -64,9 +71,9 @@ #C5 = null #C6 = dart.ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = dart.core::pragma {name:#C1, options:#C6} - #C8 = dart.ffi::Double {} - #C9 = "vm:prefer-inline" - #C10 = dart.core::pragma {name:#C9, options:#C5} + #C8 = "vm:prefer-inline" + #C9 = dart.core::pragma {name:#C8, options:#C5} + #C10 = dart.ffi::Double {} #C11 = 0 #C12 = <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] #C13 = 8
diff --git a/pkg/front_end/testcases/incremental/issue_46666.yaml.world.1.expect b/pkg/front_end/testcases/incremental/issue_46666.yaml.world.1.expect index 9333d3c..d3a4963 100644 --- a/pkg/front_end/testcases/incremental/issue_46666.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/issue_46666.yaml.world.1.expect
@@ -11,38 +11,47 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → a::StructA : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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) ; + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); + @#C9 get blah() → a::NestedStruct 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}); + @#C9 set blah(synthesized a::NestedStruct #externalFieldValue) → void - 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 + 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}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}); + @#C9 static get a1#offsetOf() → dart.core::int return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + @#C9 static get a2#offsetOf() → dart.core::int return #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + @#C9 static get a3#offsetOf() → dart.core::int return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + @#C9 static get blah#offsetOf() → dart.core::int - return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + return #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; + @#C9 static get #sizeOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -54,33 +63,40 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → a::NestedStruct : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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) ; + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); - @#C12 + @#C9 static get n1#offsetOf() → dart.core::int return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + @#C9 static get n2#offsetOf() → dart.core::int return #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + @#C9 static get n3#offsetOf() → dart.core::int return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + @#C9 static get #sizeOf() → dart.core::int - return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; + return #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } } library from "org-dartlang-test:///b.dart" as b { @@ -98,17 +114,20 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → b::StructB : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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) ; + @#C9 get b1() → a::StructA 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}); + @#C9 set b1(synthesized a::StructA #externalFieldValue) → void 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 + @#C9 static get b1#offsetOf() → dart.core::int return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + @#C9 static get #sizeOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -127,11 +146,11 @@ #C5 = null #C6 = dart.ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = dart.core::pragma {name:#C1, options:#C6} - #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 = "vm:prefer-inline" - #C12 = dart.core::pragma {name:#C11, options:#C5} + #C8 = "vm:prefer-inline" + #C9 = dart.core::pragma {name:#C8, options:#C5} + #C10 = 12 + #C11 = 24 + #C12 = <dart.core::int>[#C10, #C11, #C10, #C11, #C11, #C11, #C11, #C11, #C10, #C11, #C11, #C10, #C11, #C10, #C11, #C10, #C11, #C11, #C11, #C11, #C10, #C11] #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 @@ -140,7 +159,7 @@ #C18 = 16 #C19 = <dart.core::int>[#C16, #C18, #C16, #C18, #C18, #C18, #C18, #C18, #C16, #C18, #C18, #C16, #C18, #C16, #C18, #C16, #C18, #C18, #C18, #C18, #C16, #C18] #C20 = 48 - #C21 = <dart.core::int>[#C9, #C20, #C9, #C20, #C20, #C20, #C20, #C20, #C9, #C20, #C20, #C9, #C20, #C9, #C20, #C9, #C20, #C20, #C20, #C20, #C9, #C20] + #C21 = <dart.core::int>[#C11, #C20, #C11, #C20, #C20, #C20, #C20, #C20, #C11, #C20, #C20, #C11, #C20, #C11, #C20, #C11, #C20, #C20, #C20, #C20, #C11, #C20] #C22 = <dart.core::Type>[#C2, #C2, #C2] #C23 = dart.ffi::_FfiStructLayout {fieldTypes:#C22, packing:#C5} #C24 = dart.core::pragma {name:#C1, options:#C23}
diff --git a/pkg/front_end/testcases/incremental/issue_46666.yaml.world.2.expect b/pkg/front_end/testcases/incremental/issue_46666.yaml.world.2.expect index 9333d3c..d3a4963 100644 --- a/pkg/front_end/testcases/incremental/issue_46666.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/issue_46666.yaml.world.2.expect
@@ -11,38 +11,47 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → a::StructA : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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) ; + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); + @#C9 get blah() → a::NestedStruct 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}); + @#C9 set blah(synthesized a::NestedStruct #externalFieldValue) → void - 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 + 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}, #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}); + @#C9 static get a1#offsetOf() → dart.core::int return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + @#C9 static get a2#offsetOf() → dart.core::int return #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + @#C9 static get a3#offsetOf() → dart.core::int return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + @#C9 static get blah#offsetOf() → dart.core::int - return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + return #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; + @#C9 static get #sizeOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -54,33 +63,40 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → a::NestedStruct : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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) ; + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); - @#C12 + @#C9 static get n1#offsetOf() → dart.core::int return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + @#C9 static get n2#offsetOf() → dart.core::int return #C17.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + @#C9 static get n3#offsetOf() → dart.core::int return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + @#C9 static get #sizeOf() → dart.core::int - return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; + return #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } } library from "org-dartlang-test:///b.dart" as b { @@ -98,17 +114,20 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → b::StructB : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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) ; + @#C9 get b1() → a::StructA 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}); + @#C9 set b1(synthesized a::StructA #externalFieldValue) → void 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 + @#C9 static get b1#offsetOf() → dart.core::int return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C12 + @#C9 static get #sizeOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -127,11 +146,11 @@ #C5 = null #C6 = dart.ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = dart.core::pragma {name:#C1, options:#C6} - #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 = "vm:prefer-inline" - #C12 = dart.core::pragma {name:#C11, options:#C5} + #C8 = "vm:prefer-inline" + #C9 = dart.core::pragma {name:#C8, options:#C5} + #C10 = 12 + #C11 = 24 + #C12 = <dart.core::int>[#C10, #C11, #C10, #C11, #C11, #C11, #C11, #C11, #C10, #C11, #C11, #C10, #C11, #C10, #C11, #C10, #C11, #C11, #C11, #C11, #C10, #C11] #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 @@ -140,7 +159,7 @@ #C18 = 16 #C19 = <dart.core::int>[#C16, #C18, #C16, #C18, #C18, #C18, #C18, #C18, #C16, #C18, #C18, #C16, #C18, #C16, #C18, #C16, #C18, #C18, #C18, #C18, #C16, #C18] #C20 = 48 - #C21 = <dart.core::int>[#C9, #C20, #C9, #C20, #C20, #C20, #C20, #C20, #C9, #C20, #C20, #C9, #C20, #C9, #C20, #C9, #C20, #C20, #C20, #C20, #C9, #C20] + #C21 = <dart.core::int>[#C11, #C20, #C11, #C20, #C20, #C20, #C20, #C20, #C11, #C20, #C20, #C11, #C20, #C11, #C20, #C11, #C20, #C20, #C20, #C20, #C11, #C20] #C22 = <dart.core::Type>[#C2, #C2, #C2] #C23 = dart.ffi::_FfiStructLayout {fieldTypes:#C22, packing:#C5} #C24 = dart.core::pragma {name:#C1, options:#C23}
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.1.expect index 2429dd7..e4b6bb2 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.1.expect
@@ -8,38 +8,45 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Coordinate : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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 + @#C10 + @#C9 get x() → dart.core::double 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 + @#C10 + @#C9 set x(synthesized dart.core::double #externalFieldValue) → void 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 + @#C10 + @#C9 get y() → dart.core::double 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 + @#C10 + @#C9 set y(synthesized dart.core::double #externalFieldValue) → void 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); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{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 ""; } - @#C10 + @#C9 static get x#offsetOf() → dart.core::int return #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get y#offsetOf() → dart.core::int return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get next#offsetOf() → dart.core::int return #C16.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get #sizeOf() → dart.core::int return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -63,9 +70,9 @@ #C5 = null #C6 = dart.ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = dart.core::pragma {name:#C1, options:#C6} - #C8 = dart.ffi::Double {} - #C9 = "vm:prefer-inline" - #C10 = dart.core::pragma {name:#C9, options:#C5} + #C8 = "vm:prefer-inline" + #C9 = dart.core::pragma {name:#C8, options:#C5} + #C10 = dart.ffi::Double {} #C11 = 0 #C12 = <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] #C13 = 8
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.2.expect index 13ddc90..a132b6a 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.2.expect
@@ -8,38 +8,45 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Coordinate : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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 + @#C10 + @#C9 get x() → dart.core::double 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 + @#C10 + @#C9 set x(synthesized dart.core::double #externalFieldValue) → void 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 + @#C10 + @#C9 get y() → dart.core::double 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 + @#C10 + @#C9 set y(synthesized dart.core::double #externalFieldValue) → void 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); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{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 ""; } - @#C10 + @#C9 static get x#offsetOf() → dart.core::int return #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get y#offsetOf() → dart.core::int return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get next#offsetOf() → dart.core::int return #C16.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get #sizeOf() → dart.core::int return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -64,9 +71,9 @@ #C5 = null #C6 = dart.ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = dart.core::pragma {name:#C1, options:#C6} - #C8 = dart.ffi::Double {} - #C9 = "vm:prefer-inline" - #C10 = dart.core::pragma {name:#C9, options:#C5} + #C8 = "vm:prefer-inline" + #C9 = dart.core::pragma {name:#C8, options:#C5} + #C10 = dart.ffi::Double {} #C11 = 0 #C12 = <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] #C13 = 8
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.3.expect b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.3.expect index d30e95f..0180ffd 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.3.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.3.expect
@@ -8,39 +8,46 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Coordinate : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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 + @#C10 + @#C9 get x() → dart.core::double 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 + @#C10 + @#C9 set x(synthesized dart.core::double #externalFieldValue) → void 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 + @#C10 + @#C9 get y() → dart.core::double 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 + @#C10 + @#C9 set y(synthesized dart.core::double #externalFieldValue) → void 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); + @#C9 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C9 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.{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 ""; } - @#C10 + @#C9 static get x#offsetOf() → dart.core::int return #C12.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get y#offsetOf() → dart.core::int return #C14.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get next#offsetOf() → dart.core::int return #C16.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C10 + @#C9 static get #sizeOf() → dart.core::int return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -65,9 +72,9 @@ #C5 = null #C6 = dart.ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = dart.core::pragma {name:#C1, options:#C6} - #C8 = dart.ffi::Double {} - #C9 = "vm:prefer-inline" - #C10 = dart.core::pragma {name:#C9, options:#C5} + #C8 = "vm:prefer-inline" + #C9 = dart.core::pragma {name:#C8, options:#C5} + #C10 = dart.ffi::Double {} #C11 = 0 #C12 = <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] #C13 = 8
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.1.expect index 3e4c503..6a285ab 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.1.expect
@@ -11,37 +11,44 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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 + @#C10 + @#C9 get y1() → dart.core::int 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 + @#C10 + @#C9 set y1(synthesized dart.core::int #externalFieldValue) → void 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 + @#C10 + @#C9 get y2() → dart.core::int 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 + @#C10 + @#C9 set y2(synthesized dart.core::int #externalFieldValue) → void 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 @#C9 get y3() → dart.core::int 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}); + @#C11 @#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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); - @#C11 + @#C9 static get y1#offsetOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get y2#offsetOf() → dart.core::int return #C15.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get y3#offsetOf() → dart.core::int return #C18.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get #sizeOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -59,33 +66,40 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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) ; + @#C9 get x1() → lib::Y 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}); + @#C9 set x1(synthesized lib::Y #externalFieldValue) → void 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}); + @#C9 get x2() → lib::Y 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}); + @#C9 set x2(synthesized lib::Y #externalFieldValue) → void 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 + @#C10 + @#C9 get x3() → dart.core::int 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 + @#C10 + @#C9 set x3(synthesized dart.core::int #externalFieldValue) → void 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 + @#C9 static get x1#offsetOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get x2#offsetOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get x3#offsetOf() → dart.core::int return #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get #sizeOf() → dart.core::int return #C31.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -98,10 +112,10 @@ #C5 = null #C6 = dart.ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = dart.core::pragma {name:#C1, options:#C6} - #C8 = dart.ffi::Uint8 {} - #C9 = dart.ffi::Uint64 {} - #C10 = "vm:prefer-inline" - #C11 = dart.core::pragma {name:#C10, options:#C5} + #C8 = "vm:prefer-inline" + #C9 = dart.core::pragma {name:#C8, options:#C5} + #C10 = dart.ffi::Uint8 {} + #C11 = dart.ffi::Uint64 {} #C12 = 0 #C13 = <dart.core::int>[#C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12] #C14 = 1
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.2.expect index 21fde01..2406317 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_48_ffi.yaml.world.2.expect
@@ -11,37 +11,44 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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 + @#C10 + @#C9 get y1() → dart.core::int 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 + @#C10 + @#C9 set y1(synthesized dart.core::int #externalFieldValue) → void 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); + @#C11 @#C9 get y3() → dart.core::int 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}); + @#C11 @#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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); - @#C8 + @#C10 + @#C9 get y2() → dart.core::int 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 + @#C10 + @#C9 set y2(synthesized dart.core::int #externalFieldValue) → void 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 + @#C9 static get y1#offsetOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get y3#offsetOf() → dart.core::int return #C16.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get y2#offsetOf() → dart.core::int return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get #sizeOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -59,33 +66,40 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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) ; + @#C9 get x1() → lib::Y 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}); + @#C9 set x1(synthesized lib::Y #externalFieldValue) → void 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}); + @#C9 get x2() → lib::Y 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}); + @#C9 set x2(synthesized lib::Y #externalFieldValue) → void 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 + @#C10 + @#C9 get x3() → dart.core::int 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 + @#C10 + @#C9 set x3(synthesized dart.core::int #externalFieldValue) → void 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 + @#C9 static get x1#offsetOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get x2#offsetOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get x3#offsetOf() → dart.core::int return #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get #sizeOf() → dart.core::int return #C31.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -98,10 +112,10 @@ #C5 = null #C6 = dart.ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = dart.core::pragma {name:#C1, options:#C6} - #C8 = dart.ffi::Uint8 {} - #C9 = dart.ffi::Uint64 {} - #C10 = "vm:prefer-inline" - #C11 = dart.core::pragma {name:#C10, options:#C5} + #C8 = "vm:prefer-inline" + #C9 = dart.core::pragma {name:#C8, options:#C5} + #C10 = dart.ffi::Uint8 {} + #C11 = dart.ffi::Uint64 {} #C12 = 0 #C13 = <dart.core::int>[#C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12] #C14 = 8
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.1.expect index 3e4c503..6a285ab 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.1.expect
@@ -11,37 +11,44 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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 + @#C10 + @#C9 get y1() → dart.core::int 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 + @#C10 + @#C9 set y1(synthesized dart.core::int #externalFieldValue) → void 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 + @#C10 + @#C9 get y2() → dart.core::int 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 + @#C10 + @#C9 set y2(synthesized dart.core::int #externalFieldValue) → void 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 @#C9 get y3() → dart.core::int 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}); + @#C11 @#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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); - @#C11 + @#C9 static get y1#offsetOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get y2#offsetOf() → dart.core::int return #C15.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get y3#offsetOf() → dart.core::int return #C18.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get #sizeOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -59,33 +66,40 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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) ; + @#C9 get x1() → lib::Y 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}); + @#C9 set x1(synthesized lib::Y #externalFieldValue) → void 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}); + @#C9 get x2() → lib::Y 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}); + @#C9 set x2(synthesized lib::Y #externalFieldValue) → void 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 + @#C10 + @#C9 get x3() → dart.core::int 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 + @#C10 + @#C9 set x3(synthesized dart.core::int #externalFieldValue) → void 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 + @#C9 static get x1#offsetOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get x2#offsetOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get x3#offsetOf() → dart.core::int return #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get #sizeOf() → dart.core::int return #C31.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -98,10 +112,10 @@ #C5 = null #C6 = dart.ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = dart.core::pragma {name:#C1, options:#C6} - #C8 = dart.ffi::Uint8 {} - #C9 = dart.ffi::Uint64 {} - #C10 = "vm:prefer-inline" - #C11 = dart.core::pragma {name:#C10, options:#C5} + #C8 = "vm:prefer-inline" + #C9 = dart.core::pragma {name:#C8, options:#C5} + #C10 = dart.ffi::Uint8 {} + #C11 = dart.ffi::Uint64 {} #C12 = 0 #C13 = <dart.core::int>[#C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12] #C14 = 1
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.2.expect index 21fde01..2406317 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_49_ffi.yaml.world.2.expect
@@ -11,37 +11,44 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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 + @#C10 + @#C9 get y1() → dart.core::int 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 + @#C10 + @#C9 set y1(synthesized dart.core::int #externalFieldValue) → void 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); + @#C11 @#C9 get y3() → dart.core::int 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}); + @#C11 @#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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); - @#C8 + @#C10 + @#C9 get y2() → dart.core::int 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 + @#C10 + @#C9 set y2(synthesized dart.core::int #externalFieldValue) → void 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 + @#C9 static get y1#offsetOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get y3#offsetOf() → dart.core::int return #C16.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get y2#offsetOf() → dart.core::int return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get #sizeOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -59,33 +66,40 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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) ; + @#C9 get x1() → lib::Y 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}); + @#C9 set x1(synthesized lib::Y #externalFieldValue) → void 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}); + @#C9 get x2() → lib::Y 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}); + @#C9 set x2(synthesized lib::Y #externalFieldValue) → void 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 + @#C10 + @#C9 get x3() → dart.core::int 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 + @#C10 + @#C9 set x3(synthesized dart.core::int #externalFieldValue) → void 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 + @#C9 static get x1#offsetOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get x2#offsetOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get x3#offsetOf() → dart.core::int return #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get #sizeOf() → dart.core::int return #C31.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -98,10 +112,10 @@ #C5 = null #C6 = dart.ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = dart.core::pragma {name:#C1, options:#C6} - #C8 = dart.ffi::Uint8 {} - #C9 = dart.ffi::Uint64 {} - #C10 = "vm:prefer-inline" - #C11 = dart.core::pragma {name:#C10, options:#C5} + #C8 = "vm:prefer-inline" + #C9 = dart.core::pragma {name:#C8, options:#C5} + #C10 = dart.ffi::Uint8 {} + #C11 = dart.ffi::Uint64 {} #C12 = 0 #C13 = <dart.core::int>[#C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12] #C14 = 8
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.1.expect index 1398f60..3f54b83 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.1.expect
@@ -11,37 +11,44 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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 + @#C10 + @#C9 get y1() → dart.core::int 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 + @#C10 + @#C9 set y1(synthesized dart.core::int #externalFieldValue) → void 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 + @#C10 + @#C9 get y2() → dart.core::int 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 + @#C10 + @#C9 set y2(synthesized dart.core::int #externalFieldValue) → void 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 @#C9 get y3() → dart.core::int 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}); + @#C11 @#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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); - @#C11 + @#C9 static get y1#offsetOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get y2#offsetOf() → dart.core::int return #C15.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get y3#offsetOf() → dart.core::int return #C18.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get #sizeOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -281,33 +288,40 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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) ; + @#C9 get x1() → lib::Y 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}); + @#C9 set x1(synthesized lib::Y #externalFieldValue) → void 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}); + @#C9 get x2() → lib::Y 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}); + @#C9 set x2(synthesized lib::Y #externalFieldValue) → void 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 + @#C10 + @#C9 get x3() → dart.core::int 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 + @#C10 + @#C9 set x3(synthesized dart.core::int #externalFieldValue) → void 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 + @#C9 static get x1#offsetOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get x2#offsetOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get x3#offsetOf() → dart.core::int return #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get #sizeOf() → dart.core::int return #C31.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -320,10 +334,10 @@ #C5 = null #C6 = dart.ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = dart.core::pragma {name:#C1, options:#C6} - #C8 = dart.ffi::Uint8 {} - #C9 = dart.ffi::Uint64 {} - #C10 = "vm:prefer-inline" - #C11 = dart.core::pragma {name:#C10, options:#C5} + #C8 = "vm:prefer-inline" + #C9 = dart.core::pragma {name:#C8, options:#C5} + #C10 = dart.ffi::Uint8 {} + #C11 = dart.ffi::Uint64 {} #C12 = 0 #C13 = <dart.core::int>[#C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12] #C14 = 1
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.2.expect index d95635a..c17061e 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_50_ffi.yaml.world.2.expect
@@ -11,37 +11,44 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::Y : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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 + @#C10 + @#C9 get y1() → dart.core::int 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 + @#C10 + @#C9 set y1(synthesized dart.core::int #externalFieldValue) → void 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); + @#C11 @#C9 get y3() → dart.core::int 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}); + @#C11 @#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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}, #externalFieldValue); - @#C8 + @#C10 + @#C9 get y2() → dart.core::int 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 + @#C10 + @#C9 set y2(synthesized dart.core::int #externalFieldValue) → void 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 + @#C9 static get y1#offsetOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get y3#offsetOf() → dart.core::int return #C16.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get y2#offsetOf() → dart.core::int return #C19.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get #sizeOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -281,33 +288,40 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 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) ; + @#C9 get x1() → lib::Y 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}); + @#C9 set x1(synthesized lib::Y #externalFieldValue) → void 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}); + @#C9 get x2() → lib::Y 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}); + @#C9 set x2(synthesized lib::Y #externalFieldValue) → void 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 + @#C10 + @#C9 get x3() → dart.core::int 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 + @#C10 + @#C9 set x3(synthesized dart.core::int #externalFieldValue) → void 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 + @#C9 static get x1#offsetOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get x2#offsetOf() → dart.core::int return #C21.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get x3#offsetOf() → dart.core::int return #C28.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C11 + @#C9 static get #sizeOf() → dart.core::int return #C31.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -320,10 +334,10 @@ #C5 = null #C6 = dart.ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = dart.core::pragma {name:#C1, options:#C6} - #C8 = dart.ffi::Uint8 {} - #C9 = dart.ffi::Uint64 {} - #C10 = "vm:prefer-inline" - #C11 = dart.core::pragma {name:#C10, options:#C5} + #C8 = "vm:prefer-inline" + #C9 = dart.core::pragma {name:#C8, options:#C5} + #C10 = dart.ffi::Uint8 {} + #C11 = dart.ffi::Uint64 {} #C12 = 0 #C13 = <dart.core::int>[#C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12] #C14 = 8
diff --git a/pkg/front_end/testcases/incremental/regress_46004.yaml.world.1.expect b/pkg/front_end/testcases/incremental/regress_46004.yaml.world.1.expect index 03a951b..553c748 100644 --- a/pkg/front_end/testcases/incremental/regress_46004.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/regress_46004.yaml.world.1.expect
@@ -11,19 +11,22 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::COMObject : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 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) ; + @#C8 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C8 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.{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 + return dart.ffi::Pointer::fromAddress<dart.ffi::IntPtr>(dart.ffi::_loadAbiSpecificInt<dart.ffi::IntPtr>(this.{lib::COMObject::lpVtbl}{dart.ffi::Pointer<dart.ffi::IntPtr>}, #C9)); + @#C8 static get lpVtbl#offsetOf() → dart.core::int return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C9 + @#C8 static get #sizeOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -41,17 +44,20 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 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) ; + @#C8 get xx() → lib::COMObject 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}); + @#C8 set xx(synthesized lib::COMObject #externalFieldValue) → void 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 + @#C8 static get xx#offsetOf() → dart.core::int return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C9 + @#C8 static get #sizeOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -63,10 +69,10 @@ #C4 = null #C5 = dart.ffi::_FfiStructLayout {fieldTypes:#C3, packing:#C4} #C6 = dart.core::pragma {name:#C1, options:#C5} - #C7 = 0 - #C8 = "vm:prefer-inline" - #C9 = dart.core::pragma {name:#C8, options:#C4} - #C10 = <dart.core::int>[#C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7] + #C7 = "vm:prefer-inline" + #C8 = dart.core::pragma {name:#C7, options:#C4} + #C9 = 0 + #C10 = <dart.core::int>[#C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9] #C11 = 4 #C12 = 8 #C13 = <dart.core::int>[#C11, #C12, #C11, #C12, #C12, #C12, #C12, #C12, #C11, #C12, #C12, #C11, #C12, #C11, #C12, #C11, #C12, #C12, #C12, #C12, #C11, #C12]
diff --git a/pkg/front_end/testcases/incremental/regress_46004.yaml.world.2.expect b/pkg/front_end/testcases/incremental/regress_46004.yaml.world.2.expect index 03a951b..553c748 100644 --- a/pkg/front_end/testcases/incremental/regress_46004.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/regress_46004.yaml.world.2.expect
@@ -11,19 +11,22 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → lib::COMObject : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 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) ; + @#C8 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.{dart.core::num::+}(this.{dart.ffi::_Compound::_offsetInBytes}{dart.core::int}){(dart.core::num) → dart.core::num}); + @#C8 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.{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 + return dart.ffi::Pointer::fromAddress<dart.ffi::IntPtr>(dart.ffi::_loadAbiSpecificInt<dart.ffi::IntPtr>(this.{lib::COMObject::lpVtbl}{dart.ffi::Pointer<dart.ffi::IntPtr>}, #C9)); + @#C8 static get lpVtbl#offsetOf() → dart.core::int return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C9 + @#C8 static get #sizeOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -41,17 +44,20 @@ constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase, synthesized dart.core::int #offsetInBytes) → main::X : super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 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) ; + @#C8 get xx() → lib::COMObject 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}); + @#C8 set xx(synthesized lib::COMObject #externalFieldValue) → void 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 + @#C8 static get xx#offsetOf() → dart.core::int return #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; - @#C9 + @#C8 static get #sizeOf() → dart.core::int return #C13.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int}; } @@ -63,10 +69,10 @@ #C4 = null #C5 = dart.ffi::_FfiStructLayout {fieldTypes:#C3, packing:#C4} #C6 = dart.core::pragma {name:#C1, options:#C5} - #C7 = 0 - #C8 = "vm:prefer-inline" - #C9 = dart.core::pragma {name:#C8, options:#C4} - #C10 = <dart.core::int>[#C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7] + #C7 = "vm:prefer-inline" + #C8 = dart.core::pragma {name:#C7, options:#C4} + #C9 = 0 + #C10 = <dart.core::int>[#C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9] #C11 = 4 #C12 = 8 #C13 = <dart.core::int>[#C11, #C12, #C11, #C12, #C12, #C12, #C12, #C12, #C11, #C12, #C12, #C11, #C12, #C11, #C12, #C11, #C12, #C12, #C12, #C12, #C11, #C12]
diff --git a/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.transformed.expect index b8fa84b..4b04219a 100644 --- a/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.transformed.expect
@@ -12,42 +12,49 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Coordinate : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C9 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Coordinate : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) ; - @#C8 + @#C10 + @#C9 get x() → core::double 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 + @#C10 + @#C9 set x(synthesized core::double #externalFieldValue) → void 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 + @#C10 + @#C9 get y() → core::double 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 + @#C10 + @#C9 set y(synthesized core::double #externalFieldValue) → void 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); + @#C9 get next() → ffi::Pointer<self::Coordinate> 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}); + @#C9 set next(synthesized ffi::Pointer<self::Coordinate> #externalFieldValue) → void 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>}!, #C9) 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>}!, #C11) in block { #t1.{self::Coordinate::x} = x; #t1.{self::Coordinate::y} = y; #t1.{self::Coordinate::next} = next; } =>#t1; } - @#C11 + @#C9 static get x#offsetOf() → core::int return #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C11 + @#C9 static get y#offsetOf() → core::int return #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C11 + @#C9 static get next#offsetOf() → core::int return #C16.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C11 + @#C9 static get #sizeOf() → core::int return #C19.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -61,11 +68,11 @@ #C5 = null #C6 = ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} #C7 = core::pragma {name:#C1, options:#C6} - #C8 = ffi::Double {} - #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] + #C8 = "vm:prefer-inline" + #C9 = core::pragma {name:#C8, options:#C5} + #C10 = ffi::Double {} + #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] #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
diff --git a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.strong.transformed.expect index 777bbb3..5de6c77 100644 --- a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array.dart.strong.transformed.expect
@@ -15,21 +15,24 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::StructInlineArray : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C10 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::StructInlineArray : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) ; + @#C12 @#C10 get a0() → ffi::Array<ffi::Uint8> - 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, #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, #C13); + @#C12 @#C10 set a0(synthesized ffi::Array<ffi::Uint8> #externalFieldValue) → void - 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}, #C12.{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}, #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int}); + @#C10 static get a0#offsetOf() → core::int return #C16.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C14 + @#C10 static get #sizeOf() → core::int - return #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; + return #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } static method main() → dynamic {} @@ -42,12 +45,12 @@ #C6 = null #C7 = ffi::_FfiStructLayout {fieldTypes:#C5, packing:#C6} #C8 = core::pragma {name:#C1, options:#C7} - #C9 = false - #C10 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C3, dimension2:#C6, dimension3:#C6, dimension4:#C6, dimension5:#C6, dimensions:#C6, variableLength:#C9} - #C11 = <core::int>[] - #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} + #C9 = "vm:prefer-inline" + #C10 = core::pragma {name:#C9, options:#C6} + #C11 = false + #C12 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C3, dimension2:#C6, dimension3:#C6, dimension4:#C6, dimension5:#C6, dimensions:#C6, variableLength:#C11} + #C13 = <core::int>[] + #C14 = <core::int>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3] #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] }
diff --git a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.transformed.expect index 175b061..b1cae79 100644 --- a/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/ffi_struct_inline_array_multi_dimensional.dart.strong.transformed.expect
@@ -16,21 +16,24 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::StructInlineArrayMultiDimensional : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C10 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::StructInlineArrayMultiDimensional : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) ; - @#C11 + @#C13 + @#C10 get a0() → ffi::Array<ffi::Array<ffi::Array<ffi::Uint8>>> - 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, #C12); - @#C11 + 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}, #C11, #C14); + @#C13 + @#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.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #externalFieldValue.{ffi::_Compound::_offsetInBytes}{core::int}, #C13.{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}, #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int}); + @#C10 static get a0#offsetOf() → core::int return #C17.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C15 + @#C10 static get #sizeOf() → core::int - return #C13.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; + return #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } static method main() → dynamic { final ffi::Pointer<self::StructInlineArrayMultiDimensional> pointer = #C18.{ffi::Allocator::allocate}<self::StructInlineArrayMultiDimensional>(self::StructInlineArrayMultiDimensional::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::StructInlineArrayMultiDimensional>}; @@ -65,13 +68,13 @@ #C6 = null #C7 = ffi::_FfiStructLayout {fieldTypes:#C5, packing:#C6} #C8 = core::pragma {name:#C1, options:#C7} - #C9 = 2 - #C10 = false - #C11 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C9, dimension2:#C9, dimension3:#C9, dimension4:#C6, dimension5:#C6, dimensions:#C6, variableLength:#C10} - #C12 = <core::int>[#C9, #C9] - #C13 = <core::int>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3] - #C14 = "vm:prefer-inline" - #C15 = core::pragma {name:#C14, options:#C6} + #C9 = "vm:prefer-inline" + #C10 = core::pragma {name:#C9, options:#C6} + #C11 = 2 + #C12 = false + #C13 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C11, dimension2:#C11, dimension3:#C11, dimension4:#C6, dimension5:#C6, dimensions:#C6, variableLength:#C12} + #C14 = <core::int>[#C11, #C11] + #C15 = <core::int>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3] #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 = all::CallocAllocator {}
diff --git a/pkg/vm/lib/modular/transformations/ffi/common.dart b/pkg/vm/lib/modular/transformations/ffi/common.dart index f3b3544..674ab59 100644 --- a/pkg/vm/lib/modular/transformations/ffi/common.dart +++ b/pkg/vm/lib/modular/transformations/ffi/common.dart
@@ -1463,7 +1463,8 @@ null; } - void addPragmaPreferInline(Procedure node) { + void addPragmaPreferInline(Member node) { + assert(node is Procedure || node is Constructor); node.addAnnotation( ConstantExpression( InstanceConstant(
diff --git a/pkg/vm/lib/modular/transformations/ffi/definitions.dart b/pkg/vm/lib/modular/transformations/ffi/definitions.dart index bd8edcb..82ca678 100644 --- a/pkg/vm/lib/modular/transformations/ffi/definitions.dart +++ b/pkg/vm/lib/modular/transformations/ffi/definitions.dart
@@ -656,7 +656,7 @@ fileUri: node.fileUri, reference: reference) ..fileOffset = node.fileOffset; - + addPragmaPreferInline(ctor); node.addConstructor(ctor); } } @@ -815,6 +815,7 @@ offsetGetter, ); getter.isExternal = false; + addPragmaPreferInline(getter); } if (setter != null) { @@ -827,6 +828,7 @@ offsetGetter, ); setter.isExternal = false; + addPragmaPreferInline(setter); } i++; @@ -1046,6 +1048,7 @@ ) ..fileOffset = field.fileOffset ..annotations = field.annotations; + addPragmaPreferInline(getter); node.addProcedure(getter); if (!field.isFinal) { @@ -1080,6 +1083,7 @@ fileUri: field.fileUri, reference: setterReference, )..fileOffset = field.fileOffset; + addPragmaPreferInline(setter); node.addProcedure(setter); }
diff --git a/pkg/vm/testcases/transformations/ffi/abi_specific_int.dart.aot.expect b/pkg/vm/testcases/transformations/ffi/abi_specific_int.dart.aot.expect index f1cad3b..930f415 100644 --- a/pkg/vm/testcases/transformations/ffi/abi_specific_int.dart.aot.expect +++ b/pkg/vm/testcases/transformations/ffi/abi_specific_int.dart.aot.expect
@@ -24,11 +24,13 @@ [@vm.inferred-return-type.metadata=int] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=()->i] + @#C10 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.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] + @#C10 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.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); @@ -52,6 +54,7 @@ [@vm.inferred-return-type.metadata=dart.ffi::Array<#lib::WChar>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:3] + @#C10 get a0() → ffi::Array<self::WChar> 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);
diff --git a/pkg/vm/testcases/transformations/ffi/abi_specific_int.dart.expect b/pkg/vm/testcases/transformations/ffi/abi_specific_int.dart.expect index 9e95423..b4d92ca 100644 --- a/pkg/vm/testcases/transformations/ffi/abi_specific_int.dart.expect +++ b/pkg/vm/testcases/transformations/ffi/abi_specific_int.dart.expect
@@ -24,19 +24,24 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::WCharStruct : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C67 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::WCharStruct : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) ; @#C74 + @#C67 get a0() → core::int 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 + @#C67 set a0(synthesized core::int #externalFieldValue) → void 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 + @#C67 get a1() → core::int 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 + @#C67 set a1(synthesized core::int #externalFieldValue) → void 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 @@ -57,13 +62,16 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::WCharArrayStruct : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C67 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::WCharArrayStruct : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) ; @#C84 + @#C67 get a0() → ffi::Array<self::WChar> 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, #C85); @#C84 + @#C67 set a0(synthesized ffi::Array<self::WChar> #externalFieldValue) → void 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}, #C88.{core::List::[]}(ffi::_abi()){(core::int) → core::int}); @#C67
diff --git a/pkg/vm/testcases/transformations/ffi/abi_specific_int_incomplete.dart.aot.expect b/pkg/vm/testcases/transformations/ffi/abi_specific_int_incomplete.dart.aot.expect index c6dc770..30589ce 100644 --- a/pkg/vm/testcases/transformations/ffi/abi_specific_int_incomplete.dart.aot.expect +++ b/pkg/vm/testcases/transformations/ffi/abi_specific_int_incomplete.dart.aot.expect
@@ -24,11 +24,13 @@ [@vm.inferred-return-type.metadata=int] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=()->i] + @#C8 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.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] + @#C8 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.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); @@ -52,6 +54,7 @@ [@vm.inferred-return-type.metadata=dart.ffi::Array<#lib::Incomplete>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:3] + @#C8 get a0() → ffi::Array<self::Incomplete> 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);
diff --git a/pkg/vm/testcases/transformations/ffi/abi_specific_int_incomplete.dart.expect b/pkg/vm/testcases/transformations/ffi/abi_specific_int_incomplete.dart.expect index 71844b5..24d0ae0 100644 --- a/pkg/vm/testcases/transformations/ffi/abi_specific_int_incomplete.dart.expect +++ b/pkg/vm/testcases/transformations/ffi/abi_specific_int_incomplete.dart.expect
@@ -24,19 +24,24 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::IncompleteStruct : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C29 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::IncompleteStruct : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) ; @#C37 + @#C29 get a0() → core::int 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 + @#C29 set a0(synthesized core::int #externalFieldValue) → void 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 + @#C29 get a1() → core::int 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 + @#C29 set a1(synthesized core::int #externalFieldValue) → void 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 @@ -57,13 +62,16 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::IncompleteArrayStruct : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C29 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::IncompleteArrayStruct : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) ; @#C47 + @#C29 get a0() → ffi::Array<self::Incomplete> 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, #C48); @#C47 + @#C29 set a0(synthesized ffi::Array<self::Incomplete> #externalFieldValue) → void 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>(#C50.{core::List::[]}(ffi::_abi()){(core::int) → core::int?})); @#C29
diff --git a/pkg/vm/testcases/transformations/ffi/address_of_cast_compound_element.dart.aot.expect b/pkg/vm/testcases/transformations/ffi/address_of_cast_compound_element.dart.aot.expect index fbfdb57..bcb23c7d 100644 --- a/pkg/vm/testcases/transformations/ffi/address_of_cast_compound_element.dart.aot.expect +++ b/pkg/vm/testcases/transformations/ffi/address_of_cast_compound_element.dart.aot.expect
@@ -14,41 +14,43 @@ [@vm.inferred-return-type.metadata=dart.ffi::Array<dart.ffi::Int8>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1] + @#C12 get array() → ffi::Array<ffi::Int8> - return new ffi::Array::_<ffi::Int8>([@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: 2)] self::MyStruct::array#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}, #C3, #C11); + return new ffi::Array::_<ffi::Int8>([@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: 2)] self::MyStruct::array#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}, #C3, #C13); [@vm.inferred-return-type.metadata=dart.ffi::Array<dart.ffi::UnsignedLong>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:2] + @#C12 get array2() → ffi::Array<ffi::UnsignedLong> - return new ffi::Array::_<ffi::UnsignedLong>([@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] self::MyStruct::array2#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}, #C3, #C11); + return new ffi::Array::_<ffi::UnsignedLong>([@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] self::MyStruct::array2#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}, #C3, #C13); [@vm.inferred-return-type.metadata=dart.core::_Smi (value: 0)] [@vm.unboxing-info.metadata=()->i] - @#C13 + @#C12 static get a#offsetOf() → core::int return #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; [@vm.inferred-return-type.metadata=dart.core::_Smi (value: 1)] [@vm.unboxing-info.metadata=()->i] - @#C13 + @#C12 static get b#offsetOf() → core::int return #C17.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; [@vm.inferred-return-type.metadata=dart.core::_Smi (value: 2)] [@vm.unboxing-info.metadata=()->i] - @#C13 + @#C12 static get array#offsetOf() → core::int return #C19.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; [@vm.inferred-return-type.metadata=dart.core::_Smi] [@vm.unboxing-info.metadata=()->i] - @#C13 + @#C12 static get array2#offsetOf() → core::int return #C22.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; [@vm.inferred-return-type.metadata=dart.core::_Smi] [@vm.unboxing-info.metadata=()->i] - @#C13 + @#C12 static get #sizeOf() → core::int return #C25.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -60,7 +62,7 @@ [@vm.inferred-return-type.metadata=dart.core::_Smi (value: 1)] [@vm.unboxing-info.metadata=()->i] - @#C13 + @#C12 static get #sizeOf() → core::int return #C17.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -100,9 +102,9 @@ #C8 = null #C9 = ffi::_FfiStructLayout {fieldTypes:#C7, packing:#C8} #C10 = core::pragma {name:#C1, options:#C9} - #C11 = <core::int>[] - #C12 = "vm:prefer-inline" - #C13 = core::pragma {name:#C12, options:#C8} + #C11 = "vm:prefer-inline" + #C12 = core::pragma {name:#C11, options:#C8} + #C13 = <core::int>[] #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] #C16 = 1
diff --git a/pkg/vm/testcases/transformations/ffi/address_of_cast_compound_element.dart.expect b/pkg/vm/testcases/transformations/ffi/address_of_cast_compound_element.dart.expect index 13d549f..b0edfe9 100644 --- a/pkg/vm/testcases/transformations/ffi/address_of_cast_compound_element.dart.expect +++ b/pkg/vm/testcases/transformations/ffi/address_of_cast_compound_element.dart.expect
@@ -14,46 +14,55 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::MyStruct : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C12 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::MyStruct : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) ; - @#C11 + @#C13 + @#C12 get a() → core::int return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}); - @#C11 + @#C13 + @#C12 set a(synthesized core::int #externalFieldValue) → void return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue); - @#C11 + @#C13 + @#C12 get b() → core::int return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::b#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}); - @#C11 + @#C13 + @#C12 set b(synthesized core::int #externalFieldValue) → void return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::b#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue); - @#C13 + @#C15 + @#C12 get array() → ffi::Array<ffi::Int8> - return new ffi::Array::_<ffi::Int8>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C3, #C14); - @#C13 + return new ffi::Array::_<ffi::Int8>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C3, #C16); + @#C15 + @#C12 set array(synthesized ffi::Array<ffi::Int8> #externalFieldValue) → void - return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array#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}); - @#C13 + return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array#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}, #C17.{core::List::[]}(ffi::_abi()){(core::int) → core::int}); + @#C15 + @#C12 get array2() → ffi::Array<ffi::UnsignedLong> - return new ffi::Array::_<ffi::UnsignedLong>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array2#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C3, #C14); - @#C13 + return new ffi::Array::_<ffi::UnsignedLong>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array2#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C3, #C16); + @#C15 + @#C12 set array2(synthesized ffi::Array<ffi::UnsignedLong> #externalFieldValue) → void - return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array2#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}, #C18.{core::List::[]}(ffi::_abi()){(core::int) → core::int}); - @#C20 + return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array2#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}, #C20.{core::List::[]}(ffi::_abi()){(core::int) → core::int}); + @#C12 static get a#offsetOf() → core::int return #C22.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C20 + @#C12 static get b#offsetOf() → core::int return #C24.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C20 + @#C12 static get array#offsetOf() → core::int return #C26.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C20 + @#C12 static get array2#offsetOf() → core::int return #C29.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C20 + @#C12 static get #sizeOf() → core::int return #C32.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -65,28 +74,33 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::MyUnion : super ffi::Union::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C12 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::MyUnion : super ffi::Union::_fromTypedData(#typedData, #offset, #sizeInBytes) ; - @#C11 + @#C13 + @#C12 get a() → core::int return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}); - @#C11 + @#C13 + @#C12 set a(synthesized core::int #externalFieldValue) → void return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue); - @#C11 + @#C13 + @#C12 get b() → core::int return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::b#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}); - @#C11 + @#C13 + @#C12 set b(synthesized core::int #externalFieldValue) → void return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::b#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue); - @#C20 + @#C12 static get a#offsetOf() → core::int return #C22.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C20 + @#C12 static get b#offsetOf() → core::int return #C22.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C20 + @#C12 static get #sizeOf() → core::int return #C24.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -127,16 +141,16 @@ #C8 = null #C9 = ffi::_FfiStructLayout {fieldTypes:#C7, packing:#C8} #C10 = core::pragma {name:#C1, options:#C9} - #C11 = ffi::Int8 {} - #C12 = false - #C13 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C3, dimension2:#C8, dimension3:#C8, dimension4:#C8, dimension5:#C8, dimensions:#C8, variableLength:#C12} - #C14 = <core::int>[] - #C15 = <core::int>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3] - #C16 = 40 - #C17 = 80 - #C18 = <core::int>[#C16, #C17, #C16, #C17, #C17, #C17, #C17, #C17, #C16, #C17, #C17, #C16, #C17, #C16, #C17, #C16, #C17, #C17, #C17, #C16, #C16, #C16] - #C19 = "vm:prefer-inline" - #C20 = core::pragma {name:#C19, options:#C8} + #C11 = "vm:prefer-inline" + #C12 = core::pragma {name:#C11, options:#C8} + #C13 = ffi::Int8 {} + #C14 = false + #C15 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C3, dimension2:#C8, dimension3:#C8, dimension4:#C8, dimension5:#C8, dimensions:#C8, variableLength:#C14} + #C16 = <core::int>[] + #C17 = <core::int>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3] + #C18 = 40 + #C19 = 80 + #C20 = <core::int>[#C18, #C19, #C18, #C19, #C19, #C19, #C19, #C19, #C18, #C19, #C19, #C18, #C19, #C18, #C19, #C18, #C19, #C19, #C19, #C18, #C18, #C18] #C21 = 0 #C22 = <core::int>[#C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21] #C23 = 1
diff --git a/pkg/vm/testcases/transformations/ffi/address_of_struct.dart.aot.expect b/pkg/vm/testcases/transformations/ffi/address_of_struct.dart.aot.expect index a03ec31..aed711d 100644 --- a/pkg/vm/testcases/transformations/ffi/address_of_struct.dart.aot.expect +++ b/pkg/vm/testcases/transformations/ffi/address_of_struct.dart.aot.expect
@@ -14,18 +14,19 @@ [@vm.inferred-return-type.metadata=dart.ffi::Array<dart.ffi::Int8>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1] + @#C10 get a() → ffi::Array<ffi::Int8> - return new ffi::Array::_<ffi::Int8>([@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::MyStruct::a#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}, #C3, #C9); + return new ffi::Array::_<ffi::Int8>([@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::MyStruct::a#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}, #C3, #C11); [@vm.inferred-return-type.metadata=dart.core::_Smi (value: 0)] [@vm.unboxing-info.metadata=()->i] - @#C11 + @#C10 static get a#offsetOf() → core::int return #C13.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; [@vm.inferred-return-type.metadata=dart.core::_Smi (value: 10)] [@vm.unboxing-info.metadata=()->i] - @#C11 + @#C10 static get #sizeOf() → core::int return #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -37,7 +38,7 @@ [@vm.inferred-return-type.metadata=dart.core::_Smi (value: 1)] [@vm.unboxing-info.metadata=()->i] - @#C11 + @#C10 static get #sizeOf() → core::int return #C19.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -68,9 +69,9 @@ #C6 = null #C7 = ffi::_FfiStructLayout {fieldTypes:#C5, packing:#C6} #C8 = core::pragma {name:#C1, options:#C7} - #C9 = <core::int>[] - #C10 = "vm:prefer-inline" - #C11 = core::pragma {name:#C10, options:#C6} + #C9 = "vm:prefer-inline" + #C10 = core::pragma {name:#C9, options:#C6} + #C11 = <core::int>[] #C12 = 0 #C13 = <core::int>[#C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12] #C14 = <core::int>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3]
diff --git a/pkg/vm/testcases/transformations/ffi/address_of_struct.dart.expect b/pkg/vm/testcases/transformations/ffi/address_of_struct.dart.expect index 0edadd2..a9d69ca 100644 --- a/pkg/vm/testcases/transformations/ffi/address_of_struct.dart.expect +++ b/pkg/vm/testcases/transformations/ffi/address_of_struct.dart.expect
@@ -14,21 +14,24 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::MyStruct : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C10 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::MyStruct : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) ; + @#C12 @#C10 get a() → ffi::Array<ffi::Int8> - return new ffi::Array::_<ffi::Int8>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C3, #C11); + return new ffi::Array::_<ffi::Int8>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C3, #C13); + @#C12 @#C10 set a(synthesized ffi::Array<ffi::Int8> #externalFieldValue) → void - return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::a#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 + return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::a#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}, #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int}); + @#C10 static get a#offsetOf() → core::int return #C16.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C14 + @#C10 static get #sizeOf() → core::int - return #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; + return #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @#C19 final class MyUnion extends ffi::Union { @@ -38,19 +41,22 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::MyUnion : super ffi::Union::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C10 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::MyUnion : super ffi::Union::_fromTypedData(#typedData, #offset, #sizeInBytes) ; @#C20 + @#C10 get a() → core::int return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}); @#C20 + @#C10 set a(synthesized core::int #externalFieldValue) → void return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue); - @#C14 + @#C10 static get a#offsetOf() → core::int return #C16.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C14 + @#C10 static get #sizeOf() → core::int return #C22.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -88,12 +94,12 @@ #C6 = null #C7 = ffi::_FfiStructLayout {fieldTypes:#C5, packing:#C6} #C8 = core::pragma {name:#C1, options:#C7} - #C9 = false - #C10 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C3, dimension2:#C6, dimension3:#C6, dimension4:#C6, dimension5:#C6, dimensions:#C6, variableLength:#C9} - #C11 = <core::int>[] - #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} + #C9 = "vm:prefer-inline" + #C10 = core::pragma {name:#C9, options:#C6} + #C11 = false + #C12 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C3, dimension2:#C6, dimension3:#C6, dimension4:#C6, dimension5:#C6, dimensions:#C6, variableLength:#C11} + #C13 = <core::int>[] + #C14 = <core::int>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3] #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 = <core::Type>[#C2]
diff --git a/pkg/vm/testcases/transformations/ffi/address_of_struct_element.dart.aot.expect b/pkg/vm/testcases/transformations/ffi/address_of_struct_element.dart.aot.expect index 6eaafb9..94a5fac 100644 --- a/pkg/vm/testcases/transformations/ffi/address_of_struct_element.dart.aot.expect +++ b/pkg/vm/testcases/transformations/ffi/address_of_struct_element.dart.aot.expect
@@ -14,41 +14,43 @@ [@vm.inferred-return-type.metadata=dart.ffi::Array<dart.ffi::Int8>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1] + @#C12 get array() → ffi::Array<ffi::Int8> - return new ffi::Array::_<ffi::Int8>([@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: 2)] self::MyStruct::array#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}, #C3, #C11); + return new ffi::Array::_<ffi::Int8>([@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: 2)] self::MyStruct::array#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}, #C3, #C13); [@vm.inferred-return-type.metadata=dart.ffi::Array<dart.ffi::UnsignedLong>] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:2] + @#C12 get array2() → ffi::Array<ffi::UnsignedLong> - return new ffi::Array::_<ffi::UnsignedLong>([@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] self::MyStruct::array2#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}, #C3, #C11); + return new ffi::Array::_<ffi::UnsignedLong>([@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] self::MyStruct::array2#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}, #C3, #C13); [@vm.inferred-return-type.metadata=dart.core::_Smi (value: 0)] [@vm.unboxing-info.metadata=()->i] - @#C13 + @#C12 static get a#offsetOf() → core::int return #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; [@vm.inferred-return-type.metadata=dart.core::_Smi (value: 1)] [@vm.unboxing-info.metadata=()->i] - @#C13 + @#C12 static get b#offsetOf() → core::int return #C17.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; [@vm.inferred-return-type.metadata=dart.core::_Smi (value: 2)] [@vm.unboxing-info.metadata=()->i] - @#C13 + @#C12 static get array#offsetOf() → core::int return #C19.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; [@vm.inferred-return-type.metadata=dart.core::_Smi] [@vm.unboxing-info.metadata=()->i] - @#C13 + @#C12 static get array2#offsetOf() → core::int return #C22.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; [@vm.inferred-return-type.metadata=dart.core::_Smi] [@vm.unboxing-info.metadata=()->i] - @#C13 + @#C12 static get #sizeOf() → core::int return #C25.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -60,7 +62,7 @@ [@vm.inferred-return-type.metadata=dart.core::_Smi (value: 1)] [@vm.unboxing-info.metadata=()->i] - @#C13 + @#C12 static get #sizeOf() → core::int return #C17.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -100,9 +102,9 @@ #C8 = null #C9 = ffi::_FfiStructLayout {fieldTypes:#C7, packing:#C8} #C10 = core::pragma {name:#C1, options:#C9} - #C11 = <core::int>[] - #C12 = "vm:prefer-inline" - #C13 = core::pragma {name:#C12, options:#C8} + #C11 = "vm:prefer-inline" + #C12 = core::pragma {name:#C11, options:#C8} + #C13 = <core::int>[] #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] #C16 = 1
diff --git a/pkg/vm/testcases/transformations/ffi/address_of_struct_element.dart.expect b/pkg/vm/testcases/transformations/ffi/address_of_struct_element.dart.expect index a00e4cd..a298e7f 100644 --- a/pkg/vm/testcases/transformations/ffi/address_of_struct_element.dart.expect +++ b/pkg/vm/testcases/transformations/ffi/address_of_struct_element.dart.expect
@@ -14,46 +14,55 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::MyStruct : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C12 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::MyStruct : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) ; - @#C11 + @#C13 + @#C12 get a() → core::int return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}); - @#C11 + @#C13 + @#C12 set a(synthesized core::int #externalFieldValue) → void return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue); - @#C11 + @#C13 + @#C12 get b() → core::int return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::b#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}); - @#C11 + @#C13 + @#C12 set b(synthesized core::int #externalFieldValue) → void return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::b#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue); - @#C13 + @#C15 + @#C12 get array() → ffi::Array<ffi::Int8> - return new ffi::Array::_<ffi::Int8>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C3, #C14); - @#C13 + return new ffi::Array::_<ffi::Int8>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C3, #C16); + @#C15 + @#C12 set array(synthesized ffi::Array<ffi::Int8> #externalFieldValue) → void - return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array#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}); - @#C13 + return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array#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}, #C17.{core::List::[]}(ffi::_abi()){(core::int) → core::int}); + @#C15 + @#C12 get array2() → ffi::Array<ffi::UnsignedLong> - return new ffi::Array::_<ffi::UnsignedLong>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array2#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C3, #C14); - @#C13 + return new ffi::Array::_<ffi::UnsignedLong>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array2#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C3, #C16); + @#C15 + @#C12 set array2(synthesized ffi::Array<ffi::UnsignedLong> #externalFieldValue) → void - return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array2#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}, #C18.{core::List::[]}(ffi::_abi()){(core::int) → core::int}); - @#C20 + return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array2#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}, #C20.{core::List::[]}(ffi::_abi()){(core::int) → core::int}); + @#C12 static get a#offsetOf() → core::int return #C22.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C20 + @#C12 static get b#offsetOf() → core::int return #C24.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C20 + @#C12 static get array#offsetOf() → core::int return #C26.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C20 + @#C12 static get array2#offsetOf() → core::int return #C29.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C20 + @#C12 static get #sizeOf() → core::int return #C32.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -65,28 +74,33 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::MyUnion : super ffi::Union::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C12 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::MyUnion : super ffi::Union::_fromTypedData(#typedData, #offset, #sizeInBytes) ; - @#C11 + @#C13 + @#C12 get a() → core::int return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}); - @#C11 + @#C13 + @#C12 set a(synthesized core::int #externalFieldValue) → void return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue); - @#C11 + @#C13 + @#C12 get b() → core::int return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::b#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}); - @#C11 + @#C13 + @#C12 set b(synthesized core::int #externalFieldValue) → void return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::b#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue); - @#C20 + @#C12 static get a#offsetOf() → core::int return #C22.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C20 + @#C12 static get b#offsetOf() → core::int return #C22.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C20 + @#C12 static get #sizeOf() → core::int return #C24.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -127,16 +141,16 @@ #C8 = null #C9 = ffi::_FfiStructLayout {fieldTypes:#C7, packing:#C8} #C10 = core::pragma {name:#C1, options:#C9} - #C11 = ffi::Int8 {} - #C12 = false - #C13 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C3, dimension2:#C8, dimension3:#C8, dimension4:#C8, dimension5:#C8, dimensions:#C8, variableLength:#C12} - #C14 = <core::int>[] - #C15 = <core::int>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3] - #C16 = 40 - #C17 = 80 - #C18 = <core::int>[#C16, #C17, #C16, #C17, #C17, #C17, #C17, #C17, #C16, #C17, #C17, #C16, #C17, #C16, #C17, #C16, #C17, #C17, #C17, #C16, #C16, #C16] - #C19 = "vm:prefer-inline" - #C20 = core::pragma {name:#C19, options:#C8} + #C11 = "vm:prefer-inline" + #C12 = core::pragma {name:#C11, options:#C8} + #C13 = ffi::Int8 {} + #C14 = false + #C15 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C3, dimension2:#C8, dimension3:#C8, dimension4:#C8, dimension5:#C8, dimensions:#C8, variableLength:#C14} + #C16 = <core::int>[] + #C17 = <core::int>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3] + #C18 = 40 + #C19 = 80 + #C20 = <core::int>[#C18, #C19, #C18, #C19, #C19, #C19, #C19, #C19, #C18, #C19, #C19, #C18, #C19, #C18, #C19, #C18, #C19, #C19, #C19, #C18, #C18, #C18] #C21 = 0 #C22 = <core::int>[#C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21] #C23 = 1
diff --git a/pkg/vm/testcases/transformations/ffi/compound_copies.dart.expect b/pkg/vm/testcases/transformations/ffi/compound_copies.dart.expect index 50b2dc4..a362c94 100644 --- a/pkg/vm/testcases/transformations/ffi/compound_copies.dart.expect +++ b/pkg/vm/testcases/transformations/ffi/compound_copies.dart.expect
@@ -14,33 +14,38 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Coordinate : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Coordinate : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) ; - @#C7 + @#C9 + @#C8 get x() → core::int 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 + @#C9 + @#C8 set x(synthesized core::int #externalFieldValue) → void 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 + @#C9 + @#C8 get y() → core::int 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 + @#C9 + @#C8 set y(synthesized core::int #externalFieldValue) → void 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 { 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); + } =>ffi::_memCopy(ptr, #C10, #source.{ffi::_Compound::_typedDataBase}{core::Object}, #source.{ffi::_Compound::_offsetInBytes}{core::int}, self::Coordinate::#sizeOf); } - @#C10 + @#C8 static get x#offsetOf() → core::int return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C10 + @#C8 static get y#offsetOf() → core::int return #C13.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C10 + @#C8 static get #sizeOf() → core::int return #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -52,17 +57,22 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::SomeUnion : super ffi::Union::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::SomeUnion : super ffi::Union::_fromTypedData(#typedData, #offset, #sizeInBytes) ; + @#C8 get coordinate() → self::Coordinate 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}); + @#C8 set coordinate(synthesized self::Coordinate #externalFieldValue) → void 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 + @#C9 + @#C8 get id() → core::int 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 + @#C9 + @#C8 set id(synthesized core::int #externalFieldValue) → void 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 { @@ -70,13 +80,13 @@ 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 + @#C8 static get coordinate#offsetOf() → core::int return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C10 + @#C8 static get id#offsetOf() → core::int return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C10 + @#C8 static get #sizeOf() → core::int return #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -88,11 +98,11 @@ #C4 = null #C5 = ffi::_FfiStructLayout {fieldTypes:#C3, packing:#C4} #C6 = core::pragma {name:#C1, options:#C5} - #C7 = ffi::Int64 {} - #C8 = 0 - #C9 = "vm:prefer-inline" - #C10 = core::pragma {name:#C9, options:#C4} - #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] + #C7 = "vm:prefer-inline" + #C8 = core::pragma {name:#C7, options:#C4} + #C9 = ffi::Int64 {} + #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] #C12 = 8 #C13 = <core::int>[#C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12] #C14 = 16
diff --git a/pkg/vm/testcases/transformations/ffi/ffinative_compound_return.dart.aot.expect b/pkg/vm/testcases/transformations/ffi/ffinative_compound_return.dart.aot.expect index 813f3c5..7485c2b 100644 --- a/pkg/vm/testcases/transformations/ffi/ffinative_compound_return.dart.aot.expect +++ b/pkg/vm/testcases/transformations/ffi/ffinative_compound_return.dart.aot.expect
@@ -16,6 +16,7 @@ [@vm.inferred-return-type.metadata=int] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1] [@vm.unboxing-info.metadata=()->i] + @#C8 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.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});
diff --git a/pkg/vm/testcases/transformations/ffi/ffinative_compound_return.dart.expect b/pkg/vm/testcases/transformations/ffi/ffinative_compound_return.dart.expect index 4208338..bca523a 100644 --- a/pkg/vm/testcases/transformations/ffi/ffinative_compound_return.dart.expect +++ b/pkg/vm/testcases/transformations/ffi/ffinative_compound_return.dart.expect
@@ -15,21 +15,24 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Struct1ByteInt : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Struct1ByteInt : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) ; - @#C7 + @#C9 + @#C8 get a0() → core::int 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 + @#C9 + @#C8 set a0(synthesized core::int #externalFieldValue) → void 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 + @#C8 static get a0#offsetOf() → core::int return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C9 + @#C8 static get #sizeOf() → core::int return #C13.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -39,7 +42,7 @@ ffi::Native::_addressOf<ffi::NativeFunction<(ffi::Int8) → self::Struct1ByteInt>>(#C17); } @#C19 -@#C9 +@#C8 static method returnStruct1ByteIntNative(core::int a0) → self::Struct1ByteInt return block { _in::_nativeEffect(new self::Struct1ByteInt::#fromTypedDataBase(typ::Uint8List::•(#C12), #C10)); @@ -53,9 +56,9 @@ #C4 = null #C5 = ffi::_FfiStructLayout {fieldTypes:#C3, packing:#C4} #C6 = core::pragma {name:#C1, options:#C5} - #C7 = ffi::Int8 {} - #C8 = "vm:prefer-inline" - #C9 = core::pragma {name:#C8, options:#C4} + #C7 = "vm:prefer-inline" + #C8 = core::pragma {name:#C7, options:#C4} + #C9 = ffi::Int8 {} #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] #C12 = 1
diff --git a/pkg/vm/testcases/transformations/ffi/native_fields.dart.aot.expect b/pkg/vm/testcases/transformations/ffi/native_fields.dart.aot.expect index ab1ea31..61db693 100644 --- a/pkg/vm/testcases/transformations/ffi/native_fields.dart.aot.expect +++ b/pkg/vm/testcases/transformations/ffi/native_fields.dart.aot.expect
@@ -15,12 +15,14 @@ [@vm.inferred-return-type.metadata=dart.core::_Double] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1] [@vm.unboxing-info.metadata=()->d] + @#C8 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.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.inferred-return-type.metadata=dart.core::_Double] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:2] [@vm.unboxing-info.metadata=()->d] + @#C8 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.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}); @@ -43,6 +45,7 @@ ; [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3] + @#C8 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.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);
diff --git a/pkg/vm/testcases/transformations/ffi/native_fields.dart.expect b/pkg/vm/testcases/transformations/ffi/native_fields.dart.expect index 01e14ae..986069d 100644 --- a/pkg/vm/testcases/transformations/ffi/native_fields.dart.expect +++ b/pkg/vm/testcases/transformations/ffi/native_fields.dart.expect
@@ -14,28 +14,33 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Vec2d : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Vec2d : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) ; - @#C7 + @#C9 + @#C8 get x() → core::double 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 + @#C9 + @#C8 set x(synthesized core::double #externalFieldValue) → void 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 + @#C9 + @#C8 get y() → core::double 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 + @#C9 + @#C8 set y(synthesized core::double #externalFieldValue) → void 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 + @#C8 static get x#offsetOf() → core::int return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C9 + @#C8 static get y#offsetOf() → core::int return #C13.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C9 + @#C8 static get #sizeOf() → core::int return #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -47,24 +52,29 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::MyUnion : super ffi::Union::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::MyUnion : super ffi::Union::_fromTypedData(#typedData, #offset, #sizeInBytes) ; + @#C8 get vector() → self::Vec2d 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}); + @#C8 set vector(synthesized self::Vec2d #externalFieldValue) → void 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}); + @#C8 get indirectVector() → ffi::Pointer<self::Vec2d> 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}); + @#C8 set indirectVector(synthesized ffi::Pointer<self::Vec2d> #externalFieldValue) → void 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 + @#C8 static get vector#offsetOf() → core::int return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C9 + @#C8 static get indirectVector#offsetOf() → core::int return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C9 + @#C8 static get #sizeOf() → core::int return #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -149,9 +159,9 @@ #C4 = null #C5 = ffi::_FfiStructLayout {fieldTypes:#C3, packing:#C4} #C6 = core::pragma {name:#C1, options:#C5} - #C7 = ffi::Double {} - #C8 = "vm:prefer-inline" - #C9 = core::pragma {name:#C8, options:#C4} + #C7 = "vm:prefer-inline" + #C8 = core::pragma {name:#C7, options:#C4} + #C9 = ffi::Double {} #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] #C12 = 8
diff --git a/pkg/vm/testcases/transformations/ffi/struct_typed_data.dart.aot.expect b/pkg/vm/testcases/transformations/ffi/struct_typed_data.dart.aot.expect index 198e906..c01d0e2 100644 --- a/pkg/vm/testcases/transformations/ffi/struct_typed_data.dart.aot.expect +++ b/pkg/vm/testcases/transformations/ffi/struct_typed_data.dart.aot.expect
@@ -14,6 +14,7 @@ constructor #fromTypedDataBase([@vm.inferred-arg-type.metadata=dart.typed_data::_Uint8List] synthesized core::Object #typedDataBase) → self::Coordinate : super ffi::Struct::_fromTypedDataBase(#typedDataBase) ; + @#C8 constructor #fromTypedData([@vm.inferred-arg-type.metadata=dart.typed_data::_Float64List] synthesized typ::TypedData #typedData) → self::Coordinate : super ffi::Struct::_fromTypedData(#typedData) ; @@ -36,22 +37,26 @@ [@vm.inferred-return-type.metadata=dart.core::_Double] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=()->d] + @#C8 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.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] + @#C8 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.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.inferred-return-type.metadata=dart.core::_Double] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4] [@vm.unboxing-info.metadata=()->d] + @#C8 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.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] + @#C8 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.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);
diff --git a/pkg/vm/testcases/transformations/ffi/struct_typed_data.dart.expect b/pkg/vm/testcases/transformations/ffi/struct_typed_data.dart.expect index 6e139fe..eeb5ed3 100644 --- a/pkg/vm/testcases/transformations/ffi/struct_typed_data.dart.expect +++ b/pkg/vm/testcases/transformations/ffi/struct_typed_data.dart.expect
@@ -14,11 +14,12 @@ constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Coordinate : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) ; + @#C8 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), #C7); + final self::Coordinate result = new self::Coordinate::#fromTypedDataBase(typ::Uint8List::•(self::Coordinate::#sizeOf), #C9); if(!(x == null)) result.{self::Coordinate::x} = x{core::double}; if(!(y == null)) @@ -26,27 +27,31 @@ return result; } static factory fromTypedList(typ::TypedData typedList) → self::Coordinate { - return new self::Coordinate::#fromTypedData(typedList, #C7, self::Coordinate::#sizeOf); + return new self::Coordinate::#fromTypedData(typedList, #C9, self::Coordinate::#sizeOf); } + @#C10 @#C8 get x() → core::double 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}); + @#C10 @#C8 set x(synthesized core::double #externalFieldValue) → void 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); + @#C10 @#C8 get y() → core::double 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}); + @#C10 @#C8 set y(synthesized core::double #externalFieldValue) → void 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 + @#C8 static get x#offsetOf() → core::int return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C10 + @#C8 static get y#offsetOf() → core::int return #C13.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; - @#C10 + @#C8 static get #sizeOf() → core::int return #C15.{core::List::[]}(ffi::_abi()){(core::int) → core::int}; } @@ -80,11 +85,11 @@ #C4 = null #C5 = ffi::_FfiStructLayout {fieldTypes:#C3, packing:#C4} #C6 = core::pragma {name:#C1, options:#C5} - #C7 = 0 - #C8 = ffi::Double {} - #C9 = "vm:prefer-inline" - #C10 = core::pragma {name:#C9, options:#C4} - #C11 = <core::int>[#C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7] + #C7 = "vm:prefer-inline" + #C8 = core::pragma {name:#C7, options:#C4} + #C9 = 0 + #C10 = ffi::Double {} + #C11 = <core::int>[#C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9] #C12 = 8 #C13 = <core::int>[#C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12, #C12] #C14 = 16
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect index a18de7d..64307ca 100644 --- a/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect +++ b/pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart.expect
@@ -42,6 +42,7 @@ [@vm.inferred-return-type.metadata=#lib::Struct12] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:1] + @#C13 get nested() → self::Struct12 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});
diff --git a/runtime/tests/vm/dart/ffi_structs_optimizations_il_test.dart b/runtime/tests/vm/dart/ffi_structs_optimizations_il_test.dart new file mode 100644 index 0000000..9af9add --- /dev/null +++ b/runtime/tests/vm/dart/ffi_structs_optimizations_il_test.dart
@@ -0,0 +1,173 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Verifies that dart:ffi Struct is erased whenever possible and all +// of accessors are inlined. + +import 'dart:ffi'; +import 'dart:typed_data'; +import 'package:ffi/ffi.dart'; + +import 'package:vm/testing/il_matchers.dart'; + +final class S extends Struct { + @Array<Uint8>(8) + external Array<Uint8> magic; + + @Int64() + external int f; + + @Int64() + external int g; + + external InnerS inner; +} + +final class InnerS extends Struct { + @Int64() + external int x; + + @Int64() + external int y; +} + +@pragma('vm:never-inline') +@pragma('vm:testing:print-flow-graph') +void testAccessors1(S a, S b) { + for (var i = 0; i < 8; i++) { + a.magic[i] = b.magic[i]; + } + a.f = b.inner.x; + a.g = b.inner.y; +} + +@pragma('vm:never-inline') +@pragma('vm:testing:print-flow-graph') +void testAccessors2(Pointer<S> arrA, Pointer<S> arrB, int n) { + for (var j = 0; j < n; j++) { + final a = arrA[j]; + final b = arrB[j]; + for (var i = 0; i < 8; i++) { + a.magic[i] = b.magic[i]; + } + a.f = b.inner.x; + a.g = b.inner.y; + } +} + +@pragma('vm:never-inline') +@pragma('vm:testing:print-flow-graph') +S testCreation() { + return Struct.create<S>(); +} + +@pragma('vm:never-inline') +@pragma('vm:testing:print-flow-graph') +S testCreation2(Uint8List list) { + return Struct.create<S>(list); +} + +@pragma('vm:never-inline') +@pragma('vm:testing:print-flow-graph') +void testCreationAndUse(Uint8List list) { + final s = Struct.create<S>(list); + for (var i = 0; i < 8; i++) { + s.magic[i] = i; + } + s.f = 1; + s.g = 2; + s.inner.x = 3; + s.inner.y = 4; +} + +void main() { + final a = Struct.create<S>(); + final b = Struct.create<S>(); + testAccessors1(a, b); + final arrN = 2; + final arrA = calloc<S>(arrN); + final arrB = calloc<S>(arrN); + testAccessors2(arrA, arrB, arrN); + calloc.free(arrA); + calloc.free(arrB); + testCreation(); + testCreation2(Uint8List(sizeOf<S>())); + testCreationAndUse(Uint8List(sizeOf<S>())); +} + +void _checkNoCallsInGraph(FlowGraph graph) { + for (var block in graph.blocks()) { + for (var instr in block['is']) { + final op = instr['o'] as String; + if (op.endsWith('Call') && instr['d'].first != 'new RangeError.range') { + throw 'Found unexpected call: $instr'; + } + } + } +} + +void _checkNoAllocationInGraph(FlowGraph graph) { + for (var block in graph.blocks()) { + for (var instr in block['is']) { + final op = instr['o'] as String; + if (op == 'AllocateObject') { + if (instr['T']['c'] != 'RangeError') { + throw 'Found unexpected object allocation'; + } + } + } + } +} + +void matchIL$testAccessors1(FlowGraph graph) { + graph.dump(); + _checkNoCallsInGraph(graph); + _checkNoAllocationInGraph(graph); +} + +void matchIL$testAccessors2(FlowGraph graph) { + graph.dump(); + _checkNoCallsInGraph(graph); + _checkNoAllocationInGraph(graph); +} + +void matchIL$testCreation(FlowGraph graph) { + graph.dump(); + _checkNoCallsInGraph(graph); + graph.match([ + match.block('Graph', []), + match.block('Function', [ + 'S' << match.AllocateObject(), + 'td' << match.AllocateTypedData(), + match.StoreField('S', 'td'), + match.DartReturn('S'), + ]), + ]); +} + +void matchIL$testCreation2(FlowGraph graph) { + graph.dump(); + _checkNoCallsInGraph(graph); + graph.match([ + match.block('Graph', []), + match.block('Function', [ + 'td' << match.Parameter(index: 0), + 'S' << match.AllocateObject(), + match.StoreField('S', 'td'), + ]), + match.block('Target', [ + 'error' << match.AllocateObject(), + match.Throw('error'), + ]), + match.block('Target', [ + match.DartReturn('S'), + ]), + ]); +} + +void matchIL$testCreationAndUse(FlowGraph graph) { + graph.dump(); + _checkNoCallsInGraph(graph); + _checkNoAllocationInGraph(graph); +}
diff --git a/runtime/tools/ffi/sdk_lib_ffi_generator.dart b/runtime/tools/ffi/sdk_lib_ffi_generator.dart index 937d51a..9424cf0 100644 --- a/runtime/tools/ffi/sdk_lib_ffi_generator.dart +++ b/runtime/tools/ffi/sdk_lib_ffi_generator.dart
@@ -403,12 +403,14 @@ @patch extension ${nativeType}Array on Array<$nativeType> { @patch + @pragma("vm:prefer-inline") $dartType operator [](int index) { _checkIndex(index); return _load$nativeType(_typedDataBase, _offsetInBytes + ${sizeTimes}index,); } @patch + @pragma("vm:prefer-inline") operator []=(int index, $dartType value) { _checkIndex(index); return _store$nativeType(_typedDataBase, _offsetInBytes + ${sizeTimes}index , value,);
diff --git a/runtime/vm/compiler/recognized_methods_list.h b/runtime/vm/compiler/recognized_methods_list.h index 5643dea..b0aba41 100644 --- a/runtime/vm/compiler/recognized_methods_list.h +++ b/runtime/vm/compiler/recognized_methods_list.h
@@ -116,39 +116,39 @@ FfiNativeAsyncCallbackFunction, 0xbdd1a333) \ V(FfiLibrary, ::, _nativeIsolateLocalCallbackFunction, \ FfiNativeIsolateLocalCallbackFunction, 0x21b66eba) \ - V(FfiLibrary, ::, _loadAbiSpecificInt, FfiLoadAbiSpecificInt, 0x6abf6ce5) \ + V(FfiLibrary, ::, _loadAbiSpecificInt, FfiLoadAbiSpecificInt, 0x6abf70a6) \ V(FfiLibrary, ::, _loadAbiSpecificIntAtIndex, FfiLoadAbiSpecificIntAtIndex, \ - 0xc188d9b4) \ - V(FfiLibrary, ::, _loadInt8, FfiLoadInt8, 0xe4acf678) \ - V(FfiLibrary, ::, _loadInt16, FfiLoadInt16, 0xefe482c4) \ - V(FfiLibrary, ::, _loadInt32, FfiLoadInt32, 0xea00adeb) \ - V(FfiLibrary, ::, _loadInt64, FfiLoadInt64, 0xef97e83a) \ - V(FfiLibrary, ::, _loadUint8, FfiLoadUint8, 0x07c41993) \ - V(FfiLibrary, ::, _loadUint16, FfiLoadUint16, 0x0608f9f3) \ - V(FfiLibrary, ::, _loadUint32, FfiLoadUint32, 0x0b7025a8) \ - V(FfiLibrary, ::, _loadUint64, FfiLoadUint64, 0x0d0d244e) \ - V(FfiLibrary, ::, _loadFloat, FfiLoadFloat, 0xd16bbb37) \ - V(FfiLibrary, ::, _loadFloatUnaligned, FfiLoadFloatUnaligned, 0xee4990db) \ - V(FfiLibrary, ::, _loadDouble, FfiLoadDouble, 0xeaad7aeb) \ - V(FfiLibrary, ::, _loadDoubleUnaligned, FfiLoadDoubleUnaligned, 0xf5f51fa2) \ - V(FfiLibrary, ::, _loadPointer, FfiLoadPointer, 0x8a1cfd98) \ - V(FfiLibrary, ::, _storeAbiSpecificInt, FfiStoreAbiSpecificInt, 0xaa7301ed) \ + 0xc188dd75) \ + V(FfiLibrary, ::, _loadInt8, FfiLoadInt8, 0xe4acfa39) \ + V(FfiLibrary, ::, _loadInt16, FfiLoadInt16, 0xefe48685) \ + V(FfiLibrary, ::, _loadInt32, FfiLoadInt32, 0xea00b1ac) \ + V(FfiLibrary, ::, _loadInt64, FfiLoadInt64, 0xef97ebfb) \ + V(FfiLibrary, ::, _loadUint8, FfiLoadUint8, 0x07c41d54) \ + V(FfiLibrary, ::, _loadUint16, FfiLoadUint16, 0x0608fdb4) \ + V(FfiLibrary, ::, _loadUint32, FfiLoadUint32, 0x0b702969) \ + V(FfiLibrary, ::, _loadUint64, FfiLoadUint64, 0x0d0d280f) \ + V(FfiLibrary, ::, _loadFloat, FfiLoadFloat, 0xd16bbef8) \ + V(FfiLibrary, ::, _loadFloatUnaligned, FfiLoadFloatUnaligned, 0xee49949c) \ + V(FfiLibrary, ::, _loadDouble, FfiLoadDouble, 0xeaad7eac) \ + V(FfiLibrary, ::, _loadDoubleUnaligned, FfiLoadDoubleUnaligned, 0xf5f52363) \ + V(FfiLibrary, ::, _loadPointer, FfiLoadPointer, 0x8a1d0159) \ + V(FfiLibrary, ::, _storeAbiSpecificInt, FfiStoreAbiSpecificInt, 0xaa7305ae) \ V(FfiLibrary, ::, _storeAbiSpecificIntAtIndex, \ - FfiStoreAbiSpecificIntAtIndex, 0x258c60d4) \ - V(FfiLibrary, ::, _storeInt8, FfiStoreInt8, 0xeea23e04) \ - V(FfiLibrary, ::, _storeInt16, FfiStoreInt16, 0xdb5cf1d3) \ - V(FfiLibrary, ::, _storeInt32, FfiStoreInt32, 0xd4dab0b0) \ - V(FfiLibrary, ::, _storeInt64, FfiStoreInt64, 0x05d6cb79) \ - V(FfiLibrary, ::, _storeUint8, FfiStoreUint8, 0x01c04301) \ - V(FfiLibrary, ::, _storeUint16, FfiStoreUint16, 0x130c90a5) \ - V(FfiLibrary, ::, _storeUint32, FfiStoreUint32, 0x1009830c) \ - V(FfiLibrary, ::, _storeUint64, FfiStoreUint64, 0x097ed239) \ - V(FfiLibrary, ::, _storeFloat, FfiStoreFloat, 0x546dec6e) \ - V(FfiLibrary, ::, _storeFloatUnaligned, FfiStoreFloatUnaligned, 0x502339d2) \ - V(FfiLibrary, ::, _storeDouble, FfiStoreDouble, 0x4e77b771) \ + FfiStoreAbiSpecificIntAtIndex, 0x258c6495) \ + V(FfiLibrary, ::, _storeInt8, FfiStoreInt8, 0xeea241c5) \ + V(FfiLibrary, ::, _storeInt16, FfiStoreInt16, 0xdb5cf594) \ + V(FfiLibrary, ::, _storeInt32, FfiStoreInt32, 0xd4dab471) \ + V(FfiLibrary, ::, _storeInt64, FfiStoreInt64, 0x05d6cf3a) \ + V(FfiLibrary, ::, _storeUint8, FfiStoreUint8, 0x01c046c2) \ + V(FfiLibrary, ::, _storeUint16, FfiStoreUint16, 0x130c9466) \ + V(FfiLibrary, ::, _storeUint32, FfiStoreUint32, 0x100986cd) \ + V(FfiLibrary, ::, _storeUint64, FfiStoreUint64, 0x097ed5fa) \ + V(FfiLibrary, ::, _storeFloat, FfiStoreFloat, 0x546df02f) \ + V(FfiLibrary, ::, _storeFloatUnaligned, FfiStoreFloatUnaligned, 0x50233d93) \ + V(FfiLibrary, ::, _storeDouble, FfiStoreDouble, 0x4e77bb32) \ V(FfiLibrary, ::, _storeDoubleUnaligned, FfiStoreDoubleUnaligned, \ - 0x49ce588e) \ - V(FfiLibrary, ::, _storePointer, FfiStorePointer, 0xa08094f1) \ + 0x49ce5c4f) \ + V(FfiLibrary, ::, _storePointer, FfiStorePointer, 0xa08098b2) \ V(FfiLibrary, ::, _fromAddress, FfiFromAddress, 0x941575ee) \ V(FfiLibrary, Pointer, get:address, FfiGetAddress, 0x7cc16ffe) \ V(FfiLibrary, Native, _addressOf, FfiNativeAddressOf, 0x7f8597d3) \
diff --git a/sdk/lib/_internal/vm/lib/ffi_patch.dart b/sdk/lib/_internal/vm/lib/ffi_patch.dart index 868d49f..a902401 100644 --- a/sdk/lib/_internal/vm/lib/ffi_patch.dart +++ b/sdk/lib/_internal/vm/lib/ffi_patch.dart
@@ -346,6 +346,7 @@ static const _variableLengthLength = 0; + @pragma('vm:prefer-inline') void _checkIndex(int index) { if (_size == _variableLengthLength) { return; @@ -395,154 +396,179 @@ int sourceOffsetInBytes, int lengthInBytes); // The following functions are implemented in the method recognizer. -// -// TODO(38172): Since these are not inlined (force optimize), they force -// allocating a Pointer with in elementAt/offsetBy. Allocating these pointers -// and GCing new spaces takes a lot of the benchmark time. The next speedup is -// getting rid of these allocations by inlining these functions. @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external int _loadInt8(Object typedDataBase, int offsetInBytes); @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external int _loadInt16(Object typedDataBase, int offsetInBytes); @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external int _loadInt32(Object typedDataBase, int offsetInBytes); @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external int _loadInt64(Object typedDataBase, int offsetInBytes); @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external int _loadUint8(Object typedDataBase, int offsetInBytes); @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external int _loadUint16(Object typedDataBase, int offsetInBytes); @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external int _loadUint32(Object typedDataBase, int offsetInBytes); @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external int _loadUint64(Object typedDataBase, int offsetInBytes); @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external int _loadAbiSpecificInt<T extends AbiSpecificInteger>( Object typedDataBase, int offsetInBytes); @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external int _loadAbiSpecificIntAtIndex<T extends AbiSpecificInteger>( Object typedDataBase, int offsetInBytes, int index); @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external double _loadFloat(Object typedDataBase, int offsetInBytes); @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external double _loadDouble(Object typedDataBase, int offsetInBytes); @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external double _loadFloatUnaligned(Object typedDataBase, int offsetInBytes); @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external double _loadDoubleUnaligned(Object typedDataBase, int offsetInBytes); @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external Pointer<S> _loadPointer<S extends NativeType>( Object typedDataBase, int offsetInBytes); @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external void _storeInt8(Object typedDataBase, int offsetInBytes, int value); @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external void _storeInt16(Object typedDataBase, int offsetInBytes, int value); @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external void _storeInt32(Object typedDataBase, int offsetInBytes, int value); @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external void _storeInt64(Object typedDataBase, int offsetInBytes, int value); @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external void _storeUint8(Object typedDataBase, int offsetInBytes, int value); @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external void _storeUint16(Object typedDataBase, int offsetInBytes, int value); @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external void _storeUint32(Object typedDataBase, int offsetInBytes, int value); @pragma("vm:entry-point") @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external void _storeUint64(Object typedDataBase, int offsetInBytes, int value); @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external int _storeAbiSpecificInt<T extends AbiSpecificInteger>( Object typedDataBase, int offsetInBytes, int value); @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external int _storeAbiSpecificIntAtIndex<T extends AbiSpecificInteger>( Object typedDataBase, int offsetInBytes, int index, int value); @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external void _storeFloat( Object typedDataBase, int offsetInBytes, double value); @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external void _storeDouble( Object typedDataBase, int offsetInBytes, double value); @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external void _storeFloatUnaligned( Object typedDataBase, int offsetInBytes, double value); @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external void _storeDoubleUnaligned( Object typedDataBase, int offsetInBytes, double value); @pragma("vm:recognized", "other") @pragma("vm:idempotent") +@pragma("vm:prefer-inline") external void _storePointer<S extends NativeType>( Object typedDataBase, int offsetInBytes, Pointer<S> value); @@ -970,6 +996,7 @@ @patch extension Int8Array on Array<Int8> { @patch + @pragma("vm:prefer-inline") int operator [](int index) { _checkIndex(index); return _loadInt8( @@ -979,6 +1006,7 @@ } @patch + @pragma("vm:prefer-inline") operator []=(int index, int value) { _checkIndex(index); return _storeInt8( @@ -992,6 +1020,7 @@ @patch extension Int16Array on Array<Int16> { @patch + @pragma("vm:prefer-inline") int operator [](int index) { _checkIndex(index); return _loadInt16( @@ -1001,6 +1030,7 @@ } @patch + @pragma("vm:prefer-inline") operator []=(int index, int value) { _checkIndex(index); return _storeInt16( @@ -1014,6 +1044,7 @@ @patch extension Int32Array on Array<Int32> { @patch + @pragma("vm:prefer-inline") int operator [](int index) { _checkIndex(index); return _loadInt32( @@ -1023,6 +1054,7 @@ } @patch + @pragma("vm:prefer-inline") operator []=(int index, int value) { _checkIndex(index); return _storeInt32( @@ -1036,6 +1068,7 @@ @patch extension Int64Array on Array<Int64> { @patch + @pragma("vm:prefer-inline") int operator [](int index) { _checkIndex(index); return _loadInt64( @@ -1045,6 +1078,7 @@ } @patch + @pragma("vm:prefer-inline") operator []=(int index, int value) { _checkIndex(index); return _storeInt64( @@ -1058,6 +1092,7 @@ @patch extension Uint8Array on Array<Uint8> { @patch + @pragma("vm:prefer-inline") int operator [](int index) { _checkIndex(index); return _loadUint8( @@ -1067,6 +1102,7 @@ } @patch + @pragma("vm:prefer-inline") operator []=(int index, int value) { _checkIndex(index); return _storeUint8( @@ -1080,6 +1116,7 @@ @patch extension Uint16Array on Array<Uint16> { @patch + @pragma("vm:prefer-inline") int operator [](int index) { _checkIndex(index); return _loadUint16( @@ -1089,6 +1126,7 @@ } @patch + @pragma("vm:prefer-inline") operator []=(int index, int value) { _checkIndex(index); return _storeUint16( @@ -1102,6 +1140,7 @@ @patch extension Uint32Array on Array<Uint32> { @patch + @pragma("vm:prefer-inline") int operator [](int index) { _checkIndex(index); return _loadUint32( @@ -1111,6 +1150,7 @@ } @patch + @pragma("vm:prefer-inline") operator []=(int index, int value) { _checkIndex(index); return _storeUint32( @@ -1124,6 +1164,7 @@ @patch extension Uint64Array on Array<Uint64> { @patch + @pragma("vm:prefer-inline") int operator [](int index) { _checkIndex(index); return _loadUint64( @@ -1133,6 +1174,7 @@ } @patch + @pragma("vm:prefer-inline") operator []=(int index, int value) { _checkIndex(index); return _storeUint64( @@ -1146,6 +1188,7 @@ @patch extension FloatArray on Array<Float> { @patch + @pragma("vm:prefer-inline") double operator [](int index) { _checkIndex(index); return _loadFloat( @@ -1155,6 +1198,7 @@ } @patch + @pragma("vm:prefer-inline") operator []=(int index, double value) { _checkIndex(index); return _storeFloat( @@ -1168,6 +1212,7 @@ @patch extension DoubleArray on Array<Double> { @patch + @pragma("vm:prefer-inline") double operator [](int index) { _checkIndex(index); return _loadDouble( @@ -1177,6 +1222,7 @@ } @patch + @pragma("vm:prefer-inline") operator []=(int index, double value) { _checkIndex(index); return _storeDouble( @@ -1190,6 +1236,7 @@ @patch extension BoolArray on Array<Bool> { @patch + @pragma("vm:prefer-inline") bool operator [](int index) { _checkIndex(index); return _loadBool( @@ -1199,6 +1246,7 @@ } @patch + @pragma("vm:prefer-inline") operator []=(int index, bool value) { _checkIndex(index); return _storeBool(
diff --git a/sdk/lib/ffi/struct.dart b/sdk/lib/ffi/struct.dart index 9954ae4..0123f8f 100644 --- a/sdk/lib/ffi/struct.dart +++ b/sdk/lib/ffi/struct.dart
@@ -23,6 +23,7 @@ external _Compound._(); + @pragma('vm:prefer-inline') _Compound._fromTypedDataBase( this._typedDataBase, this._offsetInBytes, @@ -31,6 +32,7 @@ /// Constructs a view on [typedData]. /// /// The length in bytes of [typedData] must at least be [sizeInBytes]. + @pragma('vm:prefer-inline') _Compound._fromTypedData( TypedData typedData, int offset, @@ -158,6 +160,7 @@ /// Creates a view on a [TypedData] or [Pointer]. /// /// Used in [StructPointer.ref], FFI calls, and FFI callbacks. + @pragma('vm:prefer-inline') Struct._fromTypedDataBase( super._typedDataBase, super._offsetInBytes, @@ -168,6 +171,7 @@ /// The length in bytes of [typedData] must at least be [sizeInBytes]. /// /// Used in the `external` public constructor of [Struct]. + @pragma('vm:prefer-inline') Struct._fromTypedData( super.typedData, super.offset,