OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 // A simple interpreter for the Irregexp byte code. | 5 // A simple interpreter for the Irregexp byte code. |
6 | 6 |
| 7 #ifdef V8_INTERPRETED_REGEXP |
| 8 |
7 #include "src/regexp/interpreter-irregexp.h" | 9 #include "src/regexp/interpreter-irregexp.h" |
8 | 10 |
9 #include "src/ast/ast.h" | 11 #include "src/ast/ast.h" |
10 #include "src/regexp/bytecodes-irregexp.h" | 12 #include "src/regexp/bytecodes-irregexp.h" |
11 #include "src/regexp/jsregexp.h" | 13 #include "src/regexp/jsregexp.h" |
12 #include "src/regexp/regexp-macro-assembler.h" | 14 #include "src/regexp/regexp-macro-assembler.h" |
13 #include "src/unicode.h" | 15 #include "src/unicode.h" |
14 #include "src/utils.h" | 16 #include "src/utils.h" |
15 | 17 |
16 namespace v8 { | 18 namespace v8 { |
17 namespace internal { | 19 namespace internal { |
18 | 20 |
19 | |
20 typedef unibrow::Mapping<unibrow::Ecma262Canonicalize> Canonicalize; | 21 typedef unibrow::Mapping<unibrow::Ecma262Canonicalize> Canonicalize; |
21 | 22 |
22 static bool BackRefMatchesNoCase(Canonicalize* interp_canonicalize, | 23 static bool BackRefMatchesNoCase(Canonicalize* interp_canonicalize, |
23 int from, | 24 int from, |
24 int current, | 25 int current, |
25 int len, | 26 int len, |
26 Vector<const uc16> subject) { | 27 Vector<const uc16> subject) { |
27 for (int i = 0; i < len; i++) { | 28 for (int i = 0; i < len; i++) { |
28 unibrow::uchar old_char = subject[from++]; | 29 unibrow::uchar old_char = subject[from++]; |
29 unibrow::uchar new_char = subject[current++]; | 30 unibrow::uchar new_char = subject[current++]; |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 code_base, | 613 code_base, |
613 subject_vector, | 614 subject_vector, |
614 registers, | 615 registers, |
615 start_position, | 616 start_position, |
616 previous_char); | 617 previous_char); |
617 } | 618 } |
618 } | 619 } |
619 | 620 |
620 } // namespace internal | 621 } // namespace internal |
621 } // namespace v8 | 622 } // namespace v8 |
| 623 |
| 624 #endif // V8_INTERPRETED_REGEXP |
OLD | NEW |