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

Unified Diff: src/objects-debug.cc

Issue 6076: Added special case for atomic regular expressions. (Closed)
Patch Set: Created 12 years, 3 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
« no previous file with comments | « src/objects.h ('k') | src/runtime.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 d28015307b013ae1259bedd2a04ae66d4cea8449..951575c2128c9f753c48e8ee634990607d7011cf 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -630,7 +630,19 @@ void JSArray::JSArrayVerify() {
void JSRegExp::JSRegExpVerify() {
JSObjectVerify();
ASSERT(type()->IsSmi() || type()->IsUndefined());
- ASSERT(data()->IsUndefined() || data()->IsFixedArray());
+ 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());
+ }
}
« no previous file with comments | « src/objects.h ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698