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

Unified Diff: src/objects-debug.cc

Issue 2348493003: [builtins] move String.prototype[@@iterator] to C++ builtin (Closed)
Patch Set: V8 (rebase + fix bytecode expectations) Created 4 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-body-descriptors-inl.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 a22f2e43981cd3e86d7050bb038f716d3489b31b..197d979258ffcf9fd386f38b9db4d545a1d2f09f 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -152,6 +152,9 @@ void HeapObject::HeapObjectVerify() {
case JS_MAP_ITERATOR_TYPE:
JSMapIterator::cast(this)->JSMapIteratorVerify();
break;
+ case JS_STRING_ITERATOR_TYPE:
+ JSStringIterator::cast(this)->JSStringIteratorVerify();
+ break;
case JS_WEAK_MAP_TYPE:
JSWeakMap::cast(this)->JSWeakMapVerify();
break;
@@ -779,6 +782,13 @@ void JSWeakMap::JSWeakMapVerify() {
CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate()));
}
+void JSStringIterator::JSStringIteratorVerify() {
+ CHECK(IsJSStringIterator());
+ JSObjectVerify();
+ CHECK(string()->IsString());
+ CHECK_GE(index(), 0);
+ CHECK_LE(index(), String::kMaxLength);
+}
void JSWeakSet::JSWeakSetVerify() {
CHECK(IsJSWeakSet());
« no previous file with comments | « src/objects-body-descriptors-inl.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698