dep/vixl: Add Reset-to-new-buffer overload

This commit is contained in:
Stenzek 2023-10-19 22:09:07 +10:00
parent 52e0d8d473
commit 9d14ba0541
No known key found for this signature in database
2 changed files with 6 additions and 0 deletions

View File

@ -43,6 +43,7 @@ class CodeBuffer {
~CodeBuffer();
void Reset();
void Reset(byte* buffer, size_t capacity);
#ifdef VIXL_CODE_BUFFER_MMAP
void SetExecutable();

View File

@ -156,6 +156,11 @@ void CodeBuffer::Reset() {
SetClean();
}
void CodeBuffer::Reset(byte* buffer, size_t capacity) {
buffer_ = buffer;
cursor_ = buffer;
capacity_ = capacity;
}
void CodeBuffer::Grow(size_t new_capacity) {
VIXL_ASSERT(managed_);