[cleanup] Remove unused own_buffer_ field in RegExpBytecodeGenerator
We don't use this anywhere, it's always true. Change-Id: Iae16a108f036de5eddd1b9741e554ddd4eac8c83 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1692928 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#62628}
This commit is contained in:
parent
cb024babdd
commit
9c6cb515b8
@ -17,13 +17,12 @@ RegExpBytecodeGenerator::RegExpBytecodeGenerator(Isolate* isolate, Zone* zone)
|
||||
: RegExpMacroAssembler(isolate, zone),
|
||||
buffer_(Vector<byte>::New(1024)),
|
||||
pc_(0),
|
||||
own_buffer_(true),
|
||||
advance_current_end_(kInvalidPC),
|
||||
isolate_(isolate) {}
|
||||
|
||||
RegExpBytecodeGenerator::~RegExpBytecodeGenerator() {
|
||||
if (backtrack_.is_linked()) backtrack_.Unuse();
|
||||
if (own_buffer_) buffer_.Dispose();
|
||||
buffer_.Dispose();
|
||||
}
|
||||
|
||||
RegExpBytecodeGenerator::IrregexpImplementation
|
||||
@ -369,14 +368,10 @@ void RegExpBytecodeGenerator::Copy(byte* a) {
|
||||
}
|
||||
|
||||
void RegExpBytecodeGenerator::Expand() {
|
||||
bool old_buffer_was_our_own = own_buffer_;
|
||||
Vector<byte> old_buffer = buffer_;
|
||||
buffer_ = Vector<byte>::New(old_buffer.length() * 2);
|
||||
own_buffer_ = true;
|
||||
MemCopy(buffer_.begin(), old_buffer.begin(), old_buffer.length());
|
||||
if (old_buffer_was_our_own) {
|
||||
old_buffer.Dispose();
|
||||
}
|
||||
old_buffer.Dispose();
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
|
@ -94,8 +94,6 @@ class V8_EXPORT_PRIVATE RegExpBytecodeGenerator : public RegExpMacroAssembler {
|
||||
Vector<byte> buffer_;
|
||||
// The program counter.
|
||||
int pc_;
|
||||
// True if the assembler owns the buffer, false if buffer is external.
|
||||
bool own_buffer_;
|
||||
Label backtrack_;
|
||||
|
||||
int advance_current_start_;
|
||||
|
Loading…
Reference in New Issue
Block a user