OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 8130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8141 inline void IncrementMementoFoundCount(); | 8141 inline void IncrementMementoFoundCount(); |
8142 | 8142 |
8143 inline void IncrementMementoCreateCount(); | 8143 inline void IncrementMementoCreateCount(); |
8144 | 8144 |
8145 PretenureFlag GetPretenureMode() { | 8145 PretenureFlag GetPretenureMode() { |
8146 int mode = pretenure_decision()->value(); | 8146 int mode = pretenure_decision()->value(); |
8147 // Zombie objects "decide" to be untenured. | 8147 // Zombie objects "decide" to be untenured. |
8148 return (mode == kTenure) ? TENURED : NOT_TENURED; | 8148 return (mode == kTenure) ? TENURED : NOT_TENURED; |
8149 } | 8149 } |
8150 | 8150 |
| 8151 void ResetPretenureDecision(); |
| 8152 |
8151 // The pretenuring decision is made during gc, and the zombie state allows | 8153 // The pretenuring decision is made during gc, and the zombie state allows |
8152 // us to recognize when an allocation site is just being kept alive because | 8154 // us to recognize when an allocation site is just being kept alive because |
8153 // a later traversal of new space may discover AllocationMementos that point | 8155 // a later traversal of new space may discover AllocationMementos that point |
8154 // to this AllocationSite. | 8156 // to this AllocationSite. |
8155 bool IsZombie() { | 8157 bool IsZombie() { |
8156 return pretenure_decision()->value() == kZombie; | 8158 return pretenure_decision()->value() == kZombie; |
8157 } | 8159 } |
8158 | 8160 |
8159 inline void MarkZombie(); | 8161 inline void MarkZombie(); |
8160 | 8162 |
(...skipping 2456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10617 } else { | 10619 } else { |
10618 value &= ~(1 << bit_position); | 10620 value &= ~(1 << bit_position); |
10619 } | 10621 } |
10620 return value; | 10622 return value; |
10621 } | 10623 } |
10622 }; | 10624 }; |
10623 | 10625 |
10624 } } // namespace v8::internal | 10626 } } // namespace v8::internal |
10625 | 10627 |
10626 #endif // V8_OBJECTS_H_ | 10628 #endif // V8_OBJECTS_H_ |
OLD | NEW |