| OLD | NEW |
| (Empty) |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef V8_REGEXP_MACRO_ASSEMBLER_TRACER_H_ | |
| 6 #define V8_REGEXP_MACRO_ASSEMBLER_TRACER_H_ | |
| 7 | |
| 8 namespace v8 { | |
| 9 namespace internal { | |
| 10 | |
| 11 // Decorator on a RegExpMacroAssembler that write all calls. | |
| 12 class RegExpMacroAssemblerTracer: public RegExpMacroAssembler { | |
| 13 public: | |
| 14 RegExpMacroAssemblerTracer(Isolate* isolate, RegExpMacroAssembler* assembler); | |
| 15 virtual ~RegExpMacroAssemblerTracer(); | |
| 16 virtual void AbortedCodeGeneration(); | |
| 17 virtual int stack_limit_slack() { return assembler_->stack_limit_slack(); } | |
| 18 virtual bool CanReadUnaligned() { return assembler_->CanReadUnaligned(); } | |
| 19 virtual void AdvanceCurrentPosition(int by); // Signed cp change. | |
| 20 virtual void AdvanceRegister(int reg, int by); // r[reg] += by. | |
| 21 virtual void Backtrack(); | |
| 22 virtual void Bind(Label* label); | |
| 23 virtual void CheckAtStart(Label* on_at_start); | |
| 24 virtual void CheckCharacter(unsigned c, Label* on_equal); | |
| 25 virtual void CheckCharacterAfterAnd(unsigned c, | |
| 26 unsigned and_with, | |
| 27 Label* on_equal); | |
| 28 virtual void CheckCharacterGT(uc16 limit, Label* on_greater); | |
| 29 virtual void CheckCharacterLT(uc16 limit, Label* on_less); | |
| 30 virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); | |
| 31 virtual void CheckNotAtStart(Label* on_not_at_start); | |
| 32 virtual void CheckNotBackReference(int start_reg, Label* on_no_match); | |
| 33 virtual void CheckNotBackReferenceIgnoreCase(int start_reg, | |
| 34 Label* on_no_match); | |
| 35 virtual void CheckNotCharacter(unsigned c, Label* on_not_equal); | |
| 36 virtual void CheckNotCharacterAfterAnd(unsigned c, | |
| 37 unsigned and_with, | |
| 38 Label* on_not_equal); | |
| 39 virtual void CheckNotCharacterAfterMinusAnd(uc16 c, | |
| 40 uc16 minus, | |
| 41 uc16 and_with, | |
| 42 Label* on_not_equal); | |
| 43 virtual void CheckCharacterInRange(uc16 from, | |
| 44 uc16 to, | |
| 45 Label* on_in_range); | |
| 46 virtual void CheckCharacterNotInRange(uc16 from, | |
| 47 uc16 to, | |
| 48 Label* on_not_in_range); | |
| 49 virtual void CheckBitInTable(Handle<ByteArray> table, Label* on_bit_set); | |
| 50 virtual bool CheckSpecialCharacterClass(uc16 type, | |
| 51 Label* on_no_match); | |
| 52 virtual void Fail(); | |
| 53 virtual Handle<HeapObject> GetCode(Handle<String> source); | |
| 54 virtual void GoTo(Label* label); | |
| 55 virtual void IfRegisterGE(int reg, int comparand, Label* if_ge); | |
| 56 virtual void IfRegisterLT(int reg, int comparand, Label* if_lt); | |
| 57 virtual void IfRegisterEqPos(int reg, Label* if_eq); | |
| 58 virtual IrregexpImplementation Implementation(); | |
| 59 virtual void LoadCurrentCharacter(int cp_offset, | |
| 60 Label* on_end_of_input, | |
| 61 bool check_bounds = true, | |
| 62 int characters = 1); | |
| 63 virtual void PopCurrentPosition(); | |
| 64 virtual void PopRegister(int register_index); | |
| 65 virtual void PushBacktrack(Label* label); | |
| 66 virtual void PushCurrentPosition(); | |
| 67 virtual void PushRegister(int register_index, | |
| 68 StackCheckFlag check_stack_limit); | |
| 69 virtual void ReadCurrentPositionFromRegister(int reg); | |
| 70 virtual void ReadStackPointerFromRegister(int reg); | |
| 71 virtual void SetCurrentPositionFromEnd(int by); | |
| 72 virtual void SetRegister(int register_index, int to); | |
| 73 virtual bool Succeed(); | |
| 74 virtual void WriteCurrentPositionToRegister(int reg, int cp_offset); | |
| 75 virtual void ClearRegisters(int reg_from, int reg_to); | |
| 76 virtual void WriteStackPointerToRegister(int reg); | |
| 77 | |
| 78 private: | |
| 79 RegExpMacroAssembler* assembler_; | |
| 80 }; | |
| 81 | |
| 82 }} // namespace v8::internal | |
| 83 | |
| 84 #endif // V8_REGEXP_MACRO_ASSEMBLER_TRACER_H_ | |
| OLD | NEW |