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 Object* key = descs->GetKey(i); | 308 Object* key = descs->GetKey(i); |
309 if (key->IsString() || key->IsNumber()) { | 309 if (key->IsString() || key->IsNumber()) { |
310 int len = 3; | 310 int len = 3; |
311 if (key->IsString()) { | 311 if (key->IsString()) { |
312 len = String::cast(key)->length(); | 312 len = String::cast(key)->length(); |
313 } | 313 } |
314 for (; len < 18; len++) | 314 for (; len < 18; len++) |
315 Put(' '); | 315 Put(' '); |
316 if (key->IsString()) { | 316 if (key->IsString()) { |
317 Put(String::cast(key)); | 317 Put(String::cast(key)); |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 MemCopy(new_space, space_, *bytes); | 534 MemCopy(new_space, space_, *bytes); |
535 *bytes = new_bytes; | 535 *bytes = new_bytes; |
536 DeleteArray(space_); | 536 DeleteArray(space_); |
537 space_ = new_space; | 537 space_ = new_space; |
538 return new_space; | 538 return new_space; |
539 } | 539 } |
540 | 540 |
541 | 541 |
542 } // namespace internal | 542 } // namespace internal |
543 } // namespace v8 | 543 } // namespace v8 |
OLD | NEW |