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

Unified Diff: src/objects-inl.h

Issue 2764343004: [regexp] Named capture support for callable replacements (Closed)
Patch Set: 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
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 0f666d7ec74ab04fe16dc1ff3128236907b64196..b328371a8559f9cb74dfe35fb64a66adf06baa53 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -7000,6 +7000,11 @@ String* JSRegExp::Pattern() {
return pattern;
}
+Object* JSRegExp::CaptureNameMap() {
+ DCHECK(this->data()->IsFixedArray());
+ DCHECK_EQ(TypeTag(), IRREGEXP);
+ return DataAt(kIrregexpCaptureNameMapIndex);
+}
Object* JSRegExp::DataAt(int index) {
DCHECK(TypeTag() != NOT_COMPILED);

Powered by Google App Engine
This is Rietveld 408576698