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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "double.h" | 7 #include "double.h" |
8 #include "factory.h" | 8 #include "factory.h" |
9 #include "hydrogen-infer-representation.h" | 9 #include "hydrogen-infer-representation.h" |
10 #include "property-details-inl.h" | 10 #include "property-details-inl.h" |
(...skipping 3800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3811 } | 3811 } |
3812 | 3812 |
3813 HInstruction* new_dominator_size_constant = HConstant::CreateAndInsertBefore( | 3813 HInstruction* new_dominator_size_constant = HConstant::CreateAndInsertBefore( |
3814 zone, | 3814 zone, |
3815 context(), | 3815 context(), |
3816 new_dominator_size, | 3816 new_dominator_size, |
3817 Representation::None(), | 3817 Representation::None(), |
3818 dominator_allocate); | 3818 dominator_allocate); |
3819 dominator_allocate->UpdateSize(new_dominator_size_constant); | 3819 dominator_allocate->UpdateSize(new_dominator_size_constant); |
3820 | 3820 |
| 3821 bool keep_new_space_iterable = FLAG_log_gc || FLAG_heap_stats; |
3821 #ifdef VERIFY_HEAP | 3822 #ifdef VERIFY_HEAP |
3822 if (FLAG_verify_heap && dominator_allocate->IsNewSpaceAllocation()) { | 3823 keep_new_space_iterable = keep_new_space_iterable || FLAG_verify_heap; |
| 3824 #endif |
| 3825 |
| 3826 if (keep_new_space_iterable && dominator_allocate->IsNewSpaceAllocation()) { |
3823 dominator_allocate->MakePrefillWithFiller(); | 3827 dominator_allocate->MakePrefillWithFiller(); |
3824 } else { | 3828 } else { |
3825 // TODO(hpayer): This is a short-term hack to make allocation mementos | 3829 // TODO(hpayer): This is a short-term hack to make allocation mementos |
3826 // work again in new space. | 3830 // work again in new space. |
3827 dominator_allocate->ClearNextMapWord(original_object_size); | 3831 dominator_allocate->ClearNextMapWord(original_object_size); |
3828 } | 3832 } |
3829 #else | |
3830 // TODO(hpayer): This is a short-term hack to make allocation mementos | |
3831 // work again in new space. | |
3832 dominator_allocate->ClearNextMapWord(original_object_size); | |
3833 #endif | |
3834 | 3833 |
3835 dominator_allocate->UpdateClearNextMapWord(MustClearNextMapWord()); | 3834 dominator_allocate->UpdateClearNextMapWord(MustClearNextMapWord()); |
3836 | 3835 |
3837 // After that replace the dominated allocate instruction. | 3836 // After that replace the dominated allocate instruction. |
3838 HInstruction* inner_offset = HConstant::CreateAndInsertBefore( | 3837 HInstruction* inner_offset = HConstant::CreateAndInsertBefore( |
3839 zone, | 3838 zone, |
3840 context(), | 3839 context(), |
3841 dominator_size_constant, | 3840 dominator_size_constant, |
3842 Representation::None(), | 3841 Representation::None(), |
3843 this); | 3842 this); |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4776 break; | 4775 break; |
4777 case kExternalMemory: | 4776 case kExternalMemory: |
4778 stream->Add("[external-memory]"); | 4777 stream->Add("[external-memory]"); |
4779 break; | 4778 break; |
4780 } | 4779 } |
4781 | 4780 |
4782 stream->Add("@%d", offset()); | 4781 stream->Add("@%d", offset()); |
4783 } | 4782 } |
4784 | 4783 |
4785 } } // namespace v8::internal | 4784 } } // namespace v8::internal |
OLD | NEW |