OLD | NEW |
1 // Copyright 2012 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 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 | 63 |
64 void HeapObject::PrintHeader(FILE* out, const char* id) { | 64 void HeapObject::PrintHeader(FILE* out, const char* id) { |
65 PrintF(out, "%p: [%s]\n", reinterpret_cast<void*>(this), id); | 65 PrintF(out, "%p: [%s]\n", reinterpret_cast<void*>(this), id); |
66 } | 66 } |
67 | 67 |
68 | 68 |
69 void HeapObject::HeapObjectPrint(FILE* out) { | 69 void HeapObject::HeapObjectPrint(FILE* out) { |
70 InstanceType instance_type = map()->instance_type(); | 70 InstanceType instance_type = map()->instance_type(); |
71 | 71 |
72 HandleScope scope; | 72 HandleScope scope(GetIsolate()); |
73 if (instance_type < FIRST_NONSTRING_TYPE) { | 73 if (instance_type < FIRST_NONSTRING_TYPE) { |
74 String::cast(this)->StringPrint(out); | 74 String::cast(this)->StringPrint(out); |
75 return; | 75 return; |
76 } | 76 } |
77 | 77 |
78 switch (instance_type) { | 78 switch (instance_type) { |
79 case MAP_TYPE: | 79 case MAP_TYPE: |
80 Map::cast(this)->MapPrint(out); | 80 Map::cast(this)->MapPrint(out); |
81 break; | 81 break; |
82 case HEAP_NUMBER_TYPE: | 82 case HEAP_NUMBER_TYPE: |
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 } | 1133 } |
1134 } | 1134 } |
1135 PrintF(out, "\n"); | 1135 PrintF(out, "\n"); |
1136 } | 1136 } |
1137 | 1137 |
1138 | 1138 |
1139 #endif // OBJECT_PRINT | 1139 #endif // OBJECT_PRINT |
1140 | 1140 |
1141 | 1141 |
1142 } } // namespace v8::internal | 1142 } } // namespace v8::internal |
OLD | NEW |