OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 incremental_marking()->IsStopped() && | 696 incremental_marking()->IsStopped() && |
697 incremental_marking()->WorthActivating() && | 697 incremental_marking()->WorthActivating() && |
698 NextGCIsLikelyToBeFull()) { | 698 NextGCIsLikelyToBeFull()) { |
699 incremental_marking()->Start(); | 699 incremental_marking()->Start(); |
700 } | 700 } |
701 | 701 |
702 return next_gc_likely_to_collect_more; | 702 return next_gc_likely_to_collect_more; |
703 } | 703 } |
704 | 704 |
705 | 705 |
706 int Heap::NotifyContextDisposed() { | |
707 if (FLAG_parallel_recompilation) { | |
708 // Flush the queued recompilation tasks. | |
709 isolate()->optimizing_compiler_thread()->Flush(); | |
710 } | |
711 flush_monomorphic_ics_ = true; | |
712 return ++contexts_disposed_; | |
713 } | |
714 | |
715 | |
716 void Heap::PerformScavenge() { | 706 void Heap::PerformScavenge() { |
717 GCTracer tracer(this, NULL, NULL); | 707 GCTracer tracer(this, NULL, NULL); |
718 if (incremental_marking()->IsStopped()) { | 708 if (incremental_marking()->IsStopped()) { |
719 PerformGarbageCollection(SCAVENGER, &tracer); | 709 PerformGarbageCollection(SCAVENGER, &tracer); |
720 } else { | 710 } else { |
721 PerformGarbageCollection(MARK_COMPACTOR, &tracer); | 711 PerformGarbageCollection(MARK_COMPACTOR, &tracer); |
722 } | 712 } |
723 } | 713 } |
724 | 714 |
725 | 715 |
(...skipping 2484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3210 { MaybeObject* maybe_obj = AllocateJSObjectFromMap(Map::cast(obj)); | 3200 { MaybeObject* maybe_obj = AllocateJSObjectFromMap(Map::cast(obj)); |
3211 if (!maybe_obj->ToObject(&obj)) return false; | 3201 if (!maybe_obj->ToObject(&obj)) return false; |
3212 } | 3202 } |
3213 set_observation_state(JSObject::cast(obj)); | 3203 set_observation_state(JSObject::cast(obj)); |
3214 | 3204 |
3215 { MaybeObject* maybe_obj = AllocateSymbol(); | 3205 { MaybeObject* maybe_obj = AllocateSymbol(); |
3216 if (!maybe_obj->ToObject(&obj)) return false; | 3206 if (!maybe_obj->ToObject(&obj)) return false; |
3217 } | 3207 } |
3218 set_frozen_symbol(Symbol::cast(obj)); | 3208 set_frozen_symbol(Symbol::cast(obj)); |
3219 | 3209 |
| 3210 { MaybeObject* maybe_obj = AllocateSymbol(); |
| 3211 if (!maybe_obj->ToObject(&obj)) return false; |
| 3212 } |
| 3213 set_elements_transition_symbol(Symbol::cast(obj)); |
| 3214 |
3220 { MaybeObject* maybe_obj = SeededNumberDictionary::Allocate(this, 0, TENURED); | 3215 { MaybeObject* maybe_obj = SeededNumberDictionary::Allocate(this, 0, TENURED); |
3221 if (!maybe_obj->ToObject(&obj)) return false; | 3216 if (!maybe_obj->ToObject(&obj)) return false; |
3222 } | 3217 } |
3223 SeededNumberDictionary::cast(obj)->set_requires_slow_elements(); | 3218 SeededNumberDictionary::cast(obj)->set_requires_slow_elements(); |
3224 set_empty_slow_element_dictionary(SeededNumberDictionary::cast(obj)); | 3219 set_empty_slow_element_dictionary(SeededNumberDictionary::cast(obj)); |
3225 | 3220 |
3226 { MaybeObject* maybe_obj = AllocateSymbol(); | 3221 { MaybeObject* maybe_obj = AllocateSymbol(); |
3227 if (!maybe_obj->ToObject(&obj)) return false; | 3222 if (!maybe_obj->ToObject(&obj)) return false; |
3228 } | 3223 } |
3229 set_observed_symbol(Symbol::cast(obj)); | 3224 set_observed_symbol(Symbol::cast(obj)); |
(...skipping 3723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6953 PrintF("total_sweeping_time=%.1f ", sweeping_time()); | 6948 PrintF("total_sweeping_time=%.1f ", sweeping_time()); |
6954 PrintF("\n\n"); | 6949 PrintF("\n\n"); |
6955 } | 6950 } |
6956 | 6951 |
6957 TearDownArrayBuffers(); | 6952 TearDownArrayBuffers(); |
6958 | 6953 |
6959 isolate_->global_handles()->TearDown(); | 6954 isolate_->global_handles()->TearDown(); |
6960 | 6955 |
6961 external_string_table_.TearDown(); | 6956 external_string_table_.TearDown(); |
6962 | 6957 |
| 6958 mark_compact_collector()->TearDown(); |
| 6959 |
6963 new_space_.TearDown(); | 6960 new_space_.TearDown(); |
6964 | 6961 |
6965 if (old_pointer_space_ != NULL) { | 6962 if (old_pointer_space_ != NULL) { |
6966 old_pointer_space_->TearDown(); | 6963 old_pointer_space_->TearDown(); |
6967 delete old_pointer_space_; | 6964 delete old_pointer_space_; |
6968 old_pointer_space_ = NULL; | 6965 old_pointer_space_ = NULL; |
6969 } | 6966 } |
6970 | 6967 |
6971 if (old_data_space_ != NULL) { | 6968 if (old_data_space_ != NULL) { |
6972 old_data_space_->TearDown(); | 6969 old_data_space_->TearDown(); |
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8044 if (FLAG_parallel_recompilation) { | 8041 if (FLAG_parallel_recompilation) { |
8045 heap_->relocation_mutex_->Lock(); | 8042 heap_->relocation_mutex_->Lock(); |
8046 #ifdef DEBUG | 8043 #ifdef DEBUG |
8047 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 8044 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
8048 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 8045 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
8049 #endif // DEBUG | 8046 #endif // DEBUG |
8050 } | 8047 } |
8051 } | 8048 } |
8052 | 8049 |
8053 } } // namespace v8::internal | 8050 } } // namespace v8::internal |
OLD | NEW |