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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 virtual void ReadCurrentPositionFromRegister(int reg) = 0; | 154 virtual void ReadCurrentPositionFromRegister(int reg) = 0; |
155 virtual void ReadStackPointerFromRegister(int reg) = 0; | 155 virtual void ReadStackPointerFromRegister(int reg) = 0; |
156 virtual void SetRegister(int register_index, int to) = 0; | 156 virtual void SetRegister(int register_index, int to) = 0; |
157 virtual void Succeed() = 0; | 157 virtual void Succeed() = 0; |
158 virtual void WriteCurrentPositionToRegister(int reg, int cp_offset) = 0; | 158 virtual void WriteCurrentPositionToRegister(int reg, int cp_offset) = 0; |
159 virtual void ClearRegisters(int reg_from, int reg_to) = 0; | 159 virtual void ClearRegisters(int reg_from, int reg_to) = 0; |
160 virtual void WriteStackPointerToRegister(int reg) = 0; | 160 virtual void WriteStackPointerToRegister(int reg) = 0; |
161 }; | 161 }; |
162 | 162 |
163 | 163 |
164 #ifdef V8_NATIVE_REGEXP // Avoid compiling unused code. | 164 #ifndef V8_INTERPRETED_REGEXP // Avoid compiling unused code. |
165 | 165 |
166 class NativeRegExpMacroAssembler: public RegExpMacroAssembler { | 166 class NativeRegExpMacroAssembler: public RegExpMacroAssembler { |
167 public: | 167 public: |
168 // Type of input string to generate code for. | 168 // Type of input string to generate code for. |
169 enum Mode { ASCII = 1, UC16 = 2 }; | 169 enum Mode { ASCII = 1, UC16 = 2 }; |
170 | 170 |
171 // Result of calling generated native RegExp code. | 171 // Result of calling generated native RegExp code. |
172 // RETRY: Something significant changed during execution, and the matching | 172 // RETRY: Something significant changed during execution, and the matching |
173 // should be retried from scratch. | 173 // should be retried from scratch. |
174 // EXCEPTION: Something failed during execution. If no exception has been | 174 // EXCEPTION: Something failed during execution. If no exception has been |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 } | 214 } |
215 | 215 |
216 static Result Execute(Code* code, | 216 static Result Execute(Code* code, |
217 String* input, | 217 String* input, |
218 int start_offset, | 218 int start_offset, |
219 const byte* input_start, | 219 const byte* input_start, |
220 const byte* input_end, | 220 const byte* input_end, |
221 int* output); | 221 int* output); |
222 }; | 222 }; |
223 | 223 |
224 #endif // V8_NATIVE_REGEXP | 224 #endif // V8_INTERPRETED_REGEXP |
225 | 225 |
226 } } // namespace v8::internal | 226 } } // namespace v8::internal |
227 | 227 |
228 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_ | 228 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_ |
OLD | NEW |