Index: src/crankshaft/hydrogen.cc |
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc |
index f878a605f6a063fa7260c6aebf30a73a7c3e6942..89689b21e01edbc9e26fa5f7785b52f7f84845dd 100644 |
--- a/src/crankshaft/hydrogen.cc |
+++ b/src/crankshaft/hydrogen.cc |
@@ -6589,7 +6589,8 @@ HValue* HOptimizedGraphBuilder::BuildMonomorphicAccess( |
if (info->NeedsWrappingFor(info->accessor())) { |
HValue* function = Add<HConstant>(info->accessor()); |
PushArgumentsFromEnvironment(argument_count); |
- return New<HCallFunction>(function, argument_count); |
+ return New<HCallFunction>(function, argument_count, |
+ ConvertReceiverMode::kNotNullOrUndefined); |
} else if (FLAG_inline_accessors && can_inline_accessor) { |
bool success = info->IsLoad() |
? TryInlineGetter(info->accessor(), info->map(), ast_id, return_id) |
@@ -8170,7 +8171,9 @@ void HOptimizedGraphBuilder::HandlePolymorphicCallNamed(Call* expr, |
// TODO(verwaest): Support creation of value wrappers directly in |
// HWrapReceiver. |
HInstruction* call = |
- needs_wrapping ? NewUncasted<HCallFunction>(function, argument_count) |
+ needs_wrapping ? NewUncasted<HCallFunction>( |
+ function, argument_count, |
+ ConvertReceiverMode::kNotNullOrUndefined) |
: BuildCallConstantFunction(target, argument_count); |
PushArgumentsFromEnvironment(argument_count); |
AddInstruction(call); |
@@ -8200,7 +8203,8 @@ void HOptimizedGraphBuilder::HandlePolymorphicCallNamed(Call* expr, |
environment()->SetExpressionStackAt(0, receiver); |
CHECK_ALIVE(VisitExpressions(expr->arguments())); |
- HInstruction* call = New<HCallFunction>(function, argument_count); |
+ HInstruction* call = New<HCallFunction>( |
+ function, argument_count, ConvertReceiverMode::kNotNullOrUndefined); |
PushArgumentsFromEnvironment(argument_count); |
@@ -9709,7 +9713,8 @@ void HOptimizedGraphBuilder::VisitCall(Call* expr) { |
// the receiver. |
// TODO(verwaest): Support creation of value wrappers directly in |
// HWrapReceiver. |
- call = New<HCallFunction>(function, argument_count); |
+ call = New<HCallFunction>(function, argument_count, |
+ ConvertReceiverMode::kNotNullOrUndefined); |
} else if (TryInlineCall(expr)) { |
return; |
} else { |
@@ -9732,7 +9737,8 @@ void HOptimizedGraphBuilder::VisitCall(Call* expr) { |
Push(receiver); |
CHECK_ALIVE(VisitExpressions(expr->arguments(), arguments_flag)); |
- call = New<HCallFunction>(function, argument_count); |
+ call = New<HCallFunction>(function, argument_count, |
+ ConvertReceiverMode::kNotNullOrUndefined); |
} |
PushArgumentsFromEnvironment(argument_count); |
@@ -9782,8 +9788,8 @@ void HOptimizedGraphBuilder::VisitCall(Call* expr) { |
call = BuildCallConstantFunction(expr->target(), argument_count); |
} else { |
PushArgumentsFromEnvironment(argument_count); |
- HCallFunction* call_function = |
- New<HCallFunction>(function, argument_count); |
+ HCallFunction* call_function = New<HCallFunction>( |
+ function, argument_count, ConvertReceiverMode::kNullOrUndefined); |
call = call_function; |
if (expr->is_uninitialized() && |
expr->IsUsingCallFeedbackICSlot(isolate())) { |