OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 | 598 |
599 for (int i = 0; i < gc_prologue_callbacks_.length(); ++i) { | 599 for (int i = 0; i < gc_prologue_callbacks_.length(); ++i) { |
600 if (gc_type & gc_prologue_callbacks_[i].gc_type) { | 600 if (gc_type & gc_prologue_callbacks_[i].gc_type) { |
601 gc_prologue_callbacks_[i].callback(gc_type, kNoGCCallbackFlags); | 601 gc_prologue_callbacks_[i].callback(gc_type, kNoGCCallbackFlags); |
602 } | 602 } |
603 } | 603 } |
604 | 604 |
605 EnsureFromSpaceIsCommitted(); | 605 EnsureFromSpaceIsCommitted(); |
606 | 606 |
607 if (collector == MARK_COMPACTOR) { | 607 if (collector == MARK_COMPACTOR) { |
608 // Flush all potentially unused code. | 608 if (FLAG_flush_code) { |
609 FlushCode(); | 609 // Flush all potentially unused code. |
| 610 FlushCode(); |
| 611 } |
610 | 612 |
611 // Perform mark-sweep with optional compaction. | 613 // Perform mark-sweep with optional compaction. |
612 MarkCompact(tracer); | 614 MarkCompact(tracer); |
613 | 615 |
614 int old_gen_size = PromotedSpaceSize(); | 616 int old_gen_size = PromotedSpaceSize(); |
615 old_gen_promotion_limit_ = | 617 old_gen_promotion_limit_ = |
616 old_gen_size + Max(kMinimumPromotionLimit, old_gen_size / 3); | 618 old_gen_size + Max(kMinimumPromotionLimit, old_gen_size / 3); |
617 old_gen_allocation_limit_ = | 619 old_gen_allocation_limit_ = |
618 old_gen_size + Max(kMinimumAllocationLimit, old_gen_size / 2); | 620 old_gen_size + Max(kMinimumAllocationLimit, old_gen_size / 2); |
619 old_gen_exhausted_ = false; | 621 old_gen_exhausted_ = false; |
(...skipping 4118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4738 void ExternalStringTable::TearDown() { | 4740 void ExternalStringTable::TearDown() { |
4739 new_space_strings_.Free(); | 4741 new_space_strings_.Free(); |
4740 old_space_strings_.Free(); | 4742 old_space_strings_.Free(); |
4741 } | 4743 } |
4742 | 4744 |
4743 | 4745 |
4744 List<Object*> ExternalStringTable::new_space_strings_; | 4746 List<Object*> ExternalStringTable::new_space_strings_; |
4745 List<Object*> ExternalStringTable::old_space_strings_; | 4747 List<Object*> ExternalStringTable::old_space_strings_; |
4746 | 4748 |
4747 } } // namespace v8::internal | 4749 } } // namespace v8::internal |
OLD | NEW |