Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1415)

Unified Diff: src/crankshaft/hydrogen.cc

Issue 1609893003: [es6] Tail calls support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Support for CS and TF compilers added Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index e3fe00a62f24c2b4ca1e73cda9415dcd4d075495..23dc439ece6fc371a7b5f6b35886cb1b0251e067 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -6574,7 +6574,8 @@ HValue* HOptimizedGraphBuilder::BuildMonomorphicAccess(
HValue* function = Add<HConstant>(info->accessor());
PushArgumentsFromEnvironment(argument_count);
return New<HCallFunction>(function, argument_count,
- ConvertReceiverMode::kNotNullOrUndefined);
+ ConvertReceiverMode::kNotNullOrUndefined,
+ TailCallMode::kDisallow);
} else if (FLAG_inline_accessors && can_inline_accessor) {
bool success = info->IsLoad()
? TryInlineGetter(info->accessor(), info->map(), ast_id, return_id)
@@ -8149,7 +8150,8 @@ void HOptimizedGraphBuilder::HandlePolymorphicCallNamed(Call* expr,
HInstruction* call =
needs_wrapping ? NewUncasted<HCallFunction>(
function, argument_count,
- ConvertReceiverMode::kNotNullOrUndefined)
+ ConvertReceiverMode::kNotNullOrUndefined,
+ expr->tail_call_mode())
: BuildCallConstantFunction(target, argument_count);
PushArgumentsFromEnvironment(argument_count);
AddInstruction(call);
@@ -8180,7 +8182,8 @@ void HOptimizedGraphBuilder::HandlePolymorphicCallNamed(Call* expr,
CHECK_ALIVE(VisitExpressions(expr->arguments()));
HInstruction* call = New<HCallFunction>(
- function, argument_count, ConvertReceiverMode::kNotNullOrUndefined);
+ function, argument_count, ConvertReceiverMode::kNotNullOrUndefined,
+ expr->tail_call_mode());
PushArgumentsFromEnvironment(argument_count);
@@ -9707,7 +9710,8 @@ void HOptimizedGraphBuilder::VisitCall(Call* expr) {
// TODO(verwaest): Support creation of value wrappers directly in
// HWrapReceiver.
call = New<HCallFunction>(function, argument_count,
- ConvertReceiverMode::kNotNullOrUndefined);
+ ConvertReceiverMode::kNotNullOrUndefined,
+ expr->tail_call_mode());
} else if (TryInlineCall(expr)) {
return;
} else {
@@ -9731,7 +9735,8 @@ void HOptimizedGraphBuilder::VisitCall(Call* expr) {
CHECK_ALIVE(VisitExpressions(expr->arguments(), arguments_flag));
call = New<HCallFunction>(function, argument_count,
- ConvertReceiverMode::kNotNullOrUndefined);
+ ConvertReceiverMode::kNotNullOrUndefined,
+ expr->tail_call_mode());
}
PushArgumentsFromEnvironment(argument_count);
@@ -9782,7 +9787,8 @@ void HOptimizedGraphBuilder::VisitCall(Call* expr) {
} else {
PushArgumentsFromEnvironment(argument_count);
HCallFunction* call_function = New<HCallFunction>(
- function, argument_count, ConvertReceiverMode::kNullOrUndefined);
+ function, argument_count, ConvertReceiverMode::kNullOrUndefined,
+ expr->tail_call_mode());
call = call_function;
if (expr->is_uninitialized() &&
expr->IsUsingCallFeedbackICSlot(isolate())) {

Powered by Google App Engine
This is Rietveld 408576698