Chromium Code Reviews| Index: src/objects-debug.cc |
| diff --git a/src/objects-debug.cc b/src/objects-debug.cc |
| index dc5cb602e9519a83816e282733bbf484340bdd74..6eb132abb461b65d9b7401fe3331edaa96b86673 100644 |
| --- a/src/objects-debug.cc |
| +++ b/src/objects-debug.cc |
| @@ -659,19 +659,22 @@ void JSArray::JSArrayVerify() { |
| void JSRegExp::JSRegExpVerify() { |
| JSObjectVerify(); |
| - ASSERT(type()->IsSmi() || type()->IsUndefined()); |
| - if (type()->IsSmi()) { |
| - switch (type_tag()) { |
| - case JSRegExp::JSCRE: |
| - ASSERT(data()->IsFixedArray()); |
| - break; |
| - default: |
| - ASSERT_EQ(JSRegExp::ATOM, type_tag()); |
| - ASSERT(data()->IsString()); |
| - break; |
| - } |
| - } else { |
| + ASSERT(data()->IsUndefined() || data()->IsFixedArray()); |
| + switch (TypeTag()) { |
| + case JSRegExp::ATOM: { |
|
Kasper Lund
2008/10/24 06:42:50
Indent switch cases by two spaces.
|
| + FixedArray* arr = FixedArray::cast(data()); |
| + ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString()); |
| + break; |
| + } |
| + case JSRegExp::JSCRE: { |
| + FixedArray* arr = FixedArray::cast(data()); |
| + ASSERT(arr->get(JSRegExp::kJscreDataIndex)->IsFixedArray()); |
| + break; |
| + } |
| + default: |
| + ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag()); |
| ASSERT(data()->IsUndefined()); |
| + break; |
| } |
| } |