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

Unified Diff: src/compiler/js-typed-lowering.cc

Issue 2266893002: [turbofan] Disable inlining of Cpp builtins in need of argument adaption (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-typed-lowering.cc
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
index b184797ddabd312564413200636cabc30f4e1637..62861b3c1c70cd3d82fa1a14a464e5d186ad684c 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -1598,7 +1598,10 @@ Reduction JSTypedLowering::ReduceJSCallConstruct(Node* node) {
CallDescriptor::Flags flags = CallDescriptor::kNeedsFrameState;
- if (is_builtin && Builtins::HasCppImplementation(builtin_index)) {
+ if (is_builtin && Builtins::HasCppImplementation(builtin_index) &&
+ (shared->internal_formal_parameter_count() == arity ||
+ shared->internal_formal_parameter_count() ==
+ SharedFunctionInfo::kDontAdaptArgumentsSentinel)) {
// Patch {node} to a direct CEntryStub call.
// Load the context from the {target}.
@@ -1710,7 +1713,10 @@ Reduction JSTypedLowering::ReduceJSCallFunction(Node* node) {
Node* new_target = jsgraph()->UndefinedConstant();
Node* argument_count = jsgraph()->Int32Constant(arity);
- if (is_builtin && Builtins::HasCppImplementation(builtin_index)) {
+ if (is_builtin && Builtins::HasCppImplementation(builtin_index) &&
+ (shared->internal_formal_parameter_count() == arity ||
+ shared->internal_formal_parameter_count() ==
+ SharedFunctionInfo::kDontAdaptArgumentsSentinel)) {
// Patch {node} to a direct CEntryStub call.
ReduceBuiltin(isolate(), jsgraph(), node, builtin_index, arity, flags);
} else if (shared->internal_formal_parameter_count() == arity ||
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698