Commit d4ac75e8 authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[regexp][arm64] Only unuse labels on abortion

Marking the labels as unused is only needed when we abort code
generation. Otherwise the DCHECKs in the label destructors are useful to
catch bugs.

R=jgruber@chromium.org

Bug: v8:12244
Change-Id: I63198f98a7acd1f2528d31964c01bc6815ba99a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3205899
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77267}
parent a03ed9d6
......@@ -130,8 +130,10 @@ RegExpMacroAssemblerARM64::RegExpMacroAssemblerARM64(Isolate* isolate,
__ Bind(&start_label_); // And then continue from here.
}
RegExpMacroAssemblerARM64::~RegExpMacroAssemblerARM64() {
// Unuse labels in case we throw away the assembler without calling GetCode.
RegExpMacroAssemblerARM64::~RegExpMacroAssemblerARM64() = default;
void RegExpMacroAssemblerARM64::AbortedCodeGeneration() {
masm_->AbortedCodeGeneration();
entry_label_.Unuse();
start_label_.Unuse();
success_label_.Unuse();
......
......@@ -19,7 +19,7 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerARM64
RegExpMacroAssemblerARM64(Isolate* isolate, Zone* zone, Mode mode,
int registers_to_save);
~RegExpMacroAssemblerARM64() override;
void AbortedCodeGeneration() override { masm_->AbortedCodeGeneration(); }
void AbortedCodeGeneration() override;
int stack_limit_slack() override;
void AdvanceCurrentPosition(int by) override;
void AdvanceRegister(int reg, int by) override;
......
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