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

Side by Side Diff: src/objects.h

Issue 2339123002: [builtins] Move StringLastIndexOf to a builtin. (Closed)
Patch Set: Test natives callable from extensions with str compare instead 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/js/string.js ('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 9233 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 int IndexOf(Isolate* isolate, Handle<String> sub, Handle<String> pat,
9252 int start_index); 9252 int start_index);
9253 9253
9254 static Object* LastIndexOf(Isolate* isolate, Handle<Object> receiver,
9255 Handle<Object> pat, Handle<Object> position);
9256
Franzi 2016/09/19 08:04:21 I don't like pat as variable name (even thought th
9254 // String equality operations. 9257 // String equality operations.
9255 inline bool Equals(String* other); 9258 inline bool Equals(String* other);
9256 inline static bool Equals(Handle<String> one, Handle<String> two); 9259 inline static bool Equals(Handle<String> one, Handle<String> two);
9257 bool IsUtf8EqualTo(Vector<const char> str, bool allow_prefix_match = false); 9260 bool IsUtf8EqualTo(Vector<const char> str, bool allow_prefix_match = false);
9258 bool IsOneByteEqualTo(Vector<const uint8_t> str); 9261 bool IsOneByteEqualTo(Vector<const uint8_t> str);
9259 bool IsTwoByteEqualTo(Vector<const uc16> str); 9262 bool IsTwoByteEqualTo(Vector<const uc16> str);
9260 9263
9261 // Return a UTF8 representation of the string. The string is null 9264 // Return a UTF8 representation of the string. The string is null
9262 // terminated but may optionally contain nulls. Length is returned 9265 // terminated but may optionally contain nulls. Length is returned
9263 // in length_output if length_output is not a null pointer The string 9266 // in length_output if length_output is not a null pointer The string
(...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after
11225 } 11228 }
11226 return value; 11229 return value;
11227 } 11230 }
11228 }; 11231 };
11229 11232
11230 11233
11231 } // NOLINT, false-positive due to second-order macros. 11234 } // NOLINT, false-positive due to second-order macros.
11232 } // NOLINT, false-positive due to second-order macros. 11235 } // NOLINT, false-positive due to second-order macros.
11233 11236
11234 #endif // V8_OBJECTS_H_ 11237 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/js/string.js ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698