| 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 17 matching lines...) Expand all Loading... |
| 28 #include "v8.h" | 28 #include "v8.h" |
| 29 | 29 |
| 30 #include "liveobjectlist-inl.h" | 30 #include "liveobjectlist-inl.h" |
| 31 #include "macro-assembler.h" | 31 #include "macro-assembler.h" |
| 32 #include "mark-compact.h" | 32 #include "mark-compact.h" |
| 33 #include "platform.h" | 33 #include "platform.h" |
| 34 | 34 |
| 35 namespace v8 { | 35 namespace v8 { |
| 36 namespace internal { | 36 namespace internal { |
| 37 | 37 |
| 38 |
| 38 // ---------------------------------------------------------------------------- | 39 // ---------------------------------------------------------------------------- |
| 39 // HeapObjectIterator | 40 // HeapObjectIterator |
| 40 | 41 |
| 41 HeapObjectIterator::HeapObjectIterator(PagedSpace* space) { | 42 HeapObjectIterator::HeapObjectIterator(PagedSpace* space) { |
| 42 // You can't actually iterate over the anchor page. It is not a real page, | 43 // You can't actually iterate over the anchor page. It is not a real page, |
| 43 // just an anchor for the double linked page list. Initialize as if we have | 44 // just an anchor for the double linked page list. Initialize as if we have |
| 44 // reached the end of the anchor page, then the first iteration will move on | 45 // reached the end of the anchor page, then the first iteration will move on |
| 45 // to the first page. | 46 // to the first page. |
| 46 Initialize(space, | 47 Initialize(space, |
| 47 NULL, | 48 NULL, |
| (...skipping 2469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2517 for (HeapObject* obj = obj_it.Next(); obj != NULL; obj = obj_it.Next()) { | 2518 for (HeapObject* obj = obj_it.Next(); obj != NULL; obj = obj_it.Next()) { |
| 2518 if (obj->IsCode()) { | 2519 if (obj->IsCode()) { |
| 2519 Code* code = Code::cast(obj); | 2520 Code* code = Code::cast(obj); |
| 2520 isolate->code_kind_statistics()[code->kind()] += code->Size(); | 2521 isolate->code_kind_statistics()[code->kind()] += code->Size(); |
| 2521 } | 2522 } |
| 2522 } | 2523 } |
| 2523 } | 2524 } |
| 2524 #endif // DEBUG | 2525 #endif // DEBUG |
| 2525 | 2526 |
| 2526 } } // namespace v8::internal | 2527 } } // namespace v8::internal |
| OLD | NEW |