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

Unified Diff: src/log.cc

Issue 45010: Remove all uses of StringShape variables, since that has proven... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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/jsregexp.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
===================================================================
--- src/log.cc (revision 1519)
+++ src/log.cc (working copy)
@@ -362,29 +362,27 @@
// Append a heap string.
void LogMessageBuilder::Append(String* str) {
AssertNoAllocation no_heap_allocation; // Ensure string stay valid.
- StringShape shape(str);
- int length = str->length(shape);
+ int length = str->length();
for (int i = 0; i < length; i++) {
- Append(static_cast<char>(str->Get(shape, i)));
+ Append(static_cast<char>(str->Get(i)));
}
}
void LogMessageBuilder::AppendDetailed(String* str, bool show_impl_info) {
AssertNoAllocation no_heap_allocation; // Ensure string stay valid.
- StringShape shape(str);
- int len = str->length(shape);
+ int len = str->length();
if (len > 0x1000)
len = 0x1000;
if (show_impl_info) {
- Append(shape.IsAsciiRepresentation() ? 'a' : '2');
- if (shape.IsExternal())
+ Append(StringShape(str).IsAsciiRepresentation() ? 'a' : '2');
+ if (StringShape(str).IsExternal())
Append('e');
- if (shape.IsSymbol())
+ if (StringShape(str).IsSymbol())
Append('#');
Append(":%i:", str->length());
}
for (int i = 0; i < len; i++) {
- uc32 c = str->Get(shape, i);
+ uc32 c = str->Get(i);
if (c > 0xff) {
Append("\\u%04x", c);
} else if (c < 32 || c > 126) {
« no previous file with comments | « src/jsregexp.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698