Index: src/compiler/js-native-context-specialization.cc |
diff --git a/src/compiler/js-native-context-specialization.cc b/src/compiler/js-native-context-specialization.cc |
index 76eed6554f4c3e1eadd8702d7016c2e55fb519a1..76814f5e55eec457e74727017c12a33169ca475a 100644 |
--- a/src/compiler/js-native-context-specialization.cc |
+++ b/src/compiler/js-native-context-specialization.cc |
@@ -1007,7 +1007,14 @@ JSNativeContextSpecialization::BuildPropertyAccess( |
context, target, frame_state); |
// Introduce the call to the getter function. |
- if (CanInlineApiCall(access_info)) { |
+ if (access_info.constant()->IsJSFunction()) { |
+ value = effect = graph()->NewNode( |
+ javascript()->CallFunction( |
+ 2, 0.0f, VectorSlotPair(), |
+ ConvertReceiverMode::kNotNullOrUndefined), |
+ target, receiver, context, frame_state0, effect, control); |
+ control = graph()->NewNode(common()->IfSuccess(), value); |
+ } else { |
DCHECK(access_info.constant()->IsFunctionTemplateInfo()); |
Handle<FunctionTemplateInfo> function_template_info( |
Handle<FunctionTemplateInfo>::cast(access_info.constant())); |
@@ -1018,13 +1025,6 @@ JSNativeContextSpecialization::BuildPropertyAccess( |
value = value_effect_control.value(); |
effect = value_effect_control.effect(); |
control = value_effect_control.control(); |
- } else { |
- value = effect = graph()->NewNode( |
- javascript()->CallFunction( |
- 2, 0.0f, VectorSlotPair(), |
- ConvertReceiverMode::kNotNullOrUndefined), |
- target, receiver, context, frame_state0, effect, control); |
- control = graph()->NewNode(common()->IfSuccess(), value); |
} |
break; |
} |
@@ -1044,7 +1044,14 @@ JSNativeContextSpecialization::BuildPropertyAccess( |
context, target, frame_state); |
// Introduce the call to the setter function. |
- if (CanInlineApiCall(access_info)) { |
+ if (access_info.constant()->IsJSFunction()) { |
+ effect = graph()->NewNode( |
+ javascript()->CallFunction( |
+ 3, 0.0f, VectorSlotPair(), |
+ ConvertReceiverMode::kNotNullOrUndefined), |
+ target, receiver, value, context, frame_state0, effect, control); |
+ control = graph()->NewNode(common()->IfSuccess(), effect); |
+ } else { |
DCHECK(access_info.constant()->IsFunctionTemplateInfo()); |
Handle<FunctionTemplateInfo> function_template_info( |
Handle<FunctionTemplateInfo>::cast(access_info.constant())); |
@@ -1055,13 +1062,6 @@ JSNativeContextSpecialization::BuildPropertyAccess( |
value = value_effect_control.value(); |
effect = value_effect_control.effect(); |
control = value_effect_control.control(); |
- } else { |
- effect = graph()->NewNode( |
- javascript()->CallFunction( |
- 3, 0.0f, VectorSlotPair(), |
- ConvertReceiverMode::kNotNullOrUndefined), |
- target, receiver, value, context, frame_state0, effect, control); |
- control = graph()->NewNode(common()->IfSuccess(), effect); |
} |
break; |
} |
@@ -1573,13 +1573,6 @@ JSNativeContextSpecialization::BuildElementAccess( |
return ValueEffectControl(value, effect, control); |
} |
-bool JSNativeContextSpecialization::CanInlineApiCall( |
- PropertyAccessInfo const& access_info) { |
- if (V8_UNLIKELY(FLAG_runtime_stats)) return false; |
- return access_info.IsAccessorConstant() && |
- access_info.constant()->IsFunctionTemplateInfo(); |
-} |
- |
JSNativeContextSpecialization::ValueEffectControl |
JSNativeContextSpecialization::InlineApiCall( |
Node* receiver, Node* context, Node* target, Node* frame_state, Node* value, |