OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 // Converts the given boolean condition to JavaScript boolean value. | 630 // Converts the given boolean condition to JavaScript boolean value. |
631 static Object* ToBoolean(bool condition) { | 631 static Object* ToBoolean(bool condition) { |
632 return condition ? true_value() : false_value(); | 632 return condition ? true_value() : false_value(); |
633 } | 633 } |
634 | 634 |
635 // Code that should be run before and after each GC. Includes some | 635 // Code that should be run before and after each GC. Includes some |
636 // reporting/verification activities when compiled with DEBUG set. | 636 // reporting/verification activities when compiled with DEBUG set. |
637 static void GarbageCollectionPrologue(); | 637 static void GarbageCollectionPrologue(); |
638 static void GarbageCollectionEpilogue(); | 638 static void GarbageCollectionEpilogue(); |
639 | 639 |
640 // Code that should be executed after the garbage collection proper. | |
641 static void PostGarbageCollectionProcessing(); | |
642 | |
643 // Performs garbage collection operation. | 640 // Performs garbage collection operation. |
644 // Returns whether required_space bytes are available after the collection. | 641 // Returns whether required_space bytes are available after the collection. |
645 static bool CollectGarbage(int required_space, AllocationSpace space); | 642 static bool CollectGarbage(int required_space, AllocationSpace space); |
646 | 643 |
647 // Performs a full garbage collection. Force compaction if the | 644 // Performs a full garbage collection. Force compaction if the |
648 // parameter is true. | 645 // parameter is true. |
649 static void CollectAllGarbage(bool force_compaction); | 646 static void CollectAllGarbage(bool force_compaction); |
650 | 647 |
651 // Performs a full garbage collection if a context has been disposed | 648 // Performs a full garbage collection if a context has been disposed |
652 // since the last time the check was performed. | 649 // since the last time the check was performed. |
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1592 } | 1589 } |
1593 static TranscendentalCache* caches_[kNumberOfCaches]; | 1590 static TranscendentalCache* caches_[kNumberOfCaches]; |
1594 Element elements_[kCacheSize]; | 1591 Element elements_[kCacheSize]; |
1595 Type type_; | 1592 Type type_; |
1596 }; | 1593 }; |
1597 | 1594 |
1598 | 1595 |
1599 } } // namespace v8::internal | 1596 } } // namespace v8::internal |
1600 | 1597 |
1601 #endif // V8_HEAP_H_ | 1598 #endif // V8_HEAP_H_ |
OLD | NEW |