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

Unified Diff: src/jsregexp.h

Issue 48061: Remapped regexp last-match-info to put subject and index before match indices. (Closed)
Patch Set: Created 11 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/heap.cc ('k') | src/jsregexp.cc » ('j') | src/regexp-delay.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jsregexp.h
diff --git a/src/jsregexp.h b/src/jsregexp.h
index f6e2052cf9a6ed00afc673ac7f816adc2d6c389a..2393f7b22b06f175b17a37187d9246979c7fc79a 100644
--- a/src/jsregexp.h
+++ b/src/jsregexp.h
@@ -112,7 +112,7 @@ class RegExpImpl {
static const int kLastCaptureCount = 0;
static const int kLastSubject = 1;
static const int kLastInput = 2;
- static const int kFirstCapture = 1;
+ static const int kFirstCapture = 3;
static const int kLastMatchOverhead = 3;
// Used to access the lastMatchInfo array.
@@ -125,13 +125,11 @@ class RegExpImpl {
}
static void SetLastSubject(FixedArray* array, String* to) {
- int capture_count = GetLastCaptureCount(array);
- array->set(capture_count + kLastSubject, to);
+ array->set(kLastSubject, to);
}
static void SetLastInput(FixedArray* array, String* to) {
- int capture_count = GetLastCaptureCount(array);
- array->set(capture_count + kLastInput, to);
+ array->set(kLastInput, to);
}
static void SetCapture(FixedArray* array, int index, int to) {
« no previous file with comments | « src/heap.cc ('k') | src/jsregexp.cc » ('j') | src/regexp-delay.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698