| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #ifndef REGEXP_MACRO_ASSEMBLER_TRACER_H_ | 28 #ifndef REGEXP_MACRO_ASSEMBLER_TRACER_H_ |
| 29 #define REGEXP_MACRO_ASSEMBLER_TRACER_H_ | 29 #define REGEXP_MACRO_ASSEMBLER_TRACER_H_ |
| 30 | 30 |
| 31 namespace v8 { namespace internal { | 31 namespace v8 { namespace internal { |
| 32 | 32 |
| 33 // Decorator on a RegExpMacroAssembler that write all calls. | 33 // Decorator on a RegExpMacroAssembler that write all calls. |
| 34 class RegExpMacroAssemblerTracer: public RegExpMacroAssembler { | 34 class RegExpMacroAssemblerTracer: public RegExpMacroAssembler { |
| 35 public: | 35 public: |
| 36 explicit RegExpMacroAssemblerTracer(RegExpMacroAssembler* assembler); | 36 explicit RegExpMacroAssemblerTracer(RegExpMacroAssembler* assembler); |
| 37 virtual ~RegExpMacroAssemblerTracer(); | 37 virtual ~RegExpMacroAssemblerTracer(); |
| 38 virtual int stack_limit() { return assembler_->stack_limit(); } |
| 38 | 39 |
| 39 virtual void AdvanceCurrentPosition(int by); // Signed cp change. | 40 virtual void AdvanceCurrentPosition(int by); // Signed cp change. |
| 40 virtual void AdvanceRegister(int reg, int by); // r[reg] += by. | 41 virtual void AdvanceRegister(int reg, int by); // r[reg] += by. |
| 41 virtual void Backtrack(); | 42 virtual void Backtrack(); |
| 42 virtual void Bind(Label* label); | 43 virtual void Bind(Label* label); |
| 43 virtual void CheckBitmap(uc16 start, Label* bitmap, Label* on_zero); | 44 virtual void CheckBitmap(uc16 start, Label* bitmap, Label* on_zero); |
| 44 virtual void CheckCharacter(uint32_t c, Label* on_equal); | 45 virtual void CheckCharacter(uint32_t c, Label* on_equal); |
| 45 virtual void CheckCharacterAfterAnd(uint32_t c, | 46 virtual void CheckCharacterAfterAnd(uint32_t c, |
| 46 uint32_t and_with, | 47 uint32_t and_with, |
| 47 Label* on_equal); | 48 Label* on_equal); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 virtual void IfRegisterGE(int reg, int comparand, Label* if_ge); | 90 virtual void IfRegisterGE(int reg, int comparand, Label* if_ge); |
| 90 virtual void IfRegisterLT(int reg, int comparand, Label* if_lt); | 91 virtual void IfRegisterLT(int reg, int comparand, Label* if_lt); |
| 91 virtual void IfRegisterEqPos(int reg, Label* if_eq); | 92 virtual void IfRegisterEqPos(int reg, Label* if_eq); |
| 92 virtual IrregexpImplementation Implementation(); | 93 virtual IrregexpImplementation Implementation(); |
| 93 virtual void LoadCurrentCharacter(int cp_offset, | 94 virtual void LoadCurrentCharacter(int cp_offset, |
| 94 Label* on_end_of_input, | 95 Label* on_end_of_input, |
| 95 bool check_bounds = true, | 96 bool check_bounds = true, |
| 96 int characters = 1); | 97 int characters = 1); |
| 97 virtual void PopCurrentPosition(); | 98 virtual void PopCurrentPosition(); |
| 98 virtual void PopRegister(int register_index); | 99 virtual void PopRegister(int register_index); |
| 99 virtual void PushBacktrack(Label* label); | 100 virtual void PushBacktrack(Label* label, StackCheckFlag check_stack_limit); |
| 100 virtual void PushCurrentPosition(); | 101 virtual void PushCurrentPosition(StackCheckFlag check_stack_limit); |
| 101 virtual void PushRegister(int register_index); | 102 virtual void PushRegister(int register_index, |
| 103 StackCheckFlag check_stack_limit); |
| 102 virtual void ReadCurrentPositionFromRegister(int reg); | 104 virtual void ReadCurrentPositionFromRegister(int reg); |
| 103 virtual void ReadStackPointerFromRegister(int reg); | 105 virtual void ReadStackPointerFromRegister(int reg); |
| 104 virtual void SetRegister(int register_index, int to); | 106 virtual void SetRegister(int register_index, int to); |
| 105 virtual void Succeed(); | 107 virtual void Succeed(); |
| 106 virtual void WriteCurrentPositionToRegister(int reg, int cp_offset); | 108 virtual void WriteCurrentPositionToRegister(int reg, int cp_offset); |
| 107 virtual void WriteStackPointerToRegister(int reg); | 109 virtual void WriteStackPointerToRegister(int reg); |
| 108 private: | 110 private: |
| 109 RegExpMacroAssembler* assembler_; | 111 RegExpMacroAssembler* assembler_; |
| 110 }; | 112 }; |
| 111 | 113 |
| 112 }} // namespace v8::internal | 114 }} // namespace v8::internal |
| 113 | 115 |
| 114 #endif // REGEXP_MACRO_ASSEMBLER_TRACER_H_ | 116 #endif // REGEXP_MACRO_ASSEMBLER_TRACER_H_ |
| OLD | NEW |