| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/string-stream.h" | 5 #include "src/string-stream.h" |
| 6 | 6 |
| 7 #include "src/handles-inl.h" | 7 #include "src/handles-inl.h" |
| 8 #include "src/prototype.h" | 8 #include "src/prototype.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 } | 336 } |
| 337 for (; len < 18; len++) | 337 for (; len < 18; len++) |
| 338 Put(' '); | 338 Put(' '); |
| 339 if (key->IsString()) { | 339 if (key->IsString()) { |
| 340 Put(String::cast(key)); | 340 Put(String::cast(key)); |
| 341 } else { | 341 } else { |
| 342 key->ShortPrint(); | 342 key->ShortPrint(); |
| 343 } | 343 } |
| 344 Add(": "); | 344 Add(": "); |
| 345 FieldIndex index = FieldIndex::ForDescriptor(map, i); | 345 FieldIndex index = FieldIndex::ForDescriptor(map, i); |
| 346 Object* value = js_object->RawFastPropertyAt(index); | 346 if (map->IsUnboxedDoubleField(index)) { |
| 347 Add("%o\n", value); | 347 Add("<unboxed double> %.16g\n", |
| 348 js_object->RawFastDoublePropertyAt(index)); |
| 349 } else { |
| 350 Object* value = js_object->RawFastPropertyAt(index); |
| 351 Add("%o\n", value); |
| 352 } |
| 348 } | 353 } |
| 349 } | 354 } |
| 350 } | 355 } |
| 351 } | 356 } |
| 352 | 357 |
| 353 | 358 |
| 354 void StringStream::PrintFixedArray(FixedArray* array, unsigned int limit) { | 359 void StringStream::PrintFixedArray(FixedArray* array, unsigned int limit) { |
| 355 Heap* heap = array->GetHeap(); | 360 Heap* heap = array->GetHeap(); |
| 356 for (unsigned int i = 0; i < 10 && i < limit; i++) { | 361 for (unsigned int i = 0; i < 10 && i < limit; i++) { |
| 357 Object* element = array->get(i); | 362 Object* element = array->get(i); |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 } | 548 } |
| 544 MemCopy(new_space, space_, *bytes); | 549 MemCopy(new_space, space_, *bytes); |
| 545 *bytes = new_bytes; | 550 *bytes = new_bytes; |
| 546 DeleteArray(space_); | 551 DeleteArray(space_); |
| 547 space_ = new_space; | 552 space_ = new_space; |
| 548 return new_space; | 553 return new_space; |
| 549 } | 554 } |
| 550 | 555 |
| 551 | 556 |
| 552 } } // namespace v8::internal | 557 } } // namespace v8::internal |
| OLD | NEW |