| 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 #ifndef V8_HEAP_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
| 6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
| 7 | 7 |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 void RememberUnmappedPage(Address page, bool compacted); | 1343 void RememberUnmappedPage(Address page, bool compacted); |
| 1344 | 1344 |
| 1345 // Global inline caching age: it is incremented on some GCs after context | 1345 // Global inline caching age: it is incremented on some GCs after context |
| 1346 // disposal. We use it to flush inline caches. | 1346 // disposal. We use it to flush inline caches. |
| 1347 int global_ic_age() { return global_ic_age_; } | 1347 int global_ic_age() { return global_ic_age_; } |
| 1348 | 1348 |
| 1349 void AgeInlineCaches() { | 1349 void AgeInlineCaches() { |
| 1350 global_ic_age_ = (global_ic_age_ + 1) & SharedFunctionInfo::ICAgeBits::kMax; | 1350 global_ic_age_ = (global_ic_age_ + 1) & SharedFunctionInfo::ICAgeBits::kMax; |
| 1351 } | 1351 } |
| 1352 | 1352 |
| 1353 bool flush_monomorphic_ics() { return flush_monomorphic_ics_; } | |
| 1354 | |
| 1355 int64_t amount_of_external_allocated_memory() { | 1353 int64_t amount_of_external_allocated_memory() { |
| 1356 return amount_of_external_allocated_memory_; | 1354 return amount_of_external_allocated_memory_; |
| 1357 } | 1355 } |
| 1358 | 1356 |
| 1359 void DeoptMarkedAllocationSites(); | 1357 void DeoptMarkedAllocationSites(); |
| 1360 | 1358 |
| 1361 bool MaximumSizeScavenge() { return maximum_size_scavenges_ > 0; } | 1359 bool MaximumSizeScavenge() { return maximum_size_scavenges_ > 0; } |
| 1362 | 1360 |
| 1363 bool DeoptMaybeTenuredAllocationSites() { | 1361 bool DeoptMaybeTenuredAllocationSites() { |
| 1364 return new_space_.IsAtMaximumCapacity() && maximum_size_scavenges_ == 0; | 1362 return new_space_.IsAtMaximumCapacity() && maximum_size_scavenges_ == 0; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1531 // For keeping track on when to flush RegExp code. | 1529 // For keeping track on when to flush RegExp code. |
| 1532 int sweep_generation_; | 1530 int sweep_generation_; |
| 1533 | 1531 |
| 1534 int always_allocate_scope_depth_; | 1532 int always_allocate_scope_depth_; |
| 1535 | 1533 |
| 1536 // For keeping track of context disposals. | 1534 // For keeping track of context disposals. |
| 1537 int contexts_disposed_; | 1535 int contexts_disposed_; |
| 1538 | 1536 |
| 1539 int global_ic_age_; | 1537 int global_ic_age_; |
| 1540 | 1538 |
| 1541 bool flush_monomorphic_ics_; | |
| 1542 | |
| 1543 int scan_on_scavenge_pages_; | 1539 int scan_on_scavenge_pages_; |
| 1544 | 1540 |
| 1545 NewSpace new_space_; | 1541 NewSpace new_space_; |
| 1546 OldSpace* old_pointer_space_; | 1542 OldSpace* old_pointer_space_; |
| 1547 OldSpace* old_data_space_; | 1543 OldSpace* old_data_space_; |
| 1548 OldSpace* code_space_; | 1544 OldSpace* code_space_; |
| 1549 MapSpace* map_space_; | 1545 MapSpace* map_space_; |
| 1550 CellSpace* cell_space_; | 1546 CellSpace* cell_space_; |
| 1551 PropertyCellSpace* property_cell_space_; | 1547 PropertyCellSpace* property_cell_space_; |
| 1552 LargeObjectSpace* lo_space_; | 1548 LargeObjectSpace* lo_space_; |
| (...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2588 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2584 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2589 | 2585 |
| 2590 private: | 2586 private: |
| 2591 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2587 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2592 }; | 2588 }; |
| 2593 #endif // DEBUG | 2589 #endif // DEBUG |
| 2594 } | 2590 } |
| 2595 } // namespace v8::internal | 2591 } // namespace v8::internal |
| 2596 | 2592 |
| 2597 #endif // V8_HEAP_HEAP_H_ | 2593 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |