Index: src/compiler/ast-graph-builder.cc |
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc |
index 52d4a470f6f52955c6c916b3b973017e17a5b05b..d30910b1821ea61d616fb3fe34b1cfdd43432a7e 100644 |
--- a/src/compiler/ast-graph-builder.cc |
+++ b/src/compiler/ast-graph-builder.cc |
@@ -3152,7 +3152,11 @@ Node* AstGraphBuilder::BuildArgumentsObject(Variable* arguments) { |
// Allocate and initialize a new arguments object. |
Node* callee = GetFunctionClosure(); |
- const Operator* op = javascript()->CallRuntime(Runtime::kNewArguments, 1); |
+ CreateArgumentsParameters::Type type = |
+ is_strict(language_mode()) || !info()->has_simple_parameters() |
+ ? CreateArgumentsParameters::UNMAPPED_ARGUMENTS |
+ : CreateArgumentsParameters::MAPPED_ARGUMENTS; |
+ const Operator* op = javascript()->CreateArguments(type, 0); |
Node* object = NewNode(op, callee); |
// Assign the object to the arguments variable. |