Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/objects/js-regexp-inl.h')
-rw-r--r--deps/v8/src/objects/js-regexp-inl.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/deps/v8/src/objects/js-regexp-inl.h b/deps/v8/src/objects/js-regexp-inl.h
index a6f59468fd2..37f39dfb4fd 100644
--- a/deps/v8/src/objects/js-regexp-inl.h
+++ b/deps/v8/src/objects/js-regexp-inl.h
@@ -34,7 +34,7 @@ JSRegExp::Type JSRegExp::TypeTag() const {
return static_cast<JSRegExp::Type>(smi.value());
}
-int JSRegExp::CaptureCount() {
+int JSRegExp::CaptureCount() const {
switch (TypeTag()) {
case ATOM:
return 0;
@@ -45,6 +45,11 @@ int JSRegExp::CaptureCount() {
}
}
+int JSRegExp::MaxRegisterCount() const {
+ CHECK_EQ(TypeTag(), IRREGEXP);
+ return Smi::ToInt(DataAt(kIrregexpMaxRegisterCountIndex));
+}
+
JSRegExp::Flags JSRegExp::GetFlags() {
DCHECK(this->data().IsFixedArray());
Object data = this->data();