[vm/ffi/NNBD] treatment of non-nullable and nullable C types #40606
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
library-ffi
Currently, our representation of C types does not encode whether something can be null, and all types are represented as non-nullable.
Now that Dart will get NNBD, we might want to revisit that.
If we would like to represent the difference between references (non-nullable) and pointers (nullable), we could do so in the following way:
Then, we should also change the representation of the
nullptr
back to a Dartnull
instead ofPointer<Never>(address=0)
.However, this also requires us to take real care that everywhere where we currently return
Pointer
s with address 0, we returnnull
instead:Pointer<Pointer<T>>
.Year old discussions (before NNBD): #35756.
cc @mkustermann @mraleph
The text was updated successfully, but these errors were encountered: