aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/objects/regexp-match-info.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/objects/regexp-match-info.h')
-rw-r--r--deps/v8/src/objects/regexp-match-info.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/deps/v8/src/objects/regexp-match-info.h b/deps/v8/src/objects/regexp-match-info.h
index 5d8fcfb5ce..d973e62a6b 100644
--- a/deps/v8/src/objects/regexp-match-info.h
+++ b/deps/v8/src/objects/regexp-match-info.h
@@ -33,12 +33,12 @@ class V8_EXPORT_PRIVATE RegExpMatchInfo : NON_EXPORTED_BASE(public FixedArray) {
inline void SetNumberOfCaptureRegisters(int value);
// Returns the subject string of the last match.
- inline String* LastSubject();
- inline void SetLastSubject(String* value);
+ inline String LastSubject();
+ inline void SetLastSubject(String value);
// Like LastSubject, but modifiable by the user.
- inline Object* LastInput();
- inline void SetLastInput(Object* value);
+ inline Object LastInput();
+ inline void SetLastInput(Object value);
// Returns the i'th capture index, 0 <= i < NumberOfCaptures(). Capture(0) and
// Capture(1) determine the start- and endpoint of the match itself.
@@ -57,16 +57,21 @@ class V8_EXPORT_PRIVATE RegExpMatchInfo : NON_EXPORTED_BASE(public FixedArray) {
static const int kFirstCaptureIndex = 3;
static const int kLastMatchOverhead = kFirstCaptureIndex;
- static const int kNumberOfCapturesOffset = FixedArray::kHeaderSize;
- static const int kLastSubjectOffset = kNumberOfCapturesOffset + kPointerSize;
- static const int kLastInputOffset = kLastSubjectOffset + kPointerSize;
- static const int kFirstCaptureOffset = kLastInputOffset + kPointerSize;
+// Layout description.
+#define REG_EXP_MATCH_INFO_FIELDS(V) \
+ V(kNumberOfCapturesOffset, kTaggedSize) \
+ V(kLastSubjectOffset, kTaggedSize) \
+ V(kLastInputOffset, kTaggedSize) \
+ V(kFirstCaptureOffset, 0)
+
+ DEFINE_FIELD_OFFSET_CONSTANTS(FixedArray::kHeaderSize,
+ REG_EXP_MATCH_INFO_FIELDS)
+#undef REG_EXP_MATCH_INFO_FIELDS
// Every match info is guaranteed to have enough space to store two captures.
static const int kInitialCaptureIndices = 2;
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(RegExpMatchInfo);
+ OBJECT_CONSTRUCTORS(RegExpMatchInfo, FixedArray);
};
} // namespace internal