dart-sdk/sdk
Daco Harkes 8c390e55d5 [vm/ffi] Improve Allocator documentation
Users are getting confused by `allocate` and `call` in the `Allocator`s.

This CL clarifies the behavior by extending the documentation.

Unfortunately, we cannot expose the actual implementation of `call`. All
calls to `sizeOf<T>()` must have `T` as compile-time constants. So,
instead of `call` having a body in Dart, all call-sites get the behavior
inlined  (`x.call<Int32>(3)` is transformed to
`x.allocate<Int32>(sizeOf<Int32>() * 3)`).

Change-Id: Ife169095d1648e9a353f3a4b75c9aff954bc04a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242800
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-05-02 12:13:19 +00:00
..
bin Moving ReleaseARM64 earlier in candidate search order 2022-04-01 15:56:56 +00:00
lib [vm/ffi] Improve Allocator documentation 2022-05-02 12:13:19 +00:00
api_readme.md Update the API docs readme 2020-01-16 21:23:09 +00:00
BUILD.gn Make dart_target_arch filters for 32-bit intel consistent 2022-03-15 01:52:21 +00:00
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00