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

Unified Diff: src/objects.h

Issue 2813843002: [string] Add a fast path to String.p.replace (Closed)
Patch Set: Don't scan twice Created 3 years, 8 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/code-stub-assembler.cc ('k') | src/objects.cc » ('j') | no next file with comments »
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 947198b9caba452be8f2102519ae4849c7e15b2f..80530c36ab392b00360d2ede86dd6042e49a627b 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -8203,8 +8203,11 @@ class String: public Name {
// GetSubstitution(matched, str, position, captures, replacement)
// Expand the $-expressions in the string and return a new string with
// the result.
+ // A {start_index} can be passed to specify where to start scanning the
+ // replacement string.
MUST_USE_RESULT static MaybeHandle<String> GetSubstitution(
- Isolate* isolate, Match* match, Handle<String> replacement);
+ Isolate* isolate, Match* match, Handle<String> replacement,
+ int start_index = 0);
// String equality operations.
inline bool Equals(String* other);
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698