OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 9313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9324 // to the Unicode standard could test as unequal. In effect this algorithm | 9324 // to the Unicode standard could test as unequal. In effect this algorithm |
9325 // assumes that both Strings are already in normalized form. Also, note that | 9325 // assumes that both Strings are already in normalized form. Also, note that |
9326 // for strings containing supplementary characters, lexicographic ordering on | 9326 // for strings containing supplementary characters, lexicographic ordering on |
9327 // sequences of UTF-16 code unit values differs from that on sequences of code | 9327 // sequences of UTF-16 code unit values differs from that on sequences of code |
9328 // point values. | 9328 // point values. |
9329 MUST_USE_RESULT static ComparisonResult Compare(Handle<String> x, | 9329 MUST_USE_RESULT static ComparisonResult Compare(Handle<String> x, |
9330 Handle<String> y); | 9330 Handle<String> y); |
9331 | 9331 |
9332 // Perform string match of pattern on subject, starting at start index. | 9332 // Perform string match of pattern on subject, starting at start index. |
9333 // Caller must ensure that 0 <= start_index <= sub->length(). | 9333 // Caller must ensure that 0 <= start_index <= sub->length(). |
9334 static int IndexOf(Isolate* isolate, Handle<String> sub, Handle<String> pat, | 9334 static Object* IndexOf(Isolate* isolate, Handle<Object> receiver, |
9335 int start_index); | 9335 Handle<Object> search, Handle<Object> position); |
9336 | 9336 |
9337 static Object* LastIndexOf(Isolate* isolate, Handle<Object> receiver, | 9337 static Object* LastIndexOf(Isolate* isolate, Handle<Object> receiver, |
9338 Handle<Object> search, Handle<Object> position); | 9338 Handle<Object> search, Handle<Object> position); |
9339 | 9339 |
9340 // String equality operations. | 9340 // String equality operations. |
9341 inline bool Equals(String* other); | 9341 inline bool Equals(String* other); |
9342 inline static bool Equals(Handle<String> one, Handle<String> two); | 9342 inline static bool Equals(Handle<String> one, Handle<String> two); |
9343 bool IsUtf8EqualTo(Vector<const char> str, bool allow_prefix_match = false); | 9343 bool IsUtf8EqualTo(Vector<const char> str, bool allow_prefix_match = false); |
9344 bool IsOneByteEqualTo(Vector<const uint8_t> str); | 9344 bool IsOneByteEqualTo(Vector<const uint8_t> str); |
9345 bool IsTwoByteEqualTo(Vector<const uc16> str); | 9345 bool IsTwoByteEqualTo(Vector<const uc16> str); |
(...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11311 } | 11311 } |
11312 return value; | 11312 return value; |
11313 } | 11313 } |
11314 }; | 11314 }; |
11315 | 11315 |
11316 | 11316 |
11317 } // NOLINT, false-positive due to second-order macros. | 11317 } // NOLINT, false-positive due to second-order macros. |
11318 } // NOLINT, false-positive due to second-order macros. | 11318 } // NOLINT, false-positive due to second-order macros. |
11319 | 11319 |
11320 #endif // V8_OBJECTS_H_ | 11320 #endif // V8_OBJECTS_H_ |
OLD | NEW |