mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 14:32:49 +00:00
8c390e55d5
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> |
||
---|---|---|
.. | ||
bin | ||
lib | ||
api_readme.md | ||
BUILD.gn | ||
OWNERS |