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

Unified Diff: src/objects.h

Issue 2050343002: [regexp] Experimental support for regexp named captures (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: static_cast<int> Created 4 years, 6 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.h
diff --git a/src/objects.h b/src/objects.h
index 5a010b51c9ca899c5e8b1409b41d81851d9a979e..bc5868770d20afb41137e2227f5451b3ee4fa996 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -7942,7 +7942,6 @@ class JSRegExp: public JSObject {
// NOT_COMPILED: Initial value. No data has been stored in the JSRegExp yet.
// ATOM: A simple string to match against using an indexOf operation.
// IRREGEXP: Compiled with Irregexp.
- // IRREGEXP_NATIVE: Compiled to native code with Irregexp.
enum Type { NOT_COMPILED, ATOM, IRREGEXP };
enum Flag {
kNone = 0,
@@ -8035,8 +8034,11 @@ class JSRegExp: public JSObject {
static const int kIrregexpMaxRegisterCountIndex = kDataIndex + 4;
// Number of captures in the compiled regexp.
static const int kIrregexpCaptureCountIndex = kDataIndex + 5;
+ // Maps names of named capture groups (at indices 2i) to their corresponding
+ // capture group indices (at indices 2i + 1).
+ static const int kIrregexpCaptureNameMapIndex = kDataIndex + 6;
- static const int kIrregexpDataSize = kIrregexpCaptureCountIndex + 1;
+ static const int kIrregexpDataSize = kIrregexpCaptureNameMapIndex + 1;
// Offsets directly into the data fixed array.
static const int kDataTagOffset =

Powered by Google App Engine
This is Rietveld 408576698