| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 Loading... |
| 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->HasFastElements()) { | 430 if (array->HasFastObjectElements()) { |
| 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 Loading... |
| 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 |
| OLD | NEW |