Skip to content

Commit f992bfc

Browse files
dcharkesCommit Queue
authored and
Commit Queue
committed
Revert "[vm/ffi] Introduce Struct.create and Union.create"
This reverts commit c2e15cf. Reason for revert: #54754 Version skew somewhere in the analyzer/dartdoc/flutter combination. We need to land the fix inside ffi_verifier.dart first, and then reland the API docs that trigger the code path in the analyzer that throws the exception. Original change's description: > [vm/ffi] Introduce `Struct.create` and `Union.create` > > Structs and unions can now be created from an existing typed data > with the new `create` methods. > > The typed data argument to these `create` methods is optional. If > the typed data argument is omitted, a new typed data of the right > size will be allocated. > > Compound field reads and writes are unchecked. (These are > TypedDataBase loads and stores, rather than TypedData loads and stores. > And Pointers have no byte length.) Therefore the `create` method taking > existing TypedData objects check whether the length in bytes it at > least the size of the compound. > > TEST=pkg/analyzer/test/src/diagnostics/creation_of_struct_or_union_test.dart > TEST=pkg/vm/testcases/transformations/ffi/struct_typed_data.dart > TEST=tests/ffi/structs_typed_data_test.dart > TEST=tests/ffi/vmspecific_static_checks_test.dart > > Closes: #45697 > Closes: #53418 > > Change-Id: If12c56106c7ca56611bccfacbc1c680c2d4ce407 > CoreLibraryReviewExempt: FFI is a VM and WASM only feature. > Cq-Include-Trybots: luci.dart.try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64c-try,vm-aot-win-release-x64-try,vm-appjit-linux-debug-x64-try,vm-asan-linux-release-x64-try,vm-checked-mac-release-arm64-try,vm-eager-optimization-linux-release-ia32-try,vm-eager-optimization-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-x64-try,vm-kernel-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-msan-linux-release-x64-try,vm-reload-linux-debug-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-ubsan-linux-release-x64-try,vm-win-debug-arm64-try,vm-win-debug-x64-try,vm-win-debug-x64c-try,vm-win-release-ia32-try > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342763 > Commit-Queue: Daco Harkes <[email protected]> > Reviewed-by: Johnni Winther <[email protected]> > Reviewed-by: Lasse Nielsen <[email protected]> > Reviewed-by: Martin Kustermann <[email protected]> Change-Id: I285dc39946b5659219b37a1d8f10de479133957e Cq-Include-Trybots: luci.dart.try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64c-try,vm-aot-win-release-x64-try,vm-appjit-linux-debug-x64-try,vm-asan-linux-release-x64-try,vm-checked-mac-release-arm64-try,vm-eager-optimization-linux-release-ia32-try,vm-eager-optimization-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-x64-try,vm-kernel-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-msan-linux-release-x64-try,vm-reload-linux-debug-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-ubsan-linux-release-x64-try,vm-win-debug-arm64-try,vm-win-debug-x64-try,vm-win-debug-x64c-try,vm-win-release-ia32-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349061 Commit-Queue: Daco Harkes <[email protected]> Bot-Commit: Rubber Stamper <[email protected]> Reviewed-by: Zach Anderson <[email protected]> Reviewed-by: Martin Kustermann <[email protected]>
1 parent f76ec29 commit f992bfc

File tree

50 files changed

+57
-938
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+57
-938
lines changed

pkg/analyzer/lib/src/generated/ffi_verifier.dart

