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 8234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8245 | 8245 |
8246 // This method is expensive, it should only be called for reporting. | 8246 // This method is expensive, it should only be called for reporting. |
8247 bool IsNestedSite(); | 8247 bool IsNestedSite(); |
8248 | 8248 |
8249 // transition_info bitfields, for constructed array transition info. | 8249 // transition_info bitfields, for constructed array transition info. |
8250 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {}; | 8250 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {}; |
8251 class UnusedBits: public BitField<int, 15, 14> {}; | 8251 class UnusedBits: public BitField<int, 15, 14> {}; |
8252 class DoNotInlineBit: public BitField<bool, 29, 1> {}; | 8252 class DoNotInlineBit: public BitField<bool, 29, 1> {}; |
8253 | 8253 |
8254 // Bitfields for pretenure_data | 8254 // Bitfields for pretenure_data |
8255 class MementoFoundCountBits: public BitField<int, 0, 28> {}; | 8255 class MementoFoundCountBits: public BitField<int, 0, 27> {}; |
8256 class PretenureDecisionBits: public BitField<PretenureDecision, 28, 2> {}; | 8256 class PretenureDecisionBits: public BitField<PretenureDecision, 27, 2> {}; |
| 8257 class DeoptDependentCodeBit: public BitField<bool, 29, 1> {}; |
8257 STATIC_ASSERT(PretenureDecisionBits::kMax >= kLastPretenureDecisionValue); | 8258 STATIC_ASSERT(PretenureDecisionBits::kMax >= kLastPretenureDecisionValue); |
8258 | 8259 |
8259 // Increments the mementos found counter and returns true when the first | 8260 // Increments the mementos found counter and returns true when the first |
8260 // memento was found for a given allocation site. | 8261 // memento was found for a given allocation site. |
8261 inline bool IncrementMementoFoundCount(); | 8262 inline bool IncrementMementoFoundCount(); |
8262 | 8263 |
8263 inline void IncrementMementoCreateCount(); | 8264 inline void IncrementMementoCreateCount(); |
8264 | 8265 |
8265 PretenureFlag GetPretenureMode(); | 8266 PretenureFlag GetPretenureMode(); |
8266 | 8267 |
8267 void ResetPretenureDecision(); | 8268 void ResetPretenureDecision(); |
8268 | 8269 |
8269 PretenureDecision pretenure_decision() { | 8270 PretenureDecision pretenure_decision() { |
8270 int value = pretenure_data()->value(); | 8271 int value = pretenure_data()->value(); |
8271 return PretenureDecisionBits::decode(value); | 8272 return PretenureDecisionBits::decode(value); |
8272 } | 8273 } |
8273 | 8274 |
8274 void set_pretenure_decision(PretenureDecision decision) { | 8275 void set_pretenure_decision(PretenureDecision decision) { |
8275 int value = pretenure_data()->value(); | 8276 int value = pretenure_data()->value(); |
8276 set_pretenure_data( | 8277 set_pretenure_data( |
8277 Smi::FromInt(PretenureDecisionBits::update(value, decision)), | 8278 Smi::FromInt(PretenureDecisionBits::update(value, decision)), |
8278 SKIP_WRITE_BARRIER); | 8279 SKIP_WRITE_BARRIER); |
8279 } | 8280 } |
8280 | 8281 |
| 8282 bool deopt_dependent_code() { |
| 8283 int value = pretenure_data()->value(); |
| 8284 return DeoptDependentCodeBit::decode(value); |
| 8285 } |
| 8286 |
| 8287 void set_deopt_dependent_code(bool deopt) { |
| 8288 int value = pretenure_data()->value(); |
| 8289 set_pretenure_data( |
| 8290 Smi::FromInt(DeoptDependentCodeBit::update(value, deopt)), |
| 8291 SKIP_WRITE_BARRIER); |
| 8292 } |
| 8293 |
8281 int memento_found_count() { | 8294 int memento_found_count() { |
8282 int value = pretenure_data()->value(); | 8295 int value = pretenure_data()->value(); |
8283 return MementoFoundCountBits::decode(value); | 8296 return MementoFoundCountBits::decode(value); |
8284 } | 8297 } |
8285 | 8298 |
8286 inline void set_memento_found_count(int count); | 8299 inline void set_memento_found_count(int count); |
8287 | 8300 |
8288 int memento_create_count() { | 8301 int memento_create_count() { |
8289 return pretenure_create_count()->value(); | 8302 return pretenure_create_count()->value(); |
8290 } | 8303 } |
(...skipping 2462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10753 } else { | 10766 } else { |
10754 value &= ~(1 << bit_position); | 10767 value &= ~(1 << bit_position); |
10755 } | 10768 } |
10756 return value; | 10769 return value; |
10757 } | 10770 } |
10758 }; | 10771 }; |
10759 | 10772 |
10760 } } // namespace v8::internal | 10773 } } // namespace v8::internal |
10761 | 10774 |
10762 #endif // V8_OBJECTS_H_ | 10775 #endif // V8_OBJECTS_H_ |
OLD | NEW |