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

Unified Diff: src/objects-debug.cc

Issue 28311: Flattened the representation of compiled RegExp data. (Closed)
Patch Set: ... and it lints. Created 11 years, 10 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
« src/jsregexp.cc ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 7b7afc46bdc1f02b130068c1c9b94ee734612de6..ee1261b9b4bd502a0eb25df037e7fe0dd4057788 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -695,8 +695,18 @@ void JSRegExp::JSRegExpVerify() {
}
case JSRegExp::IRREGEXP: {
FixedArray* arr = FixedArray::cast(data());
- Object* irregexp_data = arr->get(JSRegExp::kIrregexpDataIndex);
- ASSERT(irregexp_data->IsFixedArray());
+ Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex);
+ ASSERT(ascii_data->IsTheHole()
+ || (FLAG_regexp_native ?
+ ascii_data->IsCode()
+ : ascii_data->IsByteArray()));
+ Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex);
+ ASSERT(uc16_data->IsTheHole()
+ || (FLAG_regexp_native ?
+ uc16_data->IsCode()
+ : uc16_data->IsByteArray()));
+ ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi());
+ ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi());
break;
}
default:
« src/jsregexp.cc ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698