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

Unified Diff: src/objects-debug.cc

Issue 9038: Create an abstraction for the string type flags so that they can be cached.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 1 month 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
Index: src/objects-debug.cc
===================================================================
--- src/objects-debug.cc (revision 654)
+++ src/objects-debug.cc (working copy)
@@ -465,19 +465,20 @@
void String::StringPrint() {
- if (IsSymbol()) {
+ StringShape shape(this);
+ if (shape.IsSymbol()) {
PrintF("#");
- } else if (IsConsString()) {
+ } else if (shape.IsCons()) {
PrintF("c\"");
} else {
PrintF("\"");
}
for (int i = 0; i < length(); i++) {
- PrintF("%c", Get(i));
+ PrintF("%c", Get(shape, i));
}
- if (!IsSymbol()) PrintF("\"");
+ if (!shape.IsSymbol()) PrintF("\"");
}

Powered by Google App Engine
This is Rietveld 408576698