| 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 Space* owner) { | 408 Space* owner) { |
| 409 MemoryChunk* chunk = FromAddress(base); | 409 MemoryChunk* chunk = FromAddress(base); |
| 410 | 410 |
| 411 ASSERT(base == chunk->address()); | 411 ASSERT(base == chunk->address()); |
| 412 | 412 |
| 413 chunk->heap_ = heap; | 413 chunk->heap_ = heap; |
| 414 chunk->size_ = size; | 414 chunk->size_ = size; |
| 415 chunk->flags_ = 0; | 415 chunk->flags_ = 0; |
| 416 chunk->set_owner(owner); | 416 chunk->set_owner(owner); |
| 417 chunk->markbits()->Clear(); | 417 chunk->markbits()->Clear(); |
| 418 chunk->set_scan_on_scavenge(false); | 418 chunk->initialize_scan_on_scavenge(false); |
| 419 ASSERT(OFFSET_OF(MemoryChunk, scan_on_scavenge_) == kScanOnScavengeOffset); |
| 420 ASSERT(OFFSET_OF(MemoryChunk, flags_) == kFlagsOffset); |
| 419 | 421 |
| 420 if (executable == EXECUTABLE) chunk->SetFlag(IS_EXECUTABLE); | 422 if (executable == EXECUTABLE) chunk->SetFlag(IS_EXECUTABLE); |
| 421 | 423 |
| 422 if (owner == heap->old_data_space()) chunk->SetFlag(CONTAINS_ONLY_DATA); | 424 if (owner == heap->old_data_space()) chunk->SetFlag(CONTAINS_ONLY_DATA); |
| 423 | 425 |
| 424 return chunk; | 426 return chunk; |
| 425 } | 427 } |
| 426 | 428 |
| 427 | 429 |
| 428 void MemoryChunk::InsertAfter(MemoryChunk* other) { | 430 void MemoryChunk::InsertAfter(MemoryChunk* other) { |
| (...skipping 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2213 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) { | 2215 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) { |
| 2214 if (obj->IsCode()) { | 2216 if (obj->IsCode()) { |
| 2215 Code* code = Code::cast(obj); | 2217 Code* code = Code::cast(obj); |
| 2216 isolate->code_kind_statistics()[code->kind()] += code->Size(); | 2218 isolate->code_kind_statistics()[code->kind()] += code->Size(); |
| 2217 } | 2219 } |
| 2218 } | 2220 } |
| 2219 } | 2221 } |
| 2220 #endif // DEBUG | 2222 #endif // DEBUG |
| 2221 | 2223 |
| 2222 } } // namespace v8::internal | 2224 } } // namespace v8::internal |
| OLD | NEW |