| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index fc5ed247ee5a86f38aa6a59794ace121fe538da4..3a74957cec21ed60a055cdff717ddf9704b0641f 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -4607,7 +4607,8 @@ SMI_ACCESSORS(SharedFunctionInfo, function_token_position,
|
| kFunctionTokenPositionOffset)
|
| SMI_ACCESSORS(SharedFunctionInfo, compiler_hints,
|
| kCompilerHintsOffset)
|
| -SMI_ACCESSORS(SharedFunctionInfo, opt_count, kOptCountOffset)
|
| +SMI_ACCESSORS(SharedFunctionInfo, opt_count_and_bailout_reason,
|
| + kOptCountAndBailoutReasonOffset)
|
| SMI_ACCESSORS(SharedFunctionInfo, counters, kCountersOffset)
|
|
|
| #else
|
| @@ -4656,7 +4657,9 @@ PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo,
|
| compiler_hints,
|
| kCompilerHintsOffset)
|
|
|
| -PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, opt_count, kOptCountOffset)
|
| +PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo,
|
| + opt_count_and_bailout_reason,
|
| + kOptCountAndBailoutReasonOffset)
|
|
|
| PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, counters, kCountersOffset)
|
|
|
| @@ -4903,6 +4906,24 @@ void SharedFunctionInfo::set_opt_reenable_tries(int tries) {
|
| }
|
|
|
|
|
| +int SharedFunctionInfo::opt_count() {
|
| + return OptCountBits::decode(opt_count_and_bailout_reason());
|
| +}
|
| +
|
| +
|
| +void SharedFunctionInfo::set_opt_count(int opt_count) {
|
| + set_opt_count_and_bailout_reason(
|
| + OptCountBits::update(opt_count_and_bailout_reason(), opt_count));
|
| +}
|
| +
|
| +
|
| +BailoutReason SharedFunctionInfo::DisableOptimizationReason() {
|
| + BailoutReason reason = static_cast<BailoutReason>(
|
| + DisabledOptimizationReasonBits::decode(opt_count_and_bailout_reason()));
|
| + return reason;
|
| +}
|
| +
|
| +
|
| bool SharedFunctionInfo::has_deoptimization_support() {
|
| Code* code = this->code();
|
| return code->kind() == Code::FUNCTION && code->has_deoptimization_support();
|
|
|