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

Unified Diff: src/objects.h

Issue 2350963004: [builtins] Move StringIndexOf to a C++ builtin. (Closed)
Patch Set: Change IndexOf usage to use unchecked version 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/js/string.js ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index c5521063dd6b8bf31d400e142c39e37e2719c665..9d12145a014efba969024dee105a24da80987df8 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -9329,10 +9329,15 @@ class String: public Name {
MUST_USE_RESULT static ComparisonResult Compare(Handle<String> x,
Handle<String> y);
+ // Perform ES6 21.1.3.8, including checking arguments.
+ static Object* IndexOf(Isolate* isolate, Handle<Object> receiver,
+ Handle<Object> search,
+ Handle<Object> position);
// Perform string match of pattern on subject, starting at start index.
- // Caller must ensure that 0 <= start_index <= sub->length().
- static int IndexOf(Isolate* isolate, Handle<String> sub, Handle<String> pat,
- int start_index);
+ // Caller must ensure that 0 <= start_index <= sub->length(), as this does not
+ // check any arguments.
+ static int IndexOf(Isolate* isolate, Handle<String> receiver,
Franzi 2016/09/23 11:37:00 Is the inner function only used inside Object* Ind
+ Handle<String> search, int start_index);
static Object* LastIndexOf(Isolate* isolate, Handle<Object> receiver,
Handle<Object> search, Handle<Object> position);
« 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