| 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 5541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5552 | 5552 |
| 5553 // Set up the special root array entries containing the stack limits. | 5553 // Set up the special root array entries containing the stack limits. |
| 5554 // These are actually addresses, but the tag makes the GC ignore it. | 5554 // These are actually addresses, but the tag makes the GC ignore it. |
| 5555 roots_[kStackLimitRootIndex] = reinterpret_cast<Object*>( | 5555 roots_[kStackLimitRootIndex] = reinterpret_cast<Object*>( |
| 5556 (isolate_->stack_guard()->jslimit() & ~kSmiTagMask) | kSmiTag); | 5556 (isolate_->stack_guard()->jslimit() & ~kSmiTagMask) | kSmiTag); |
| 5557 roots_[kRealStackLimitRootIndex] = reinterpret_cast<Object*>( | 5557 roots_[kRealStackLimitRootIndex] = reinterpret_cast<Object*>( |
| 5558 (isolate_->stack_guard()->real_jslimit() & ~kSmiTagMask) | kSmiTag); | 5558 (isolate_->stack_guard()->real_jslimit() & ~kSmiTagMask) | kSmiTag); |
| 5559 } | 5559 } |
| 5560 | 5560 |
| 5561 | 5561 |
| 5562 void Heap::NotifyDeserializationComplete() { deserialization_complete_ = true; } | 5562 void Heap::NotifyDeserializationComplete() { |
| 5563 deserialization_complete_ = true; |
| 5564 #ifdef DEBUG |
| 5565 // All pages right after bootstrapping must be marked as never-evacuate. |
| 5566 PagedSpaces spaces(this); |
| 5567 for (PagedSpace* s = spaces.next(); s != NULL; s = spaces.next()) { |
| 5568 PageIterator it(s); |
| 5569 while (it.has_next()) CHECK(it.next()->NeverEvacuate()); |
| 5570 } |
| 5571 #endif // DEBUG |
| 5572 } |
| 5563 | 5573 |
| 5564 | 5574 |
| 5565 void Heap::TearDown() { | 5575 void Heap::TearDown() { |
| 5566 #ifdef VERIFY_HEAP | 5576 #ifdef VERIFY_HEAP |
| 5567 if (FLAG_verify_heap) { | 5577 if (FLAG_verify_heap) { |
| 5568 Verify(); | 5578 Verify(); |
| 5569 } | 5579 } |
| 5570 #endif | 5580 #endif |
| 5571 | 5581 |
| 5572 UpdateMaximumCommitted(); | 5582 UpdateMaximumCommitted(); |
| (...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6526 static_cast<int>(object_sizes_last_time_[index])); | 6536 static_cast<int>(object_sizes_last_time_[index])); |
| 6527 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6537 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 6528 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6538 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 6529 | 6539 |
| 6530 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6540 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 6531 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6541 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 6532 ClearObjectStats(); | 6542 ClearObjectStats(); |
| 6533 } | 6543 } |
| 6534 } | 6544 } |
| 6535 } // namespace v8::internal | 6545 } // namespace v8::internal |
| OLD | NEW |