Chromium Code Reviews

Unified Diff: src/objects-debug.cc

Issue 2358263002: [builtins] migrate C++ String Iterator builtins to baseline TurboFan (Closed)
Patch Set: v6 (fix toString() behaviour in S.p[@@iterator]) Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« src/builtins/builtins-string.cc ('K') | « src/builtins/builtins-string.cc ('k') | no next file » | 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 197d979258ffcf9fd386f38b9db4d545a1d2f09f..423d64c662a1af593e321a741a88d2e7e1e939d0 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -786,6 +786,14 @@ void JSStringIterator::JSStringIteratorVerify() {
CHECK(IsJSStringIterator());
JSObjectVerify();
CHECK(string()->IsString());
+
+ InstanceType instance_type = map()->instance_type();
+
+ static_assert(kStringRepresentationMask == 3, "2-bit string rep mask");
+ static_assert((kSeqStringTag & 1) == 0, "SeqString rep low bit is 0");
+ static_assert((kExternalStringTag & 1) == 0, "SlicedString rep low bit is 0");
+ CHECK_EQ(instance_type & 1, 0);
+
CHECK_GE(index(), 0);
CHECK_LE(index(), String::kMaxLength);
}
« src/builtins/builtins-string.cc ('K') | « src/builtins/builtins-string.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine