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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // Will be 4 * reserved_semispace_size_ to ensure that young | 107 // Will be 4 * reserved_semispace_size_ to ensure that young |
108 // generation can be aligned to its size. | 108 // generation can be aligned to its size. |
109 int Heap::survived_since_last_expansion_ = 0; | 109 int Heap::survived_since_last_expansion_ = 0; |
110 int Heap::external_allocation_limit_ = 0; | 110 int Heap::external_allocation_limit_ = 0; |
111 | 111 |
112 Heap::HeapState Heap::gc_state_ = NOT_IN_GC; | 112 Heap::HeapState Heap::gc_state_ = NOT_IN_GC; |
113 | 113 |
114 int Heap::mc_count_ = 0; | 114 int Heap::mc_count_ = 0; |
115 int Heap::gc_count_ = 0; | 115 int Heap::gc_count_ = 0; |
116 | 116 |
117 int Heap::unflattended_strings_length_ = 0; | 117 int Heap::unflattened_strings_length_ = 0; |
118 | 118 |
119 int Heap::always_allocate_scope_depth_ = 0; | 119 int Heap::always_allocate_scope_depth_ = 0; |
120 int Heap::linear_allocation_scope_depth_ = 0; | 120 int Heap::linear_allocation_scope_depth_ = 0; |
121 int Heap::contexts_disposed_ = 0; | 121 int Heap::contexts_disposed_ = 0; |
122 | 122 |
123 #ifdef DEBUG | 123 #ifdef DEBUG |
124 bool Heap::allocation_allowed_ = true; | 124 bool Heap::allocation_allowed_ = true; |
125 | 125 |
126 int Heap::allocation_timeout_ = 0; | 126 int Heap::allocation_timeout_ = 0; |
127 bool Heap::disallow_allocation_failure_ = false; | 127 bool Heap::disallow_allocation_failure_ = false; |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 #elif defined(ENABLE_LOGGING_AND_PROFILING) | 297 #elif defined(ENABLE_LOGGING_AND_PROFILING) |
298 if (FLAG_log_gc) new_space_.ReportStatistics(); | 298 if (FLAG_log_gc) new_space_.ReportStatistics(); |
299 #endif | 299 #endif |
300 } | 300 } |
301 #endif // defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) | 301 #endif // defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) |
302 | 302 |
303 | 303 |
304 void Heap::GarbageCollectionPrologue() { | 304 void Heap::GarbageCollectionPrologue() { |
305 TranscendentalCache::Clear(); | 305 TranscendentalCache::Clear(); |
306 gc_count_++; | 306 gc_count_++; |
307 unflattended_strings_length_ = 0; | 307 unflattened_strings_length_ = 0; |
308 #ifdef DEBUG | 308 #ifdef DEBUG |
309 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); | 309 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); |
310 allow_allocation(false); | 310 allow_allocation(false); |
311 | 311 |
312 if (FLAG_verify_heap) { | 312 if (FLAG_verify_heap) { |
313 Verify(); | 313 Verify(); |
314 } | 314 } |
315 | 315 |
316 if (FLAG_gc_verbose) Print(); | 316 if (FLAG_gc_verbose) Print(); |
317 | 317 |
(...skipping 3986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4304 void ExternalStringTable::TearDown() { | 4304 void ExternalStringTable::TearDown() { |
4305 new_space_strings_.Free(); | 4305 new_space_strings_.Free(); |
4306 old_space_strings_.Free(); | 4306 old_space_strings_.Free(); |
4307 } | 4307 } |
4308 | 4308 |
4309 | 4309 |
4310 List<Object*> ExternalStringTable::new_space_strings_; | 4310 List<Object*> ExternalStringTable::new_space_strings_; |
4311 List<Object*> ExternalStringTable::old_space_strings_; | 4311 List<Object*> ExternalStringTable::old_space_strings_; |
4312 | 4312 |
4313 } } // namespace v8::internal | 4313 } } // namespace v8::internal |
OLD | NEW |