| 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 { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 Handle<String> string, | 43 Handle<String> string, |
| 44 Handle<Object> exec); | 44 Handle<Object> exec); |
| 45 | 45 |
| 46 // ES#sec-isregexp IsRegExp ( argument ) | 46 // ES#sec-isregexp IsRegExp ( argument ) |
| 47 // Includes checking of the match property. | 47 // Includes checking of the match property. |
| 48 static Maybe<bool> IsRegExp(Isolate* isolate, Handle<Object> object); | 48 static Maybe<bool> IsRegExp(Isolate* isolate, Handle<Object> object); |
| 49 | 49 |
| 50 // Checks whether exec is identical to the initial RegExp.prototype.exec. | 50 // Checks whether exec is identical to the initial RegExp.prototype.exec. |
| 51 static bool IsBuiltinExec(Handle<Object> exec); | 51 static bool IsBuiltinExec(Handle<Object> exec); |
| 52 | 52 |
| 53 // Generic index increment methods respecting unicode surrogate pairs. | 53 // ES#sec-advancestringindex |
| 54 // AdvanceStringIndex ( S, index, unicode ) |
| 54 static int AdvanceStringIndex(Isolate* isolate, Handle<String> string, | 55 static int AdvanceStringIndex(Isolate* isolate, Handle<String> string, |
| 55 int index, bool unicode); | 56 int index, bool unicode); |
| 56 static MaybeHandle<Object> SetAdvancedStringIndex(Isolate* isolate, | 57 static MaybeHandle<Object> SetAdvancedStringIndex(Isolate* isolate, |
| 57 Handle<JSReceiver> regexp, | 58 Handle<JSReceiver> regexp, |
| 58 Handle<String> string, | 59 Handle<String> string, |
| 59 bool unicode); | 60 bool unicode); |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 } // namespace internal | 63 } // namespace internal |
| 63 } // namespace v8 | 64 } // namespace v8 |
| 64 | 65 |
| 65 #endif // V8_REGEXP_REGEXP_UTILS_H_ | 66 #endif // V8_REGEXP_REGEXP_UTILS_H_ |
| OLD | NEW |