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

Unified Diff: src/compiler/effect-control-linearizer.cc

Issue 2557283002: [turbofan] Add NewUnmappedArgumentsElements and NewRestParametersArguments. (Closed)
Patch Set: Fixes. Created 4 years 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/effect-control-linearizer.h ('k') | src/compiler/js-create-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/effect-control-linearizer.cc
diff --git a/src/compiler/effect-control-linearizer.cc b/src/compiler/effect-control-linearizer.cc
index b0158525723ee21ea7de1f8d0345a7ea5b820099..0a8fbd900d9ddafe7f95c1c1146961e6bfaa193d 100644
--- a/src/compiler/effect-control-linearizer.cc
+++ b/src/compiler/effect-control-linearizer.cc
@@ -730,6 +730,12 @@ bool EffectControlLinearizer::TryWireInStateEffect(Node* node,
case IrOpcode::kObjectIsUndetectable:
state = LowerObjectIsUndetectable(node, *effect, *control);
break;
+ case IrOpcode::kNewRestParameterElements:
+ state = LowerNewRestParameterElements(node, *effect, *control);
+ break;
+ case IrOpcode::kNewUnmappedArgumentsElements:
+ state = LowerNewUnmappedArgumentsElements(node, *effect, *control);
+ break;
case IrOpcode::kArrayBufferWasNeutered:
state = LowerArrayBufferWasNeutered(node, *effect, *control);
break;
@@ -2164,6 +2170,42 @@ EffectControlLinearizer::LowerObjectIsUndetectable(Node* node, Node* effect,
}
EffectControlLinearizer::ValueEffectControl
+EffectControlLinearizer::LowerNewRestParameterElements(Node* node, Node* effect,
+ Node* control) {
+ int const formal_parameter_count = ParameterCountOf(node->op());
+
+ Callable const callable = CodeFactory::NewRestParameterElements(isolate());
+ Operator::Properties const properties = node->op()->properties();
+ CallDescriptor::Flags const flags = CallDescriptor::kNoFlags;
+ CallDescriptor* desc = Linkage::GetStubCallDescriptor(
+ isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
+ Node* value = effect = graph()->NewNode(
+ common()->Call(desc), jsgraph()->HeapConstant(callable.code()),
+ jsgraph()->IntPtrConstant(formal_parameter_count),
+ jsgraph()->NoContextConstant(), effect);
+ return ValueEffectControl(value, effect, control);
+}
+
+EffectControlLinearizer::ValueEffectControl
+EffectControlLinearizer::LowerNewUnmappedArgumentsElements(Node* node,
+ Node* effect,
+ Node* control) {
+ int const formal_parameter_count = ParameterCountOf(node->op());
+
+ Callable const callable =
+ CodeFactory::NewUnmappedArgumentsElements(isolate());
+ Operator::Properties const properties = node->op()->properties();
+ CallDescriptor::Flags const flags = CallDescriptor::kNoFlags;
+ CallDescriptor* desc = Linkage::GetStubCallDescriptor(
+ isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
+ Node* value = effect = graph()->NewNode(
+ common()->Call(desc), jsgraph()->HeapConstant(callable.code()),
+ jsgraph()->IntPtrConstant(formal_parameter_count),
+ jsgraph()->NoContextConstant(), effect);
+ return ValueEffectControl(value, effect, control);
+}
+
+EffectControlLinearizer::ValueEffectControl
EffectControlLinearizer::LowerArrayBufferWasNeutered(Node* node, Node* effect,
Node* control) {
Node* value = node->InputAt(0);
« no previous file with comments | « src/compiler/effect-control-linearizer.h ('k') | src/compiler/js-create-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698