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_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
10 #include "src/builtins.h" | 10 #include "src/builtins.h" |
(...skipping 8485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8496 } | 8496 } |
8497 | 8497 |
8498 // The pretenuring decision is made during gc, and the zombie state allows | 8498 // The pretenuring decision is made during gc, and the zombie state allows |
8499 // us to recognize when an allocation site is just being kept alive because | 8499 // us to recognize when an allocation site is just being kept alive because |
8500 // a later traversal of new space may discover AllocationMementos that point | 8500 // a later traversal of new space may discover AllocationMementos that point |
8501 // to this AllocationSite. | 8501 // to this AllocationSite. |
8502 bool IsZombie() { | 8502 bool IsZombie() { |
8503 return pretenure_decision() == kZombie; | 8503 return pretenure_decision() == kZombie; |
8504 } | 8504 } |
8505 | 8505 |
| 8506 bool IsMaybeTenure() { |
| 8507 return pretenure_decision() == kMaybeTenure; |
| 8508 } |
| 8509 |
8506 inline void MarkZombie(); | 8510 inline void MarkZombie(); |
8507 | 8511 |
8508 inline bool MakePretenureDecision(PretenureDecision current_decision, | 8512 inline bool MakePretenureDecision(PretenureDecision current_decision, |
8509 double ratio, | 8513 double ratio, |
8510 bool maximum_size_scavenge); | 8514 bool maximum_size_scavenge); |
8511 | 8515 |
8512 inline bool DigestPretenuringFeedback(bool maximum_size_scavenge); | 8516 inline bool DigestPretenuringFeedback(bool maximum_size_scavenge); |
8513 | 8517 |
8514 ElementsKind GetElementsKind() { | 8518 ElementsKind GetElementsKind() { |
8515 ASSERT(!SitePointsToLiteral()); | 8519 ASSERT(!SitePointsToLiteral()); |
(...skipping 2555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11071 } else { | 11075 } else { |
11072 value &= ~(1 << bit_position); | 11076 value &= ~(1 << bit_position); |
11073 } | 11077 } |
11074 return value; | 11078 return value; |
11075 } | 11079 } |
11076 }; | 11080 }; |
11077 | 11081 |
11078 } } // namespace v8::internal | 11082 } } // namespace v8::internal |
11079 | 11083 |
11080 #endif // V8_OBJECTS_H_ | 11084 #endif // V8_OBJECTS_H_ |
OLD | NEW |