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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 1457313002: [turbofan] Pass new.target to arguments adaptor trampoline. (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/compiler/js-typed-lowering.cc ('k') | src/ia32/interface-descriptors-ia32.cc » ('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 2f3c2a911536ea5f693b5f1419b81d69f33681cd..434d5d5503d2a14ab9b583f7c9612ec51004be49 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -7977,16 +7977,15 @@ HInstruction* HOptimizedGraphBuilder::NewPlainFunctionCall(HValue* fun,
HInstruction* HOptimizedGraphBuilder::NewArgumentAdaptorCall(
HValue* fun, HValue* context,
int argument_count, HValue* expected_param_count) {
- ArgumentAdaptorDescriptor descriptor(isolate());
+ HValue* new_target = graph()->GetConstantUndefined();
HValue* arity = Add<HConstant>(argument_count - 1);
- HValue* op_vals[] = { context, fun, arity, expected_param_count };
+ HValue* op_vals[] = {context, fun, new_target, arity, expected_param_count};
- Handle<Code> adaptor =
- isolate()->builtins()->ArgumentsAdaptorTrampoline();
- HConstant* adaptor_value = Add<HConstant>(adaptor);
+ Callable callable = CodeFactory::ArgumentAdaptor(isolate());
+ HConstant* stub = Add<HConstant>(callable.code());
- return New<HCallWithDescriptor>(adaptor_value, argument_count, descriptor,
+ return New<HCallWithDescriptor>(stub, argument_count, callable.descriptor(),
Vector<HValue*>(op_vals, arraysize(op_vals)));
}
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698