Commit 474e3349 authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[snapshot] Remove unused SnapshotByteSource::GetIntSlow()

Change-Id: Ib05e6bde2cefa9274952b6f8790ca4ec3d490a75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2128057
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: 's avatarDan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66937}
parent 39fcb543
......@@ -63,24 +63,6 @@ class SnapshotByteSource final {
return answer;
}
int GetIntSlow() {
// Unlike GetInt, this reads only up to the end of the blob, even if less
// than 4 bytes are remaining.
// TODO(jgruber): Remove once the use in MakeFromScriptsSource is gone.
DCHECK(position_ < length_);
uint32_t answer = data_[position_];
if (position_ + 1 < length_) answer |= data_[position_ + 1] << 8;
if (position_ + 2 < length_) answer |= data_[position_ + 2] << 16;
if (position_ + 3 < length_) answer |= data_[position_ + 3] << 24;
int bytes = (answer & 3) + 1;
Advance(bytes);
uint32_t mask = 0xffffffffu;
mask >>= 32 - (bytes << 3);
answer &= mask;
answer >>= 2;
return answer;
}
// Returns length.
int GetBlob(const byte** data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment