Commit 21fbf416 authored by Liu Yu's avatar Liu Yu Committed by V8 LUCI CQ

[loong64][mips][regexp][cleanup] Use 'override' instead of 'virtual'

Port commit 7c08633b

Bug: v8:12244
Change-Id: Ib6ccca9e8e3e79ec7ba7b6c522f3aa1989ab50ec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3219706
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: 's avatarZhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#77372}
parent ea2c6e67
...@@ -16,67 +16,67 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerLOONG64 ...@@ -16,67 +16,67 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerLOONG64
public: public:
RegExpMacroAssemblerLOONG64(Isolate* isolate, Zone* zone, Mode mode, RegExpMacroAssemblerLOONG64(Isolate* isolate, Zone* zone, Mode mode,
int registers_to_save); int registers_to_save);
virtual ~RegExpMacroAssemblerLOONG64(); ~RegExpMacroAssemblerLOONG64() override;
virtual int stack_limit_slack(); int stack_limit_slack() override;
virtual void AdvanceCurrentPosition(int by); void AdvanceCurrentPosition(int by) override;
virtual void AdvanceRegister(int reg, int by); void AdvanceRegister(int reg, int by) override;
virtual void Backtrack(); void Backtrack() override;
virtual void Bind(Label* label); void Bind(Label* label) override;
virtual void CheckAtStart(int cp_offset, Label* on_at_start); void CheckAtStart(int cp_offset, Label* on_at_start) override;
virtual void CheckCharacter(uint32_t c, Label* on_equal); void CheckCharacter(uint32_t c, Label* on_equal) override;
virtual void CheckCharacterAfterAnd(uint32_t c, uint32_t mask, void CheckCharacterAfterAnd(uint32_t c, uint32_t mask,
Label* on_equal); Label* on_equal) override;
virtual void CheckCharacterGT(base::uc16 limit, Label* on_greater); void CheckCharacterGT(base::uc16 limit, Label* on_greater) override;
virtual void CheckCharacterLT(base::uc16 limit, Label* on_less); void CheckCharacterLT(base::uc16 limit, Label* on_less) override;
// A "greedy loop" is a loop that is both greedy and with a simple // A "greedy loop" is a loop that is both greedy and with a simple
// body. It has a particularly simple implementation. // body. It has a particularly simple implementation.
virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); void CheckGreedyLoop(Label* on_tos_equals_current_position) override;
virtual void CheckNotAtStart(int cp_offset, Label* on_not_at_start); void CheckNotAtStart(int cp_offset, Label* on_not_at_start) override;
virtual void CheckNotBackReference(int start_reg, bool read_backward, void CheckNotBackReference(int start_reg, bool read_backward,
Label* on_no_match); Label* on_no_match) override;
virtual void CheckNotBackReferenceIgnoreCase(int start_reg, void CheckNotBackReferenceIgnoreCase(int start_reg, bool read_backward,
bool read_backward, bool unicode, bool unicode,
Label* on_no_match); Label* on_no_match) override;
virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); void CheckNotCharacter(uint32_t c, Label* on_not_equal) override;
virtual void CheckNotCharacterAfterAnd(uint32_t c, uint32_t mask, void CheckNotCharacterAfterAnd(uint32_t c, uint32_t mask,
Label* on_not_equal); Label* on_not_equal) override;
virtual void CheckNotCharacterAfterMinusAnd(base::uc16 c, base::uc16 minus, void CheckNotCharacterAfterMinusAnd(base::uc16 c, base::uc16 minus,
base::uc16 mask, base::uc16 mask,
Label* on_not_equal); Label* on_not_equal) override;
virtual void CheckCharacterInRange(base::uc16 from, base::uc16 to, void CheckCharacterInRange(base::uc16 from, base::uc16 to,
Label* on_in_range); Label* on_in_range) override;
virtual void CheckCharacterNotInRange(base::uc16 from, base::uc16 to, void CheckCharacterNotInRange(base::uc16 from, base::uc16 to,
Label* on_not_in_range); Label* on_not_in_range) override;
virtual void CheckBitInTable(Handle<ByteArray> table, Label* on_bit_set); void CheckBitInTable(Handle<ByteArray> table, Label* on_bit_set) override;
// Checks whether the given offset from the current position is before // Checks whether the given offset from the current position is before
// the end of the string. // the end of the string.
virtual void CheckPosition(int cp_offset, Label* on_outside_input); void CheckPosition(int cp_offset, Label* on_outside_input) override;
virtual bool CheckSpecialCharacterClass(StandardCharacterSet type, bool CheckSpecialCharacterClass(StandardCharacterSet type,
Label* on_no_match); Label* on_no_match) override;
virtual void Fail(); void Fail() override;
virtual Handle<HeapObject> GetCode(Handle<String> source); Handle<HeapObject> GetCode(Handle<String> source) override;
virtual void GoTo(Label* label); void GoTo(Label* label) override;
virtual void IfRegisterGE(int reg, int comparand, Label* if_ge); void IfRegisterGE(int reg, int comparand, Label* if_ge) override;
virtual void IfRegisterLT(int reg, int comparand, Label* if_lt); void IfRegisterLT(int reg, int comparand, Label* if_lt) override;
virtual void IfRegisterEqPos(int reg, Label* if_eq); void IfRegisterEqPos(int reg, Label* if_eq) override;
virtual IrregexpImplementation Implementation(); IrregexpImplementation Implementation() override;
virtual void LoadCurrentCharacterUnchecked(int cp_offset, void LoadCurrentCharacterUnchecked(int cp_offset,
int character_count); int character_count) override;
virtual void PopCurrentPosition(); void PopCurrentPosition() override;
virtual void PopRegister(int register_index); void PopRegister(int register_index) override;
virtual void PushBacktrack(Label* label); void PushBacktrack(Label* label) override;
virtual void PushCurrentPosition(); void PushCurrentPosition() override;
virtual void PushRegister(int register_index, void PushRegister(int register_index,
StackCheckFlag check_stack_limit); StackCheckFlag check_stack_limit) override;
virtual void ReadCurrentPositionFromRegister(int reg); void ReadCurrentPositionFromRegister(int reg) override;
virtual void ReadStackPointerFromRegister(int reg); void ReadStackPointerFromRegister(int reg) override;
virtual void SetCurrentPositionFromEnd(int by); void SetCurrentPositionFromEnd(int by) override;
virtual void SetRegister(int register_index, int to); void SetRegister(int register_index, int to) override;
virtual bool Succeed(); bool Succeed() override;
virtual void WriteCurrentPositionToRegister(int reg, int cp_offset); void WriteCurrentPositionToRegister(int reg, int cp_offset) override;
virtual void ClearRegisters(int reg_from, int reg_to); void ClearRegisters(int reg_from, int reg_to) override;
virtual void WriteStackPointerToRegister(int reg); void WriteStackPointerToRegister(int reg) override;
// Called from RegExp if the stack-guard is triggered. // Called from RegExp if the stack-guard is triggered.
// If the code object is relocated, the return address is fixed before // If the code object is relocated, the return address is fixed before
......
...@@ -16,70 +16,68 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerMIPS ...@@ -16,70 +16,68 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerMIPS
public: public:
RegExpMacroAssemblerMIPS(Isolate* isolate, Zone* zone, Mode mode, RegExpMacroAssemblerMIPS(Isolate* isolate, Zone* zone, Mode mode,
int registers_to_save); int registers_to_save);
virtual ~RegExpMacroAssemblerMIPS(); ~RegExpMacroAssemblerMIPS() override;
virtual int stack_limit_slack(); int stack_limit_slack() override;
virtual void AdvanceCurrentPosition(int by); void AdvanceCurrentPosition(int by) override;
virtual void AdvanceRegister(int reg, int by); void AdvanceRegister(int reg, int by) override;
virtual void Backtrack(); void Backtrack() override;
virtual void Bind(Label* label); void Bind(Label* label) override;
virtual void CheckAtStart(int cp_offset, Label* on_at_start); void CheckAtStart(int cp_offset, Label* on_at_start) override;
virtual void CheckCharacter(uint32_t c, Label* on_equal); void CheckCharacter(uint32_t c, Label* on_equal) override;
virtual void CheckCharacterAfterAnd(uint32_t c, void CheckCharacterAfterAnd(uint32_t c, uint32_t mask,
uint32_t mask, Label* on_equal) override;
Label* on_equal); void CheckCharacterGT(base::uc16 limit, Label* on_greater) override;
virtual void CheckCharacterGT(base::uc16 limit, Label* on_greater); void CheckCharacterLT(base::uc16 limit, Label* on_less) override;
virtual void CheckCharacterLT(base::uc16 limit, Label* on_less);
// A "greedy loop" is a loop that is both greedy and with a simple // A "greedy loop" is a loop that is both greedy and with a simple
// body. It has a particularly simple implementation. // body. It has a particularly simple implementation.
virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); void CheckGreedyLoop(Label* on_tos_equals_current_position) override;
virtual void CheckNotAtStart(int cp_offset, Label* on_not_at_start); void CheckNotAtStart(int cp_offset, Label* on_not_at_start) override;
virtual void CheckNotBackReference(int start_reg, bool read_backward, void CheckNotBackReference(int start_reg, bool read_backward,
Label* on_no_match); Label* on_no_match) override;
virtual void CheckNotBackReferenceIgnoreCase(int start_reg, void CheckNotBackReferenceIgnoreCase(int start_reg, bool read_backward,
bool read_backward, bool unicode, bool unicode,
Label* on_no_match); Label* on_no_match) override;
virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); void CheckNotCharacter(uint32_t c, Label* on_not_equal) override;
virtual void CheckNotCharacterAfterAnd(uint32_t c, void CheckNotCharacterAfterAnd(uint32_t c, uint32_t mask,
uint32_t mask, Label* on_not_equal) override;
Label* on_not_equal); void CheckNotCharacterAfterMinusAnd(base::uc16 c, base::uc16 minus,
virtual void CheckNotCharacterAfterMinusAnd(base::uc16 c, base::uc16 minus, base::uc16 mask,
base::uc16 mask, Label* on_not_equal) override;
Label* on_not_equal); void CheckCharacterInRange(base::uc16 from, base::uc16 to,
virtual void CheckCharacterInRange(base::uc16 from, base::uc16 to, Label* on_in_range) override;
Label* on_in_range); void CheckCharacterNotInRange(base::uc16 from, base::uc16 to,
virtual void CheckCharacterNotInRange(base::uc16 from, base::uc16 to, Label* on_not_in_range) override;
Label* on_not_in_range); void CheckBitInTable(Handle<ByteArray> table, Label* on_bit_set) override;
virtual void CheckBitInTable(Handle<ByteArray> table, Label* on_bit_set);
// Checks whether the given offset from the current position is before // Checks whether the given offset from the current position is before
// the end of the string. // the end of the string.
virtual void CheckPosition(int cp_offset, Label* on_outside_input); void CheckPosition(int cp_offset, Label* on_outside_input) override;
virtual bool CheckSpecialCharacterClass(StandardCharacterSet type, bool CheckSpecialCharacterClass(StandardCharacterSet type,
Label* on_no_match); Label* on_no_match) override;
virtual void Fail(); void Fail() override;
virtual Handle<HeapObject> GetCode(Handle<String> source); Handle<HeapObject> GetCode(Handle<String> source) override;
virtual void GoTo(Label* label); void GoTo(Label* label) override;
virtual void IfRegisterGE(int reg, int comparand, Label* if_ge); void IfRegisterGE(int reg, int comparand, Label* if_ge) override;
virtual void IfRegisterLT(int reg, int comparand, Label* if_lt); void IfRegisterLT(int reg, int comparand, Label* if_lt) override;
virtual void IfRegisterEqPos(int reg, Label* if_eq); void IfRegisterEqPos(int reg, Label* if_eq) override;
virtual IrregexpImplementation Implementation(); IrregexpImplementation Implementation() override;
virtual void LoadCurrentCharacterUnchecked(int cp_offset, void LoadCurrentCharacterUnchecked(int cp_offset,
int character_count); int character_count) override;
virtual void PopCurrentPosition(); void PopCurrentPosition() override;
virtual void PopRegister(int register_index); void PopRegister(int register_index) override;
virtual void PushBacktrack(Label* label); void PushBacktrack(Label* label) override;
virtual void PushCurrentPosition(); void PushCurrentPosition() override;
virtual void PushRegister(int register_index, void PushRegister(int register_index,
StackCheckFlag check_stack_limit); StackCheckFlag check_stack_limit) override;
virtual void ReadCurrentPositionFromRegister(int reg); void ReadCurrentPositionFromRegister(int reg) override;
virtual void ReadStackPointerFromRegister(int reg); void ReadStackPointerFromRegister(int reg) override;
virtual void SetCurrentPositionFromEnd(int by); void SetCurrentPositionFromEnd(int by) override;
virtual void SetRegister(int register_index, int to); void SetRegister(int register_index, int to) override;
virtual bool Succeed(); bool Succeed() override;
virtual void WriteCurrentPositionToRegister(int reg, int cp_offset); void WriteCurrentPositionToRegister(int reg, int cp_offset) override;
virtual void ClearRegisters(int reg_from, int reg_to); void ClearRegisters(int reg_from, int reg_to) override;
virtual void WriteStackPointerToRegister(int reg); void WriteStackPointerToRegister(int reg) override;
virtual bool CanReadUnaligned() const; bool CanReadUnaligned() const override;
// Called from RegExp if the stack-guard is triggered. // Called from RegExp if the stack-guard is triggered.
// If the code object is relocated, the return address is fixed before // If the code object is relocated, the return address is fixed before
......
...@@ -16,70 +16,68 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerMIPS ...@@ -16,70 +16,68 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerMIPS
public: public:
RegExpMacroAssemblerMIPS(Isolate* isolate, Zone* zone, Mode mode, RegExpMacroAssemblerMIPS(Isolate* isolate, Zone* zone, Mode mode,
int registers_to_save); int registers_to_save);
virtual ~RegExpMacroAssemblerMIPS(); ~RegExpMacroAssemblerMIPS() override;
virtual int stack_limit_slack(); int stack_limit_slack() override;
virtual void AdvanceCurrentPosition(int by); void AdvanceCurrentPosition(int by) override;
virtual void AdvanceRegister(int reg, int by); void AdvanceRegister(int reg, int by) override;
virtual void Backtrack(); void Backtrack() override;
virtual void Bind(Label* label); void Bind(Label* label) override;
virtual void CheckAtStart(int cp_offset, Label* on_at_start); void CheckAtStart(int cp_offset, Label* on_at_start) override;
virtual void CheckCharacter(uint32_t c, Label* on_equal); void CheckCharacter(uint32_t c, Label* on_equal) override;
virtual void CheckCharacterAfterAnd(uint32_t c, void CheckCharacterAfterAnd(uint32_t c, uint32_t mask,
uint32_t mask, Label* on_equal) override;
Label* on_equal); void CheckCharacterGT(base::uc16 limit, Label* on_greater) override;
virtual void CheckCharacterGT(base::uc16 limit, Label* on_greater); void CheckCharacterLT(base::uc16 limit, Label* on_less) override;
virtual void CheckCharacterLT(base::uc16 limit, Label* on_less);
// A "greedy loop" is a loop that is both greedy and with a simple // A "greedy loop" is a loop that is both greedy and with a simple
// body. It has a particularly simple implementation. // body. It has a particularly simple implementation.
virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); void CheckGreedyLoop(Label* on_tos_equals_current_position) override;
virtual void CheckNotAtStart(int cp_offset, Label* on_not_at_start); void CheckNotAtStart(int cp_offset, Label* on_not_at_start) override;
virtual void CheckNotBackReference(int start_reg, bool read_backward, void CheckNotBackReference(int start_reg, bool read_backward,
Label* on_no_match); Label* on_no_match) override;
virtual void CheckNotBackReferenceIgnoreCase(int start_reg, void CheckNotBackReferenceIgnoreCase(int start_reg, bool read_backward,
bool read_backward, bool unicode, bool unicode,
Label* on_no_match); Label* on_no_match) override;
virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); void CheckNotCharacter(uint32_t c, Label* on_not_equal) override;
virtual void CheckNotCharacterAfterAnd(uint32_t c, void CheckNotCharacterAfterAnd(uint32_t c, uint32_t mask,
uint32_t mask, Label* on_not_equal) override;
Label* on_not_equal); void CheckNotCharacterAfterMinusAnd(base::uc16 c, base::uc16 minus,
virtual void CheckNotCharacterAfterMinusAnd(base::uc16 c, base::uc16 minus, base::uc16 mask,
base::uc16 mask, Label* on_not_equal) override;
Label* on_not_equal); void CheckCharacterInRange(base::uc16 from, base::uc16 to,
virtual void CheckCharacterInRange(base::uc16 from, base::uc16 to, Label* on_in_range) override;
Label* on_in_range); void CheckCharacterNotInRange(base::uc16 from, base::uc16 to,
virtual void CheckCharacterNotInRange(base::uc16 from, base::uc16 to, Label* on_not_in_range) override;
Label* on_not_in_range); void CheckBitInTable(Handle<ByteArray> table, Label* on_bit_set) override;
virtual void CheckBitInTable(Handle<ByteArray> table, Label* on_bit_set);
// Checks whether the given offset from the current position is before // Checks whether the given offset from the current position is before
// the end of the string. // the end of the string.
virtual void CheckPosition(int cp_offset, Label* on_outside_input); void CheckPosition(int cp_offset, Label* on_outside_input) override;
virtual bool CheckSpecialCharacterClass(StandardCharacterSet type, bool CheckSpecialCharacterClass(StandardCharacterSet type,
Label* on_no_match); Label* on_no_match) override;
virtual void Fail(); void Fail() override;
virtual Handle<HeapObject> GetCode(Handle<String> source); Handle<HeapObject> GetCode(Handle<String> source) override;
virtual void GoTo(Label* label); void GoTo(Label* label) override;
virtual void IfRegisterGE(int reg, int comparand, Label* if_ge); void IfRegisterGE(int reg, int comparand, Label* if_ge) override;
virtual void IfRegisterLT(int reg, int comparand, Label* if_lt); void IfRegisterLT(int reg, int comparand, Label* if_lt) override;
virtual void IfRegisterEqPos(int reg, Label* if_eq); void IfRegisterEqPos(int reg, Label* if_eq) override;
virtual IrregexpImplementation Implementation(); IrregexpImplementation Implementation() override;
virtual void LoadCurrentCharacterUnchecked(int cp_offset, void LoadCurrentCharacterUnchecked(int cp_offset,
int character_count); int character_count) override;
virtual void PopCurrentPosition(); void PopCurrentPosition() override;
virtual void PopRegister(int register_index); void PopRegister(int register_index) override;
virtual void PushBacktrack(Label* label); void PushBacktrack(Label* label) override;
virtual void PushCurrentPosition(); void PushCurrentPosition() override;
virtual void PushRegister(int register_index, void PushRegister(int register_index,
StackCheckFlag check_stack_limit); StackCheckFlag check_stack_limit) override;
virtual void ReadCurrentPositionFromRegister(int reg); void ReadCurrentPositionFromRegister(int reg) override;
virtual void ReadStackPointerFromRegister(int reg); void ReadStackPointerFromRegister(int reg) override;
virtual void SetCurrentPositionFromEnd(int by); void SetCurrentPositionFromEnd(int by) override;
virtual void SetRegister(int register_index, int to); void SetRegister(int register_index, int to) override;
virtual bool Succeed(); bool Succeed() override;
virtual void WriteCurrentPositionToRegister(int reg, int cp_offset); void WriteCurrentPositionToRegister(int reg, int cp_offset) override;
virtual void ClearRegisters(int reg_from, int reg_to); void ClearRegisters(int reg_from, int reg_to) override;
virtual void WriteStackPointerToRegister(int reg); void WriteStackPointerToRegister(int reg) override;
virtual bool CanReadUnaligned() const; bool CanReadUnaligned() const override;
// Called from RegExp if the stack-guard is triggered. // Called from RegExp if the stack-guard is triggered.
// If the code object is relocated, the return address is fixed before // If the code object is relocated, the return address is fixed before
......
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