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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 1436493002: [builtins] Introduce specialized Call/CallFunction builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())) {
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698