[vm/ffi] Fix incomplete handling of Ffi types in VisitPointersPredefined.

Issue https://github.com/dart-lang/sdk/issues/37680

NativeFunction was not handled despite being concrete. We can just make it (and Void) abstract
because they cannot appear directly as the type of native field, only as a type argument.

Change-Id: I92c276b7c1c4c98624bf527ccff98f5fd077bf2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114861
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This commit is contained in:
Samir Jindel 2019-08-29 18:57:34 +00:00 committed by commit-bot@chromium.org
parent 792c3aa92d
commit fc4919eb6f
2 changed files with 4 additions and 6 deletions

View file

@ -68,8 +68,8 @@ class Double extends _NativeDouble {}
@patch
@pragma("vm:entry-point")
class Void extends NativeType {}
abstract class Void extends NativeType {}
@patch
@pragma("vm:entry-point")
class NativeFunction<T extends Function> extends NativeType {}
abstract class NativeFunction<T extends Function> extends NativeType {}

View file

@ -121,13 +121,11 @@ class Double extends _NativeDouble {
/// [Void] is not constructible in the Dart code and serves purely as marker in
/// type signatures.
@unsized
class Void extends NativeType {
const Void();
}
abstract class Void extends NativeType {}
/// Represents a function type in C.
///
/// [NativeFunction] is not constructible in the Dart code and serves purely as
/// marker in type signatures.
@unsized
class NativeFunction<T extends Function> extends NativeType {}
abstract class NativeFunction<T extends Function> extends NativeType {}