diff options
author | Michaël Zasso <targos@protonmail.com> | 2017-12-05 16:41:55 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2017-12-06 12:52:07 +0100 |
commit | 1854ba04e9a68f062beb299dd6e1479279b26363 (patch) | |
tree | d5b2df9b8c1deb6388f7a728fca8e1c98c779abe /deps/v8/src/wasm/wasm-module-builder.cc | |
parent | b52c23b75f96e1c9d2c7b3a7e5619170d0a0d8e1 (diff) | |
download | node-new-1854ba04e9a68f062beb299dd6e1479279b26363.tar.gz |
deps: update V8 to 6.3.292.46
PR-URL: https://github.com/nodejs/node/pull/16271
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/v8/src/wasm/wasm-module-builder.cc')
-rw-r--r-- | deps/v8/src/wasm/wasm-module-builder.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/deps/v8/src/wasm/wasm-module-builder.cc b/deps/v8/src/wasm/wasm-module-builder.cc index 0c2976757f..997496bb29 100644 --- a/deps/v8/src/wasm/wasm-module-builder.cc +++ b/deps/v8/src/wasm/wasm-module-builder.cc @@ -226,7 +226,8 @@ WasmModuleBuilder::WasmModuleBuilder(Zone* zone) start_function_index_(-1), min_memory_size_(16), max_memory_size_(0), - has_max_memory_size_(false) {} + has_max_memory_size_(false), + has_shared_memory_(false) {} WasmFunctionBuilder* WasmModuleBuilder::AddFunction(FunctionSig* sig) { functions_.push_back(new (zone_) WasmFunctionBuilder(this)); @@ -325,6 +326,8 @@ void WasmModuleBuilder::SetMaxMemorySize(uint32_t value) { max_memory_size_ = value; } +void WasmModuleBuilder::SetHasSharedMemory() { has_shared_memory_ = true; } + void WasmModuleBuilder::WriteTo(ZoneBuffer& buffer) const { // == Emit magic ============================================================= buffer.write_u32(kWasmMagic); @@ -396,8 +399,13 @@ void WasmModuleBuilder::WriteTo(ZoneBuffer& buffer) const { { size_t start = EmitSection(kMemorySectionCode, buffer); buffer.write_u8(1); // memory count - buffer.write_u8(has_max_memory_size_ ? kResizableMaximumFlag - : kNoMaximumFlag); + if (has_shared_memory_) { + buffer.write_u8(has_max_memory_size_ ? MemoryFlags::kSharedAndMaximum + : MemoryFlags::kSharedNoMaximum); + } else { + buffer.write_u8(has_max_memory_size_ ? MemoryFlags::kMaximum + : MemoryFlags::kNoMaximum); + } buffer.write_u32v(min_memory_size_); if (has_max_memory_size_) { buffer.write_u32v(max_memory_size_); |