| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 virtual void GoTo(Label* label); | 59 virtual void GoTo(Label* label); |
| 60 virtual void PushBacktrack(Label* label); | 60 virtual void PushBacktrack(Label* label); |
| 61 virtual void Succeed(); | 61 virtual void Succeed(); |
| 62 virtual void Fail(); | 62 virtual void Fail(); |
| 63 virtual void PopRegister(int register_index); | 63 virtual void PopRegister(int register_index); |
| 64 virtual void PushRegister(int register_index, | 64 virtual void PushRegister(int register_index, |
| 65 StackCheckFlag check_stack_limit); | 65 StackCheckFlag check_stack_limit); |
| 66 virtual void AdvanceRegister(int reg, int by); // r[reg] += by. | 66 virtual void AdvanceRegister(int reg, int by); // r[reg] += by. |
| 67 virtual void SetRegister(int register_index, int to); | 67 virtual void SetRegister(int register_index, int to); |
| 68 virtual void WriteCurrentPositionToRegister(int reg, int cp_offset); | 68 virtual void WriteCurrentPositionToRegister(int reg, int cp_offset); |
| 69 virtual void ClearRegister(int reg); | 69 virtual void ClearRegisters(int reg_from, int reg_to); |
| 70 virtual void ReadCurrentPositionFromRegister(int reg); | 70 virtual void ReadCurrentPositionFromRegister(int reg); |
| 71 virtual void WriteStackPointerToRegister(int reg); | 71 virtual void WriteStackPointerToRegister(int reg); |
| 72 virtual void ReadStackPointerFromRegister(int reg); | 72 virtual void ReadStackPointerFromRegister(int reg); |
| 73 virtual void LoadCurrentCharacter(int cp_offset, | 73 virtual void LoadCurrentCharacter(int cp_offset, |
| 74 Label* on_end_of_input, | 74 Label* on_end_of_input, |
| 75 bool check_bounds = true, | 75 bool check_bounds = true, |
| 76 int characters = 1); | 76 int characters = 1); |
| 77 virtual void CheckCharacter(uint32_t c, Label* on_equal); | 77 virtual void CheckCharacter(uint32_t c, Label* on_equal); |
| 78 virtual void CheckCharacterAfterAnd(uint32_t c, | 78 virtual void CheckCharacterAfterAnd(uint32_t c, |
| 79 uint32_t mask, | 79 uint32_t mask, |
| 80 Label* on_equal); | 80 Label* on_equal); |
| 81 virtual void CheckCharacterGT(uc16 limit, Label* on_greater); | 81 virtual void CheckCharacterGT(uc16 limit, Label* on_greater); |
| 82 virtual void CheckCharacterLT(uc16 limit, Label* on_less); | 82 virtual void CheckCharacterLT(uc16 limit, Label* on_less); |
| 83 virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); | 83 virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); |
| 84 virtual void CheckAtStart(Label* on_at_start); |
| 84 virtual void CheckNotAtStart(Label* on_not_at_start); | 85 virtual void CheckNotAtStart(Label* on_not_at_start); |
| 85 virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); | 86 virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); |
| 86 virtual void CheckNotCharacterAfterAnd(uint32_t c, | 87 virtual void CheckNotCharacterAfterAnd(uint32_t c, |
| 87 uint32_t mask, | 88 uint32_t mask, |
| 88 Label* on_not_equal); | 89 Label* on_not_equal); |
| 89 virtual void CheckNotCharacterAfterMinusAnd(uc16 c, | 90 virtual void CheckNotCharacterAfterMinusAnd(uc16 c, |
| 90 uc16 minus, | 91 uc16 minus, |
| 91 uc16 mask, | 92 uc16 mask, |
| 92 Label* on_not_equal); | 93 Label* on_not_equal); |
| 93 virtual void CheckNotBackReference(int start_reg, Label* on_no_match); | 94 virtual void CheckNotBackReference(int start_reg, Label* on_no_match); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 112 virtual void IfRegisterGE(int register_index, int comparand, Label* if_ge); | 113 virtual void IfRegisterGE(int register_index, int comparand, Label* if_ge); |
| 113 virtual void IfRegisterEqPos(int register_index, Label* if_eq); | 114 virtual void IfRegisterEqPos(int register_index, Label* if_eq); |
| 114 | 115 |
| 115 virtual IrregexpImplementation Implementation(); | 116 virtual IrregexpImplementation Implementation(); |
| 116 virtual Handle<Object> GetCode(Handle<String> source); | 117 virtual Handle<Object> GetCode(Handle<String> source); |
| 117 private: | 118 private: |
| 118 void Expand(); | 119 void Expand(); |
| 119 // Code and bitmap emission. | 120 // Code and bitmap emission. |
| 120 inline void Emit32(uint32_t x); | 121 inline void Emit32(uint32_t x); |
| 121 inline void Emit16(uint32_t x); | 122 inline void Emit16(uint32_t x); |
| 122 inline void Emit(uint32_t x); | 123 inline void Emit(uint32_t bc, uint32_t arg); |
| 123 // Bytecode buffer. | 124 // Bytecode buffer. |
| 124 int length(); | 125 int length(); |
| 125 void Copy(Address a); | 126 void Copy(Address a); |
| 126 | 127 |
| 127 // The buffer into which code and relocation info are generated. | 128 // The buffer into which code and relocation info are generated. |
| 128 Vector<byte> buffer_; | 129 Vector<byte> buffer_; |
| 129 // The program counter. | 130 // The program counter. |
| 130 int pc_; | 131 int pc_; |
| 131 // True if the assembler owns the buffer, false if buffer is external. | 132 // True if the assembler owns the buffer, false if buffer is external. |
| 132 bool own_buffer_; | 133 bool own_buffer_; |
| 133 Label backtrack_; | 134 Label backtrack_; |
| 134 | 135 |
| 135 DISALLOW_IMPLICIT_CONSTRUCTORS(RegExpMacroAssemblerIrregexp); | 136 DISALLOW_IMPLICIT_CONSTRUCTORS(RegExpMacroAssemblerIrregexp); |
| 136 }; | 137 }; |
| 137 | 138 |
| 138 } } // namespace v8::internal | 139 } } // namespace v8::internal |
| 139 | 140 |
| 140 #endif // V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_H_ | 141 #endif // V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_H_ |
| OLD | NEW |