+8-48
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,7 @@ class FfiVerifier extends RecursiveAstVisitor<void> {
219219
if (element is MethodElement) {
220220
var enclosingElement = element.enclosingElement;
221221
if (enclosingElement.isNativeStructPointerExtension ||
222-
enclosingElement.isNativeStructArrayExtension ||
223-
enclosingElement.isNativeUnionPointerExtension ||
224-
enclosingElement.isNativeUnionArrayExtension) {
222+
enclosingElement.isNativeStructArrayExtension) {
225223
if (element.name == '[]') {
226224
_validateRefIndexed(node);
227225
}
@@ -234,12 +232,10 @@ class FfiVerifier extends RecursiveAstVisitor<void> {
234232
var constructor = node.constructorName.staticElement;
235233
var class_ = constructor?.enclosingElement;
236234
if (class_.isStructSubclass || class_.isUnionSubclass) {
237-
if (!constructor!.isFactory) {
238-
_errorReporter.reportErrorForNode(
239-
FfiCode.CREATION_OF_STRUCT_OR_UNION,
240-
node.constructorName,
241-
);
242-
}
235+
_errorReporter.reportErrorForNode(
236+
FfiCode.CREATION_OF_STRUCT_OR_UNION,
237+
node.constructorName,
238+
);
243239
} else if (class_.isNativeCallable) {
244240
_validateNativeCallable(node);
245241
}
@@ -293,10 +289,6 @@ class FfiVerifier extends RecursiveAstVisitor<void> {
293289
} else if (element.name == 'elementAt') {
294290
_validateElementAt(node);
295291
}
296-
} else if (enclosingElement.isStruct || enclosingElement.isUnion) {
297-
if (element.name == 'create') {
298-
_validateCreate(node, enclosingElement.name!);
299-
}
300292
} else if (enclosingElement.isNative) {
301293
if (element.name == 'addressOf') {
302294
_validateNativeAddressOf(node);
@@ -328,8 +320,7 @@ class FfiVerifier extends RecursiveAstVisitor<void> {
328320
var element = node.staticElement;
329321
if (element != null) {
330322
var enclosingElement = element.enclosingElement;
331-
if (enclosingElement.isNativeStructPointerExtension ||
332-
enclosingElement.isNativeUnionPointerExtension) {
323+
if (enclosingElement.isNativeStructPointerExtension) {
333324
if (element.name == 'ref') {
334325
_validateRefPrefixedIdentifier(node);
335326
}
@@ -343,8 +334,7 @@ class FfiVerifier extends RecursiveAstVisitor<void> {
343334
var element = node.propertyName.staticElement;
344335
if (element != null) {
345336
var enclosingElement = element.enclosingElement;
346-
if (enclosingElement.isNativeStructPointerExtension ||
347-
enclosingElement.isNativeUnionPointerExtension) {
337+
if (enclosingElement.isNativeStructPointerExtension) {
348338
if (element.name == 'ref') {
349339
_validateRefPropertyAccess(node);
350340
}
@@ -1173,22 +1163,6 @@ class FfiVerifier extends RecursiveAstVisitor<void> {
11731163
}
11741164
}
11751165

1176-
void _validateCreate(MethodInvocation node, String errorClass) {
1177-
final typeArgumentTypes = node.typeArgumentTypes;
1178-
if (typeArgumentTypes == null || typeArgumentTypes.length != 1) {
1179-
return;
1180-
}
1181-
final DartType dartType = typeArgumentTypes[0];
1182-
if (!_isValidFfiNativeType(dartType)) {
1183-
final AstNode errorNode = node;
1184-
_errorReporter.reportErrorForNode(
1185-
FfiCode.NON_CONSTANT_TYPE_ARGUMENT,
1186-
errorNode,
1187-
['$errorClass.create'],
1188-
);
1189-
}
1190-
}
1191-
11921166
void _validateElementAt(MethodInvocation node) {
11931167
var targetType = node.realTarget?.staticType;
11941168
if (targetType is InterfaceType && targetType.isPointer) {
@@ -1651,7 +1625,7 @@ class FfiVerifier extends RecursiveAstVisitor<void> {
16511625
/// Validate the invocation of the extension method
16521626
/// `Pointer<T extends Struct>.ref`.
16531627
void _validateRefPrefixedIdentifier(PrefixedIdentifier node) {
1654-
var targetType = node.prefix.staticType;
1628+
var targetType = node.prefix.typeOrThrow;
16551629
if (!_isValidFfiNativeType(targetType,
16561630
allowVoid: false, allowEmptyStruct: true)) {
16571631
final AstNode errorNode = node;
@@ -1948,20 +1922,6 @@ extension on Element? {
19481922
element.isFfiExtension;
19491923
}
19501924

1951-
bool get isNativeUnionArrayExtension {
1952-
final element = this;
1953-
return element is ExtensionElement &&
1954-
element.name == 'UnionArray' &&
1955-
element.isFfiExtension;
1956-
}
1957-
1958-
bool get isNativeUnionPointerExtension {
1959-
final element = this;
1960-
return element is ExtensionElement &&
1961-
element.name == 'UnionPointer' &&
1962-
element.isFfiExtension;
1963-
}
1964-
19651925
/// Return `true` if this represents the class `Opaque`.
19661926
bool get isOpaque {
19671927
final element = this;

pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect

-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ library /*isLegacy*/;
99
import self as self;
1010
import "dart:core" as core;
1111
import "dart:ffi" as ffi;
12-
import "dart:typed_data" as typ;
1312

1413
import "dart:ffi";
1514
import "package:ffi/ffi.dart";
@@ -19,9 +18,6 @@ class Coordinate extends ffi::Struct {
1918
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::Coordinate
2019
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
2120
;
22-
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Coordinate
23-
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
24-
;
2521
static factory allocate(ffi::Allocator* allocator, core::double* x, core::double* y, ffi::Pointer<self::Coordinate*>* next) → self::Coordinate* {
2622
return let final self::Coordinate* #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate*>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate*>}!) in block {
2723
#t1.{self::Coordinate::x} = x;

pkg/front_end/testcases/general/ffi_sample.dart.weak.transformed.expect

-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ library /*isLegacy*/;
22
import self as self;
33
import "dart:core" as core;
44
import "dart:ffi" as ffi;
5-
import "dart:typed_data" as typ;
65

76
import "dart:ffi";
87
import "package:ffi/ffi.dart";
@@ -12,9 +11,6 @@ class Coordinate extends ffi::Struct {
1211
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase) → self::Coordinate
1312
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
1413
;
15-
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Coordinate
16-
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
17-
;
1814
static factory allocate(ffi::Allocator* allocator, core::double* x, core::double* y, ffi::Pointer<self::Coordinate*>* next) → self::Coordinate* {
1915
return let final self::Coordinate* #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate*>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate*>}!) in block {
2016
#t1.{self::Coordinate::x} = x;

pkg/front_end/testcases/incremental/crash_05.yaml.world.1.expect

-6
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ library from "org-dartlang-test:///lib.dart" as lib {
1111
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Y
1212
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
1313
;
14-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Y
15-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
16-
;
1714
@#C7
1815
get yy() → dart.core::int
1916
return dart.ffi::_loadUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@@ -38,9 +35,6 @@ library from "org-dartlang-test:///main.dart" as main {
3835
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → main::X
3936
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
4037
;
41-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → main::X
42-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
43-
;
4438
get xx() → lib::Y
4539
return new lib::Y::#fromTypedDataBase( block {
4640
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};

pkg/front_end/testcases/incremental/crash_05.yaml.world.2.expect

-6
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ library from "org-dartlang-test:///lib.dart" as lib {
1111
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Y
1212
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
1313
;
14-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Y
15-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
16-
;
1714
@#C7
1815
get yy() → dart.core::int
1916
return dart.ffi::_loadUint32(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@@ -38,9 +35,6 @@ library from "org-dartlang-test:///main.dart" as main {
3835
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → main::X
3936
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
4037
;
41-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → main::X
42-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
43-
;
4438
get xx() → lib::Y
4539
return new lib::Y::#fromTypedDataBase( block {
4640
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};

pkg/front_end/testcases/incremental/crash_06.yaml.world.1.expect

-6
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ library from "org-dartlang-test:///structs.dart" as str {
2929
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → str::A
3030
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
3131
;
32-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → str::A
33-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
34-
;
3532
get yy() → str::Y
3633
return new str::Y::#fromTypedDataBase( block {
3734
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
@@ -50,9 +47,6 @@ library from "org-dartlang-test:///structs.dart" as str {
5047
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → str::Y
5148
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
5249
;
53-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → str::Y
54-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
55-
;
5650
external get zz() → invalid-type;
5751
external set zz(synthesized invalid-type #externalFieldValue) → void;
5852
@#C10

pkg/front_end/testcases/incremental/crash_06.yaml.world.2.expect

-6
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ library from "org-dartlang-test:///structs.dart" as str {
2929
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → str::A
3030
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
3131
;
32-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → str::A
33-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
34-
;
3532
get yy() → str::Y
3633
return new str::Y::#fromTypedDataBase( block {
3734
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
@@ -50,9 +47,6 @@ library from "org-dartlang-test:///structs.dart" as str {
5047
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → str::Y
5148
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
5249
;
53-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → str::Y
54-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
55-
;
5650
external get zz() → invalid-type;
5751
external set zz(synthesized invalid-type #externalFieldValue) → void;
5852
@#C10

pkg/front_end/testcases/incremental/ffi_01.yaml.world.1.expect

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ library from "org-dartlang-test:///lib.dart" as lib {
88
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Coordinate
99
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
1010
;
11-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Coordinate
12-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
13-
;
1411
@#C8
1512
get x() → dart.core::double
1613
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});

pkg/front_end/testcases/incremental/ffi_01.yaml.world.2.expect

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ library from "org-dartlang-test:///lib.dart" as lib {
88
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Coordinate
99
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
1010
;
11-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Coordinate
12-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
13-
;
1411
@#C8
1512
get x() → dart.core::double
1613
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});

pkg/front_end/testcases/incremental/ffi_02.yaml.world.1.expect

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ library from "org-dartlang-test:///lib.dart" as lib {
88
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Coordinate
99
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
1010
;
11-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Coordinate
12-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
13-
;
1411
@#C8
1512
get x() → dart.core::double
1613
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});

pkg/front_end/testcases/incremental/issue_46666.yaml.world.1.expect

-9
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ library from "org-dartlang-test:///a.dart" as a {
1111
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → a::StructA
1212
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
1313
;
14-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → a::StructA
15-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
16-
;
1714
get a1() → dart.ffi::Pointer<dart.ffi::Void>
1815
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
1916
set a1(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
@@ -45,9 +42,6 @@ library from "org-dartlang-test:///a.dart" as a {
4542
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → a::NestedStruct
4643
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
4744
;
48-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → a::NestedStruct
49-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
50-
;
5145
get n1() → dart.ffi::Pointer<dart.ffi::Void>
5246
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
5347
set n1(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
@@ -80,9 +74,6 @@ library from "org-dartlang-test:///b.dart" as b {
8074
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → b::StructB
8175
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
8276
;
83-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → b::StructB
84-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
85-
;
8677
get b1() → a::StructA
8778
return new a::StructA::#fromTypedDataBase( block {
8879
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};

pkg/front_end/testcases/incremental/issue_46666.yaml.world.2.expect

-9
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ library from "org-dartlang-test:///a.dart" as a {
1111
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → a::StructA
1212
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
1313
;
14-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → a::StructA
15-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
16-
;
1714
get a1() → dart.ffi::Pointer<dart.ffi::Void>
1815
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
1916
set a1(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
@@ -45,9 +42,6 @@ library from "org-dartlang-test:///a.dart" as a {
4542
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → a::NestedStruct
4643
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
4744
;
48-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → a::NestedStruct
49-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
50-
;
5145
get n1() → dart.ffi::Pointer<dart.ffi::Void>
5246
return dart.ffi::_loadPointer<dart.ffi::Void>(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C9.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
5347
set n1(synthesized dart.ffi::Pointer<dart.ffi::Void> #externalFieldValue) → void
@@ -80,9 +74,6 @@ library from "org-dartlang-test:///b.dart" as b {
8074
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → b::StructB
8175
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
8276
;
83-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → b::StructB
84-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
85-
;
8677
get b1() → a::StructA
8778
return new a::StructA::#fromTypedDataBase( block {
8879
synthesized dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};

pkg/front_end/testcases/incremental/no_outline_change_35.yaml.world.1.expect

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ library from "org-dartlang-test:///lib.dart" as lib {
88
constructor #fromTypedDataBase(synthesized dart.core::Object #typedDataBase) → lib::Coordinate
99
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
1010
;
11-
constructor #fromTypedData(synthesized dart.typed_data::TypedData #typedData, synthesized dart.core::int #offset, synthesized dart.core::int #sizeInBytes) → lib::Coordinate
12-
: super dart.ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
13-
;
1411
@#C8
1512
get x() → dart.core::double
1613
return dart.ffi::_loadDouble(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C10.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});

0 commit comments

Comments
 (0)