[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),
|
: RegExpMacroAssembler(isolate, zone),
|
||||||
buffer_(Vector<byte>::New(1024)),
|
buffer_(Vector<byte>::New(1024)),
|
||||||
pc_(0),
|
pc_(0),
|
||||||
own_buffer_(true),
|
|
||||||
advance_current_end_(kInvalidPC),
|
advance_current_end_(kInvalidPC),
|
||||||
isolate_(isolate) {}
|
isolate_(isolate) {}
|
||||||
|
|
||||||
RegExpBytecodeGenerator::~RegExpBytecodeGenerator() {
|
RegExpBytecodeGenerator::~RegExpBytecodeGenerator() {
|
||||||
if (backtrack_.is_linked()) backtrack_.Unuse();
|
if (backtrack_.is_linked()) backtrack_.Unuse();
|
||||||
if (own_buffer_) buffer_.Dispose();
|
buffer_.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
RegExpBytecodeGenerator::IrregexpImplementation
|
RegExpBytecodeGenerator::IrregexpImplementation
|
||||||
@ -369,14 +368,10 @@ void RegExpBytecodeGenerator::Copy(byte* a) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RegExpBytecodeGenerator::Expand() {
|
void RegExpBytecodeGenerator::Expand() {
|
||||||
bool old_buffer_was_our_own = own_buffer_;
|
|
||||||
Vector<byte> old_buffer = buffer_;
|
Vector<byte> old_buffer = buffer_;
|
||||||
buffer_ = Vector<byte>::New(old_buffer.length() * 2);
|
buffer_ = Vector<byte>::New(old_buffer.length() * 2);
|
||||||
own_buffer_ = true;
|
|
||||||
MemCopy(buffer_.begin(), old_buffer.begin(), old_buffer.length());
|
MemCopy(buffer_.begin(), old_buffer.begin(), old_buffer.length());
|
||||||
if (old_buffer_was_our_own) {
|
old_buffer.Dispose();
|
||||||
old_buffer.Dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
@ -94,8 +94,6 @@ class V8_EXPORT_PRIVATE RegExpBytecodeGenerator : public RegExpMacroAssembler {
|
|||||||
Vector<byte> buffer_;
|
Vector<byte> buffer_;
|
||||||
// The program counter.
|
// The program counter.
|
||||||
int pc_;
|
int pc_;
|
||||||
// True if the assembler owns the buffer, false if buffer is external.
|
|
||||||
bool own_buffer_;
|
|
||||||
Label backtrack_;
|
Label backtrack_;
|
||||||
|
|
||||||
int advance_current_start_;
|
int advance_current_start_;
|
||||||
|
Loading…
Reference in New Issue
Block a user