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

Unified Diff: src/objects-debug.cc

Issue 2358263002: [builtins] migrate C++ String Iterator builtins to baseline TurboFan (Closed)
Patch Set: Adapt arguments for TFJ builtins 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
« src/code-stub-assembler.cc ('K') | « src/code-stub-assembler.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);
Benedikt Meurer 2016/09/26 18:38:22 Uh, this looks fairly optimized for debug code. Pl
caitp 2016/09/27 08:55:57 Done.
+
CHECK_GE(index(), 0);
CHECK_LE(index(), String::kMaxLength);
}
« src/code-stub-assembler.cc ('K') | « src/code-stub-assembler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698