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

Side by Side Diff: src/string-stream.cc

Issue 10442015: Rollback of r11638, r11636 on trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/runtime.cc ('k') | src/version.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
11 // with the distribution. 11 // with the distribution.
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 Add(" #%d# %p: ", i, printee); 420 Add(" #%d# %p: ", i, printee);
421 printee->ShortPrint(this); 421 printee->ShortPrint(this);
422 Add("\n"); 422 Add("\n");
423 if (printee->IsJSObject()) { 423 if (printee->IsJSObject()) {
424 if (printee->IsJSValue()) { 424 if (printee->IsJSValue()) {
425 Add(" value(): %o\n", JSValue::cast(printee)->value()); 425 Add(" value(): %o\n", JSValue::cast(printee)->value());
426 } 426 }
427 PrintUsingMap(JSObject::cast(printee)); 427 PrintUsingMap(JSObject::cast(printee));
428 if (printee->IsJSArray()) { 428 if (printee->IsJSArray()) {
429 JSArray* array = JSArray::cast(printee); 429 JSArray* array = JSArray::cast(printee);
430 if (array->HasFastObjectElements()) { 430 if (array->HasFastElements()) {
431 unsigned int limit = FixedArray::cast(array->elements())->length(); 431 unsigned int limit = FixedArray::cast(array->elements())->length();
432 unsigned int length = 432 unsigned int length =
433 static_cast<uint32_t>(JSArray::cast(array)->length()->Number()); 433 static_cast<uint32_t>(JSArray::cast(array)->length()->Number());
434 if (length < limit) limit = length; 434 if (length < limit) limit = length;
435 PrintFixedArray(FixedArray::cast(array->elements()), limit); 435 PrintFixedArray(FixedArray::cast(array->elements()), limit);
436 } 436 }
437 } 437 }
438 } else if (printee->IsByteArray()) { 438 } else if (printee->IsByteArray()) {
439 PrintByteArray(ByteArray::cast(printee)); 439 PrintByteArray(ByteArray::cast(printee));
440 } else if (printee->IsFixedArray()) { 440 } else if (printee->IsFixedArray()) {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 580
581 // Only grow once to the maximum allowable size. 581 // Only grow once to the maximum allowable size.
582 char* NoAllocationStringAllocator::grow(unsigned* bytes) { 582 char* NoAllocationStringAllocator::grow(unsigned* bytes) {
583 ASSERT(size_ >= *bytes); 583 ASSERT(size_ >= *bytes);
584 *bytes = size_; 584 *bytes = size_;
585 return space_; 585 return space_;
586 } 586 }
587 587
588 588
589 } } // namespace v8::internal 589 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698