summaryrefslogtreecommitdiff
path: root/deps/v8/src/snapshot/snapshot-source-sink.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/snapshot/snapshot-source-sink.h')
-rw-r--r--deps/v8/src/snapshot/snapshot-source-sink.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/deps/v8/src/snapshot/snapshot-source-sink.h b/deps/v8/src/snapshot/snapshot-source-sink.h
index eb4427a75f..9d44678679 100644
--- a/deps/v8/src/snapshot/snapshot-source-sink.h
+++ b/deps/v8/src/snapshot/snapshot-source-sink.h
@@ -39,6 +39,11 @@ class SnapshotByteSource final {
return data_[position_++];
}
+ byte Peek() const {
+ DCHECK(position_ < length_);
+ return data_[position_];
+ }
+
void Advance(int by) { position_ += by; }
void CopyRaw(void* to, int number_of_bytes) {
@@ -81,11 +86,10 @@ class SnapshotByteSource final {
DISALLOW_COPY_AND_ASSIGN(SnapshotByteSource);
};
-
/**
* Sink to write snapshot files to.
*
- * Subclasses must implement actual storage or i/o.
+ * Users must implement actual storage or i/o.
*/
class SnapshotByteSink {
public:
@@ -96,11 +100,6 @@ class SnapshotByteSink {
void Put(byte b, const char* description) { data_.push_back(b); }
- void PutSection(int b, const char* description) {
- DCHECK_LE(b, kMaxUInt8);
- Put(static_cast<byte>(b), description);
- }
-
void PutInt(uintptr_t integer, const char* description);
void PutRaw(const byte* data, int number_of_bytes, const char* description);