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

Side by Side Diff: src/objects.h

Issue 2351643002: [builtins] Move StringIndexOf to a builtin. (Closed)
Patch Set: Fix signed vs unsigned comparison 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') | no next file with comments »
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 9230 matching lines...) Expand 10 before | Expand all | Expand 10 after
9241 // to the Unicode standard could test as unequal. In effect this algorithm 9241 // to the Unicode standard could test as unequal. In effect this algorithm
9242 // assumes that both Strings are already in normalized form. Also, note that 9242 // assumes that both Strings are already in normalized form. Also, note that
9243 // for strings containing supplementary characters, lexicographic ordering on 9243 // for strings containing supplementary characters, lexicographic ordering on
9244 // sequences of UTF-16 code unit values differs from that on sequences of code 9244 // sequences of UTF-16 code unit values differs from that on sequences of code
9245 // point values. 9245 // point values.
9246 MUST_USE_RESULT static ComparisonResult Compare(Handle<String> x, 9246 MUST_USE_RESULT static ComparisonResult Compare(Handle<String> x,
9247 Handle<String> y); 9247 Handle<String> y);
9248 9248
9249 // Perform string match of pattern on subject, starting at start index. 9249 // Perform string match of pattern on subject, starting at start index.
9250 // Caller must ensure that 0 <= start_index <= sub->length(). 9250 // Caller must ensure that 0 <= start_index <= sub->length().
9251 static int IndexOf(Isolate* isolate, Handle<String> sub, Handle<String> pat, 9251 static Object* IndexOf(Isolate* isolate, Handle<Object> receiver,
9252 int start_index); 9252 Handle<Object> pattern, Handle<Object> position);
9253 9253
9254 static Object* LastIndexOf(Isolate* isolate, Handle<Object> receiver, 9254 static Object* LastIndexOf(Isolate* isolate, Handle<Object> receiver,
9255 Handle<Object> search, Handle<Object> position); 9255 Handle<Object> search, Handle<Object> position);
9256 9256
9257 // String equality operations. 9257 // String equality operations.
9258 inline bool Equals(String* other); 9258 inline bool Equals(String* other);
9259 inline static bool Equals(Handle<String> one, Handle<String> two); 9259 inline static bool Equals(Handle<String> one, Handle<String> two);
9260 bool IsUtf8EqualTo(Vector<const char> str, bool allow_prefix_match = false); 9260 bool IsUtf8EqualTo(Vector<const char> str, bool allow_prefix_match = false);
9261 bool IsOneByteEqualTo(Vector<const uint8_t> str); 9261 bool IsOneByteEqualTo(Vector<const uint8_t> str);
9262 bool IsTwoByteEqualTo(Vector<const uc16> str); 9262 bool IsTwoByteEqualTo(Vector<const uc16> str);
(...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after
11228 } 11228 }
11229 return value; 11229 return value;
11230 } 11230 }
11231 }; 11231 };
11232 11232
11233 11233
11234 } // NOLINT, false-positive due to second-order macros. 11234 } // NOLINT, false-positive due to second-order macros.
11235 } // NOLINT, false-positive due to second-order macros. 11235 } // NOLINT, false-positive due to second-order macros.
11236 11236
11237 #endif // V8_OBJECTS_H_ 11237 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/messages.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698