-
Omer Katz authored
NewSpace and PagedSpace both inherit from SpaceWithLinearArena and implement allocation logic on top of it. The parts of the allocation path that deal specifically with the linear allocation area are equivalent (only minor syntactic differences between them). This CL refactors the allocation from a linear allocation area out of NewSpace and PagedSpace and moves it to SpaceWithLinearArea. This eliminates code duplication and keeps everything generally still working the same. This is done as part of an effort to create a stable NewSpace interface to allow introducing an alternative paged new space. Bug: v8:12612 Change-Id: Ie24345a2d51f6e67ebe8a1d67e586038f7aec8de Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3578547Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79955}
39f419f0