[wasm][cleanup] Make {owned_code_space_} a vector

It was a std::list for no obvious reason. This CL turns it into a
vector, which is the standard data structure we use if we don't have
any special requirements.

R=mstarzinger@chromium.org

Change-Id: Iefc321db9327e0743772dd804e2325266a9bff64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1594727
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61235}
This commit is contained in:
Clemens Hammacher 2019-05-06 11:13:56 +02:00 committed by Commit Bot
parent 9b30bdb49c
commit 4d5969b2a8
2 changed files with 2 additions and 1 deletions

View File

@ -419,6 +419,7 @@ NativeModule::NativeModule(WasmEngine* engine, const WasmFeatures& enabled,
compilation_state_ =
CompilationState::New(*shared_this, std::move(async_counters));
DCHECK_NOT_NULL(module_);
owned_code_space_.reserve(can_request_more ? 4 : 1);
owned_code_space_.emplace_back(std::move(code_space));
#if defined(V8_OS_WIN_X64)

View File

@ -525,7 +525,7 @@ class V8_EXPORT_PRIVATE NativeModule final {
DisjointAllocationPool free_code_space_;
DisjointAllocationPool allocated_code_space_;
std::list<VirtualMemory> owned_code_space_;
std::vector<VirtualMemory> owned_code_space_;
// End of fields protected by {allocation_mutex_}.
//////////////////////////////////////////////////////////////////////////////