| 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 8619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8630 return PretenureDecisionBits::decode(value); | 8630 return PretenureDecisionBits::decode(value); |
| 8631 } | 8631 } |
| 8632 | 8632 |
| 8633 void set_pretenure_decision(PretenureDecision decision) { | 8633 void set_pretenure_decision(PretenureDecision decision) { |
| 8634 int value = pretenure_data()->value(); | 8634 int value = pretenure_data()->value(); |
| 8635 set_pretenure_data( | 8635 set_pretenure_data( |
| 8636 Smi::FromInt(PretenureDecisionBits::update(value, decision)), | 8636 Smi::FromInt(PretenureDecisionBits::update(value, decision)), |
| 8637 SKIP_WRITE_BARRIER); | 8637 SKIP_WRITE_BARRIER); |
| 8638 } | 8638 } |
| 8639 | 8639 |
| 8640 bool emit_mementos() { |
| 8641 return pretenure_decision() == kUndecided; |
| 8642 } |
| 8643 |
| 8640 bool deopt_dependent_code() { | 8644 bool deopt_dependent_code() { |
| 8641 int value = pretenure_data()->value(); | 8645 int value = pretenure_data()->value(); |
| 8642 return DeoptDependentCodeBit::decode(value); | 8646 return DeoptDependentCodeBit::decode(value); |
| 8643 } | 8647 } |
| 8644 | 8648 |
| 8645 void set_deopt_dependent_code(bool deopt) { | 8649 void set_deopt_dependent_code(bool deopt) { |
| 8646 int value = pretenure_data()->value(); | 8650 int value = pretenure_data()->value(); |
| 8647 set_pretenure_data( | 8651 set_pretenure_data( |
| 8648 Smi::FromInt(DeoptDependentCodeBit::update(value, deopt)), | 8652 Smi::FromInt(DeoptDependentCodeBit::update(value, deopt)), |
| 8649 SKIP_WRITE_BARRIER); | 8653 SKIP_WRITE_BARRIER); |
| (...skipping 2594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11244 } else { | 11248 } else { |
| 11245 value &= ~(1 << bit_position); | 11249 value &= ~(1 << bit_position); |
| 11246 } | 11250 } |
| 11247 return value; | 11251 return value; |
| 11248 } | 11252 } |
| 11249 }; | 11253 }; |
| 11250 | 11254 |
| 11251 } } // namespace v8::internal | 11255 } } // namespace v8::internal |
| 11252 | 11256 |
| 11253 #endif // V8_OBJECTS_H_ | 11257 #endif // V8_OBJECTS_H_ |
| OLD | NEW |