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/heap/mark-compact.h" | 5 #include "src/heap/mark-compact.h" |
6 | 6 |
7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/base/sys-info.h" | 9 #include "src/base/sys-info.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 | 901 |
902 // Clear the marking state of live large objects. | 902 // Clear the marking state of live large objects. |
903 heap_->lo_space()->ClearMarkingStateOfLiveObjects(); | 903 heap_->lo_space()->ClearMarkingStateOfLiveObjects(); |
904 | 904 |
905 #ifdef DEBUG | 905 #ifdef DEBUG |
906 DCHECK(state_ == SWEEP_SPACES || state_ == RELOCATE_OBJECTS); | 906 DCHECK(state_ == SWEEP_SPACES || state_ == RELOCATE_OBJECTS); |
907 state_ = IDLE; | 907 state_ = IDLE; |
908 #endif | 908 #endif |
909 heap_->isolate()->inner_pointer_to_code_cache()->Flush(); | 909 heap_->isolate()->inner_pointer_to_code_cache()->Flush(); |
910 | 910 |
911 // The stub cache is not traversed during GC; clear the cache to | 911 // The stub caches are not traversed during GC; clear them to force |
912 // force lazy re-initialization of it. This must be done after the | 912 // their lazy re-initialization. This must be done after the |
913 // GC, because it relies on the new address of certain old space | 913 // GC, because it relies on the new address of certain old space |
914 // objects (empty string, illegal builtin). | 914 // objects (empty string, illegal builtin). |
915 isolate()->stub_cache()->Clear(); | 915 isolate()->load_stub_cache()->Clear(); |
| 916 isolate()->store_stub_cache()->Clear(); |
916 | 917 |
917 if (have_code_to_deoptimize_) { | 918 if (have_code_to_deoptimize_) { |
918 // Some code objects were marked for deoptimization during the GC. | 919 // Some code objects were marked for deoptimization during the GC. |
919 Deoptimizer::DeoptimizeMarkedCode(isolate()); | 920 Deoptimizer::DeoptimizeMarkedCode(isolate()); |
920 have_code_to_deoptimize_ = false; | 921 have_code_to_deoptimize_ = false; |
921 } | 922 } |
922 | 923 |
923 heap_->incremental_marking()->ClearIdleMarkingDelayCounter(); | 924 heap_->incremental_marking()->ClearIdleMarkingDelayCounter(); |
924 | 925 |
925 if (marking_parity_ == EVEN_MARKING_PARITY) { | 926 if (marking_parity_ == EVEN_MARKING_PARITY) { |
(...skipping 3160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4086 // The target is always in old space, we don't have to record the slot in | 4087 // The target is always in old space, we don't have to record the slot in |
4087 // the old-to-new remembered set. | 4088 // the old-to-new remembered set. |
4088 DCHECK(!heap()->InNewSpace(target)); | 4089 DCHECK(!heap()->InNewSpace(target)); |
4089 RecordRelocSlot(host, &rinfo, target); | 4090 RecordRelocSlot(host, &rinfo, target); |
4090 } | 4091 } |
4091 } | 4092 } |
4092 } | 4093 } |
4093 | 4094 |
4094 } // namespace internal | 4095 } // namespace internal |
4095 } // namespace v8 | 4096 } // namespace v8 |
OLD | NEW |