Closed
Description
In the new structs API (#37229) we will remove load()
and store()
in favor of a val
getter/setter pair for non-struct pointers and a ref
getter for pointers to structs:
@pragma("vm:entry-point")
class Pointer<T extends NativeType> extends NativeType {
const Pointer();
external factory Pointer.allocate({int count: 1});
external factory Pointer.fromAddress(int ptr);
external set val(@DartRepresentationOf("T") Object value);
external dynamic get val;
external T get ref;
external int get address;
external Pointer<U> cast<U extends NativeType>();
}
This task includes implementation of the decisions make in #35782 and #35756.