| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2507 // in map space. | 2507 // in map space. |
| 2508 Map* map = object->map(); | 2508 Map* map = object->map(); |
| 2509 ASSERT(map->IsMap()); | 2509 ASSERT(map->IsMap()); |
| 2510 ASSERT(heap()->map_space()->Contains(map)); | 2510 ASSERT(heap()->map_space()->Contains(map)); |
| 2511 | 2511 |
| 2512 // We have only code, sequential strings, external strings | 2512 // We have only code, sequential strings, external strings |
| 2513 // (sequential strings that have been morphed into external | 2513 // (sequential strings that have been morphed into external |
| 2514 // strings), fixed arrays, and byte arrays in large object space. | 2514 // strings), fixed arrays, and byte arrays in large object space. |
| 2515 ASSERT(object->IsCode() || object->IsSeqString() || | 2515 ASSERT(object->IsCode() || object->IsSeqString() || |
| 2516 object->IsExternalString() || object->IsFixedArray() || | 2516 object->IsExternalString() || object->IsFixedArray() || |
| 2517 object->IsByteArray()); | 2517 object->IsFixedDoubleArray() || object->IsByteArray()); |
| 2518 | 2518 |
| 2519 // The object itself should look OK. | 2519 // The object itself should look OK. |
| 2520 object->Verify(); | 2520 object->Verify(); |
| 2521 | 2521 |
| 2522 // Byte arrays and strings don't have interior pointers. | 2522 // Byte arrays and strings don't have interior pointers. |
| 2523 if (object->IsCode()) { | 2523 if (object->IsCode()) { |
| 2524 VerifyPointersVisitor code_visitor; | 2524 VerifyPointersVisitor code_visitor; |
| 2525 object->IterateBody(map->instance_type(), | 2525 object->IterateBody(map->instance_type(), |
| 2526 object->Size(), | 2526 object->Size(), |
| 2527 &code_visitor); | 2527 &code_visitor); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2570 for (HeapObject* obj = obj_it.Next(); obj != NULL; obj = obj_it.Next()) { | 2570 for (HeapObject* obj = obj_it.Next(); obj != NULL; obj = obj_it.Next()) { |
| 2571 if (obj->IsCode()) { | 2571 if (obj->IsCode()) { |
| 2572 Code* code = Code::cast(obj); | 2572 Code* code = Code::cast(obj); |
| 2573 isolate->code_kind_statistics()[code->kind()] += code->Size(); | 2573 isolate->code_kind_statistics()[code->kind()] += code->Size(); |
| 2574 } | 2574 } |
| 2575 } | 2575 } |
| 2576 } | 2576 } |
| 2577 #endif // DEBUG | 2577 #endif // DEBUG |
| 2578 | 2578 |
| 2579 } } // namespace v8::internal | 2579 } } // namespace v8::internal |
| OLD | NEW |