summaryrefslogtreecommitdiff
path: root/deps/v8/src/wasm/streaming-decoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/wasm/streaming-decoder.cc')
-rw-r--r--deps/v8/src/wasm/streaming-decoder.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/deps/v8/src/wasm/streaming-decoder.cc b/deps/v8/src/wasm/streaming-decoder.cc
index 6c0403fcb4..94945ea58a 100644
--- a/deps/v8/src/wasm/streaming-decoder.cc
+++ b/deps/v8/src/wasm/streaming-decoder.cc
@@ -5,10 +5,10 @@
#include "src/wasm/streaming-decoder.h"
#include "src/base/template-utils.h"
-#include "src/handles.h"
-#include "src/objects-inl.h"
+#include "src/handles/handles.h"
#include "src/objects/descriptor-array.h"
#include "src/objects/dictionary.h"
+#include "src/objects/objects-inl.h"
#include "src/wasm/decoder.h"
#include "src/wasm/leb-helper.h"
#include "src/wasm/module-decoder.h"
@@ -56,7 +56,7 @@ size_t StreamingDecoder::DecodingState::ReadBytes(StreamingDecoder* streaming,
Vector<uint8_t> remaining_buf = buffer() + offset();
size_t num_bytes = std::min(bytes.size(), remaining_buf.size());
TRACE_STREAMING("ReadBytes(%zu bytes)\n", num_bytes);
- memcpy(remaining_buf.start(), &bytes.first(), num_bytes);
+ memcpy(remaining_buf.begin(), &bytes.first(), num_bytes);
set_offset(offset() + num_bytes);
return num_bytes;
}
@@ -94,7 +94,7 @@ void StreamingDecoder::Finish() {
}
for (const auto& buffer : section_buffers_) {
DCHECK_LE(cursor - bytes.start() + buffer->length(), total_size_);
- memcpy(cursor, buffer->bytes().start(), buffer->length());
+ memcpy(cursor, buffer->bytes().begin(), buffer->length());
cursor += buffer->length();
}
processor_->OnFinishedStream(std::move(bytes));
@@ -317,14 +317,14 @@ size_t StreamingDecoder::DecodeVarInt32::ReadBytes(
Vector<uint8_t> remaining_buf = buf + offset();
size_t new_bytes = std::min(bytes.size(), remaining_buf.size());
TRACE_STREAMING("ReadBytes of a VarInt\n");
- memcpy(remaining_buf.start(), &bytes.first(), new_bytes);
+ memcpy(remaining_buf.begin(), &bytes.first(), new_bytes);
buf.Truncate(offset() + new_bytes);
Decoder decoder(buf,
streaming->module_offset() - static_cast<uint32_t>(offset()));
value_ = decoder.consume_u32v(field_name_);
// The number of bytes we actually needed to read.
- DCHECK_GT(decoder.pc(), buffer().start());
- bytes_consumed_ = static_cast<size_t>(decoder.pc() - buf.start());
+ DCHECK_GT(decoder.pc(), buffer().begin());
+ bytes_consumed_ = static_cast<size_t>(decoder.pc() - buf.begin());
TRACE_STREAMING(" ==> %zu bytes consumed\n", bytes_consumed_);
if (decoder.failed()) {
@@ -427,7 +427,7 @@ StreamingDecoder::DecodeNumberOfFunctions::NextWithValue(
if (payload_buf.size() < bytes_consumed_) {
return streaming->Error("invalid code section length");
}
- memcpy(payload_buf.start(), buffer().start(), bytes_consumed_);
+ memcpy(payload_buf.begin(), buffer().begin(), bytes_consumed_);
// {value} is the number of functions.
if (value_ == 0) {
@@ -455,7 +455,7 @@ StreamingDecoder::DecodeFunctionLength::NextWithValue(
if (fun_length_buffer.size() < bytes_consumed_) {
return streaming->Error("read past code section end");
}
- memcpy(fun_length_buffer.start(), buffer().start(), bytes_consumed_);
+ memcpy(fun_length_buffer.begin(), buffer().begin(), bytes_consumed_);
// {value} is the length of the function.
if (value_ == 0) return streaming->Error("invalid function length (0)");