Index: src/crankshaft/hydrogen.cc |
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc |
index 0e9ac8ad45fff2e9e905300a49c5b75902de693d..9d4b941ca647cbd84a9fb30f8ff90dd263b161c6 100644 |
--- a/src/crankshaft/hydrogen.cc |
+++ b/src/crankshaft/hydrogen.cc |
@@ -6621,8 +6621,7 @@ HValue* HOptimizedGraphBuilder::BuildMonomorphicAccess( |
HValue* function = Add<HConstant>(info->accessor()); |
PushArgumentsFromEnvironment(argument_count); |
return New<HCallFunction>(function, argument_count, |
- ConvertReceiverMode::kNotNullOrUndefined, |
- TailCallMode::kDisallow); |
+ ConvertReceiverMode::kNotNullOrUndefined); |
} else if (FLAG_inline_accessors && can_inline_accessor) { |
bool success = info->IsLoad() |
? TryInlineGetter(info->accessor(), info->map(), ast_id, return_id) |
@@ -8197,8 +8196,7 @@ void HOptimizedGraphBuilder::HandlePolymorphicCallNamed(Call* expr, |
HInstruction* call = |
needs_wrapping ? NewUncasted<HCallFunction>( |
function, argument_count, |
- ConvertReceiverMode::kNotNullOrUndefined, |
- expr->tail_call_mode()) |
+ ConvertReceiverMode::kNotNullOrUndefined) |
: BuildCallConstantFunction(target, argument_count); |
PushArgumentsFromEnvironment(argument_count); |
AddInstruction(call); |
@@ -8229,8 +8227,7 @@ void HOptimizedGraphBuilder::HandlePolymorphicCallNamed(Call* expr, |
CHECK_ALIVE(VisitExpressions(expr->arguments())); |
HInstruction* call = New<HCallFunction>( |
- function, argument_count, ConvertReceiverMode::kNotNullOrUndefined, |
- expr->tail_call_mode()); |
+ function, argument_count, ConvertReceiverMode::kNotNullOrUndefined); |
PushArgumentsFromEnvironment(argument_count); |
@@ -9693,6 +9690,9 @@ bool HOptimizedGraphBuilder::CanBeFunctionApplyArguments(Call* expr) { |
void HOptimizedGraphBuilder::VisitCall(Call* expr) { |
+ if (expr->tail_call_mode() == TailCallMode::kAllow) { |
+ return Bailout(kTailCall); |
+ } |
DCHECK(!HasStackOverflow()); |
DCHECK(current_block() != NULL); |
DCHECK(current_block()->HasPredecessor()); |
@@ -9759,8 +9759,7 @@ void HOptimizedGraphBuilder::VisitCall(Call* expr) { |
// TODO(verwaest): Support creation of value wrappers directly in |
// HWrapReceiver. |
call = New<HCallFunction>(function, argument_count, |
- ConvertReceiverMode::kNotNullOrUndefined, |
- expr->tail_call_mode()); |
+ ConvertReceiverMode::kNotNullOrUndefined); |
} else if (TryInlineCall(expr)) { |
return; |
} else { |
@@ -9784,8 +9783,7 @@ void HOptimizedGraphBuilder::VisitCall(Call* expr) { |
CHECK_ALIVE(VisitExpressions(expr->arguments(), arguments_flag)); |
call = New<HCallFunction>(function, argument_count, |
- ConvertReceiverMode::kNotNullOrUndefined, |
- expr->tail_call_mode()); |
+ ConvertReceiverMode::kNotNullOrUndefined); |
} |
PushArgumentsFromEnvironment(argument_count); |
@@ -9836,8 +9834,7 @@ void HOptimizedGraphBuilder::VisitCall(Call* expr) { |
} else { |
PushArgumentsFromEnvironment(argument_count); |
HCallFunction* call_function = New<HCallFunction>( |
- function, argument_count, ConvertReceiverMode::kNullOrUndefined, |
- expr->tail_call_mode()); |
+ function, argument_count, ConvertReceiverMode::kNullOrUndefined); |
call = call_function; |
if (expr->is_uninitialized() && |
expr->IsUsingCallFeedbackICSlot(isolate())) { |