OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_H_ | 5 #ifndef V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_H_ |
6 #define V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_H_ | 6 #define V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_H_ |
7 | 7 |
8 #include "src/regexp-macro-assembler.h" | 8 #include "src/regexp-macro-assembler.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
11 namespace internal { | 11 namespace internal { |
12 | 12 |
13 #ifdef V8_INTERPRETED_REGEXP | 13 #ifdef V8_INTERPRETED_REGEXP |
14 | 14 |
| 15 // A light-weight assembler for the Irregexp byte code. |
15 class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler { | 16 class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler { |
16 public: | 17 public: |
17 // Create an assembler. Instructions and relocation information are emitted | 18 // Create an assembler. Instructions and relocation information are emitted |
18 // into a buffer, with the instructions starting from the beginning and the | 19 // into a buffer, with the instructions starting from the beginning and the |
19 // relocation information starting from the end of the buffer. See CodeDesc | 20 // relocation information starting from the end of the buffer. See CodeDesc |
20 // for a detailed comment on the layout (globals.h). | 21 // for a detailed comment on the layout (globals.h). |
21 // | 22 // |
22 // If the provided buffer is NULL, the assembler allocates and grows its own | 23 // If the provided buffer is NULL, the assembler allocates and grows its own |
23 // buffer, and buffer_size determines the initial buffer size. The buffer is | 24 // buffer, and buffer_size determines the initial buffer size. The buffer is |
24 // owned by the assembler and deallocated upon destruction of the assembler. | 25 // owned by the assembler and deallocated upon destruction of the assembler. |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 static const int kInvalidPC = -1; | 121 static const int kInvalidPC = -1; |
121 | 122 |
122 DISALLOW_IMPLICIT_CONSTRUCTORS(RegExpMacroAssemblerIrregexp); | 123 DISALLOW_IMPLICIT_CONSTRUCTORS(RegExpMacroAssemblerIrregexp); |
123 }; | 124 }; |
124 | 125 |
125 #endif // V8_INTERPRETED_REGEXP | 126 #endif // V8_INTERPRETED_REGEXP |
126 | 127 |
127 } } // namespace v8::internal | 128 } } // namespace v8::internal |
128 | 129 |
129 #endif // V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_H_ | 130 #endif // V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_H_ |
OLD | NEW |