| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
| (...skipping 6483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6494 } else { | 6494 } else { |
| 6495 strong_roots_list_ = next; | 6495 strong_roots_list_ = next; |
| 6496 } | 6496 } |
| 6497 delete list; | 6497 delete list; |
| 6498 } else { | 6498 } else { |
| 6499 prev = list; | 6499 prev = list; |
| 6500 } | 6500 } |
| 6501 list = next; | 6501 list = next; |
| 6502 } | 6502 } |
| 6503 } | 6503 } |
| 6504 |
| 6505 |
| 6506 const char* Heap::GetObjectTypeName(size_t index) { |
| 6507 if (index >= OBJECT_STATS_COUNT) return nullptr; |
| 6508 |
| 6509 switch (static_cast<int>(index)) { |
| 6510 #define COMPARE_AND_RETURN_NAME(name) \ |
| 6511 case name: \ |
| 6512 return #name; |
| 6513 INSTANCE_TYPE_LIST(COMPARE_AND_RETURN_NAME) |
| 6514 #undef COMPARE_AND_RETURN_NAME |
| 6515 #define COMPARE_AND_RETURN_NAME(name) \ |
| 6516 case FIRST_CODE_KIND_SUB_TYPE + Code::name: \ |
| 6517 return "CODE_TYPE/CODE_KIND/" #name; |
| 6518 CODE_KIND_LIST(COMPARE_AND_RETURN_NAME) |
| 6519 #undef COMPARE_AND_RETURN_NAME |
| 6520 #define COMPARE_AND_RETURN_NAME(name) \ |
| 6521 case FIRST_FIXED_ARRAY_SUB_TYPE + name: \ |
| 6522 return "FIXED_ARRAY_TYPE/" #name; |
| 6523 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(COMPARE_AND_RETURN_NAME) |
| 6524 #undef COMPARE_AND_RETURN_NAME |
| 6525 #define COMPARE_AND_RETURN_NAME(name) \ |
| 6526 case FIRST_CODE_AGE_SUB_TYPE + Code::k##name##CodeAge - Code::kFirstCodeAge: \ |
| 6527 return "CODE_TYPE/CODE_AGE/" #name; |
| 6528 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
| 6529 #undef COMPARE_AND_RETURN_NAME |
| 6530 } |
| 6531 return nullptr; |
| 6532 } |
| 6504 } | 6533 } |
| 6505 } // namespace v8::internal | 6534 } // namespace v8::internal |
| OLD | NEW |