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

Unified Diff: src/runtime/runtime-strings.cc

Issue 2775303002: [regexp] Named capture support for string replacements (Closed)
Patch Set: Only cast if not undefined Created 3 years, 9 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/runtime/runtime-regexp.cc ('k') | test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-strings.cc
diff --git a/src/runtime/runtime-strings.cc b/src/runtime/runtime-strings.cc
index e2c05c1d5ab6853bf7c8ea860ad2fc3eb3044f17..6f21051891f665f34d05b67ea625fca299106a8c 100644
--- a/src/runtime/runtime-strings.cc
+++ b/src/runtime/runtime-strings.cc
@@ -31,13 +31,20 @@ RUNTIME_FUNCTION(Runtime_GetSubstitution) {
: match_(match), prefix_(prefix), suffix_(suffix) {}
Handle<String> GetMatch() override { return match_; }
+ Handle<String> GetPrefix() override { return prefix_; }
+ Handle<String> GetSuffix() override { return suffix_; }
+
+ int CaptureCount() override { return 0; }
+ bool HasNamedCaptures() override { return false; }
MaybeHandle<String> GetCapture(int i, bool* capture_exists) override {
*capture_exists = false;
return match_; // Return arbitrary string handle.
}
- Handle<String> GetPrefix() override { return prefix_; }
- Handle<String> GetSuffix() override { return suffix_; }
- int CaptureCount() override { return 0; }
+ MaybeHandle<String> GetNamedCapture(Handle<String> name,
+ bool* capture_exists) override {
+ UNREACHABLE();
+ return MaybeHandle<String>();
+ }
private:
Handle<String> match_, prefix_, suffix_;
« no previous file with comments | « src/runtime/runtime-regexp.cc ('k') | test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698