| 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 5602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5613 | 5613 |
| 5614 // Set up the special root array entries containing the stack limits. | 5614 // Set up the special root array entries containing the stack limits. |
| 5615 // These are actually addresses, but the tag makes the GC ignore it. | 5615 // These are actually addresses, but the tag makes the GC ignore it. |
| 5616 roots_[kStackLimitRootIndex] = reinterpret_cast<Object*>( | 5616 roots_[kStackLimitRootIndex] = reinterpret_cast<Object*>( |
| 5617 (isolate_->stack_guard()->jslimit() & ~kSmiTagMask) | kSmiTag); | 5617 (isolate_->stack_guard()->jslimit() & ~kSmiTagMask) | kSmiTag); |
| 5618 roots_[kRealStackLimitRootIndex] = reinterpret_cast<Object*>( | 5618 roots_[kRealStackLimitRootIndex] = reinterpret_cast<Object*>( |
| 5619 (isolate_->stack_guard()->real_jslimit() & ~kSmiTagMask) | kSmiTag); | 5619 (isolate_->stack_guard()->real_jslimit() & ~kSmiTagMask) | kSmiTag); |
| 5620 } | 5620 } |
| 5621 | 5621 |
| 5622 | 5622 |
| 5623 void Heap::NotifyDeserializationComplete() { deserialization_complete_ = true; } | 5623 void Heap::NotifyDeserializationComplete() { |
| 5624 deserialization_complete_ = true; |
| 5625 #ifdef DEBUG |
| 5626 // All pages right after bootstrapping must be marked as never-evacuate. |
| 5627 PagedSpaces spaces(this); |
| 5628 for (PagedSpace* s = spaces.next(); s != NULL; s = spaces.next()) { |
| 5629 PageIterator it(s); |
| 5630 while (it.has_next()) CHECK(it.next()->NeverEvacuate()); |
| 5631 } |
| 5632 #endif // DEBUG |
| 5633 } |
| 5624 | 5634 |
| 5625 | 5635 |
| 5626 void Heap::TearDown() { | 5636 void Heap::TearDown() { |
| 5627 #ifdef VERIFY_HEAP | 5637 #ifdef VERIFY_HEAP |
| 5628 if (FLAG_verify_heap) { | 5638 if (FLAG_verify_heap) { |
| 5629 Verify(); | 5639 Verify(); |
| 5630 } | 5640 } |
| 5631 #endif | 5641 #endif |
| 5632 | 5642 |
| 5633 UpdateMaximumCommitted(); | 5643 UpdateMaximumCommitted(); |
| (...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6571 static_cast<int>(object_sizes_last_time_[index])); | 6581 static_cast<int>(object_sizes_last_time_[index])); |
| 6572 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6582 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 6573 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6583 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 6574 | 6584 |
| 6575 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6585 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 6576 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6586 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 6577 ClearObjectStats(); | 6587 ClearObjectStats(); |
| 6578 } | 6588 } |
| 6579 } | 6589 } |
| 6580 } // namespace v8::internal | 6590 } // namespace v8::internal |
| OLD | NEW |