OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_REGEXP_UTILS_H_ | 5 #ifndef V8_REGEXP_REGEXP_UTILS_H_ |
6 #define V8_REGEXP_REGEXP_UTILS_H_ | 6 #define V8_REGEXP_REGEXP_UTILS_H_ |
7 | 7 |
8 #include "src/objects.h" | 8 #include "src/objects.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
11 namespace internal { | 11 namespace internal { |
12 | 12 |
| 13 class RegExpMatchInfo; |
| 14 |
13 // Helper methods for C++ regexp builtins. | 15 // Helper methods for C++ regexp builtins. |
14 class RegExpUtils : public AllStatic { | 16 class RegExpUtils : public AllStatic { |
15 public: | 17 public: |
16 // Last match info accessors. | 18 // Last match info accessors. |
17 static Handle<String> GenericCaptureGetter(Isolate* isolate, | 19 static Handle<String> GenericCaptureGetter(Isolate* isolate, |
18 Handle<RegExpMatchInfo> match_info, | 20 Handle<RegExpMatchInfo> match_info, |
19 int capture, bool* ok = nullptr); | 21 int capture, bool* ok = nullptr); |
20 | 22 |
21 // Last index (RegExp.lastIndex) accessors. | 23 // Last index (RegExp.lastIndex) accessors. |
22 static MUST_USE_RESULT MaybeHandle<Object> SetLastIndex( | 24 static MUST_USE_RESULT MaybeHandle<Object> SetLastIndex( |
(...skipping 20 matching lines...) Expand all Loading... |
43 int index, bool unicode); | 45 int index, bool unicode); |
44 static MUST_USE_RESULT MaybeHandle<Object> SetAdvancedStringIndex( | 46 static MUST_USE_RESULT MaybeHandle<Object> SetAdvancedStringIndex( |
45 Isolate* isolate, Handle<JSReceiver> regexp, Handle<String> string, | 47 Isolate* isolate, Handle<JSReceiver> regexp, Handle<String> string, |
46 bool unicode); | 48 bool unicode); |
47 }; | 49 }; |
48 | 50 |
49 } // namespace internal | 51 } // namespace internal |
50 } // namespace v8 | 52 } // namespace v8 |
51 | 53 |
52 #endif // V8_REGEXP_REGEXP_UTILS_H_ | 54 #endif // V8_REGEXP_REGEXP_UTILS_H_ |
OLD | NEW |