Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: src/objects.h

Issue 2350963004: [builtins] Move StringIndexOf to a C++ builtin. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/messages.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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> pattern, Handle<Object> position);
Franzi 2016/09/20 17:03:27 Can we use the same parameter name for the third p
petermarshall 2016/09/22 13:54:24 Yep I'll do all of that renaming here too
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
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_
OLDNEW
« no previous file with comments | « src/messages.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698