Chromium Code Reviews| Index: src/objects-inl.h |
| diff --git a/src/objects-inl.h b/src/objects-inl.h |
| index 9aee342f96850537e93b14fd8849de04fc9945cf..d3a7079a4dd7337caeca64eb1ddbdb23e0617d5e 100644 |
| --- a/src/objects-inl.h |
| +++ b/src/objects-inl.h |
| @@ -2316,6 +2316,17 @@ JSRegExp::Type JSRegExp::TypeTag() { |
| } |
| +int JSRegExp::CaptureCount() { |
| + switch (TypeTag()) { |
| + case ATOM: return 0; |
|
Erik Corry
2009/03/12 10:13:00
Indentation is wrong here.
Lasse Reichstein
2009/03/13 08:36:51
Done.
|
| + case IRREGEXP: return Smi::cast(DataAt(kIrregexpCaptureCountIndex))->value(); |
| + default: |
| + UNREACHABLE(); |
| + return -1; |
| + } |
| +} |
| + |
| + |
| JSRegExp::Flags JSRegExp::GetFlags() { |
| ASSERT(this->data()->IsFixedArray()); |
| Object* data = this->data(); |