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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/handles-inl.h" | 9 #include "src/handles-inl.h" |
10 #include "src/log.h" | 10 #include "src/log.h" |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 if (!js_object->GetHeap()->Contains(map) || | 297 if (!js_object->GetHeap()->Contains(map) || |
298 !map->IsHeapObject() || | 298 !map->IsHeapObject() || |
299 !map->IsMap()) { | 299 !map->IsMap()) { |
300 Add("<Invalid map>\n"); | 300 Add("<Invalid map>\n"); |
301 return; | 301 return; |
302 } | 302 } |
303 int real_size = map->NumberOfOwnDescriptors(); | 303 int real_size = map->NumberOfOwnDescriptors(); |
304 DescriptorArray* descs = map->instance_descriptors(); | 304 DescriptorArray* descs = map->instance_descriptors(); |
305 for (int i = 0; i < real_size; i++) { | 305 for (int i = 0; i < real_size; i++) { |
306 PropertyDetails details = descs->GetDetails(i); | 306 PropertyDetails details = descs->GetDetails(i); |
307 if (details.type() == DATA) { | 307 if (details.location() == kField) { |
| 308 DCHECK_EQ(kData, details.kind()); |
308 Object* key = descs->GetKey(i); | 309 Object* key = descs->GetKey(i); |
309 if (key->IsString() || key->IsNumber()) { | 310 if (key->IsString() || key->IsNumber()) { |
310 int len = 3; | 311 int len = 3; |
311 if (key->IsString()) { | 312 if (key->IsString()) { |
312 len = String::cast(key)->length(); | 313 len = String::cast(key)->length(); |
313 } | 314 } |
314 for (; len < 18; len++) | 315 for (; len < 18; len++) |
315 Put(' '); | 316 Put(' '); |
316 if (key->IsString()) { | 317 if (key->IsString()) { |
317 Put(String::cast(key)); | 318 Put(String::cast(key)); |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 MemCopy(new_space, space_, *bytes); | 535 MemCopy(new_space, space_, *bytes); |
535 *bytes = new_bytes; | 536 *bytes = new_bytes; |
536 DeleteArray(space_); | 537 DeleteArray(space_); |
537 space_ = new_space; | 538 space_ = new_space; |
538 return new_space; | 539 return new_space; |
539 } | 540 } |
540 | 541 |
541 | 542 |
542 } // namespace internal | 543 } // namespace internal |
543 } // namespace v8 | 544 } // namespace v8 |
OLD | NEW |