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

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

Issue 1419813010: [runtime] Remove the very dangerous %_CallFunction intrinsic. (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-intrinsic-lowering.h ('k') | src/compiler/linkage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-intrinsic-lowering.cc
diff --git a/src/compiler/js-intrinsic-lowering.cc b/src/compiler/js-intrinsic-lowering.cc
index ab169c296c059bdefed9ac552f90457019a788fc..f11e627e72cb23b8aad00fbd575b55ee34c6ea95 100644
--- a/src/compiler/js-intrinsic-lowering.cc
+++ b/src/compiler/js-intrinsic-lowering.cc
@@ -113,8 +113,8 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceToString(node);
case Runtime::kInlineThrowNotDateError:
return ReduceThrowNotDateError(node);
- case Runtime::kInlineCallFunction:
- return ReduceCallFunction(node);
+ case Runtime::kInlineCall:
+ return ReduceCall(node);
default:
break;
}
@@ -630,17 +630,10 @@ Reduction JSIntrinsicLowering::ReduceToString(Node* node) {
}
-Reduction JSIntrinsicLowering::ReduceCallFunction(Node* node) {
- CallRuntimeParameters params = CallRuntimeParametersOf(node->op());
- size_t arity = params.arity();
- Node* function = node->InputAt(static_cast<int>(arity - 1));
- while (--arity != 0) {
- node->ReplaceInput(static_cast<int>(arity),
- node->InputAt(static_cast<int>(arity - 1)));
- }
- node->ReplaceInput(0, function);
+Reduction JSIntrinsicLowering::ReduceCall(Node* node) {
+ size_t const arity = CallRuntimeParametersOf(node->op()).arity();
NodeProperties::ChangeOp(
- node, javascript()->CallFunction(params.arity(), STRICT, VectorSlotPair(),
+ node, javascript()->CallFunction(arity, STRICT, VectorSlotPair(),
ConvertReceiverMode::kAny,
TailCallMode::kAllow));
return Changed(node);
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | src/compiler/linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698