diff options
Diffstat (limited to 'deps/v8/src/x64/codegen-x64.cc')
-rw-r--r-- | deps/v8/src/x64/codegen-x64.cc | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/deps/v8/src/x64/codegen-x64.cc b/deps/v8/src/x64/codegen-x64.cc index 6e98a0090..5abf3c838 100644 --- a/deps/v8/src/x64/codegen-x64.cc +++ b/deps/v8/src/x64/codegen-x64.cc @@ -4244,7 +4244,8 @@ void CodeGenerator::VisitDebuggerStatement(DebuggerStatement* node) { void CodeGenerator::InstantiateFunction( - Handle<SharedFunctionInfo> function_info) { + Handle<SharedFunctionInfo> function_info, + bool pretenure) { // The inevitable call will sync frame elements to memory anyway, so // we do it eagerly to allow us to push the arguments directly into // place. @@ -4252,7 +4253,9 @@ void CodeGenerator::InstantiateFunction( // Use the fast case closure allocation code that allocates in new // space for nested functions that don't need literals cloning. - if (scope()->is_function_scope() && function_info->num_literals() == 0) { + if (scope()->is_function_scope() && + function_info->num_literals() == 0 && + !pretenure) { FastNewClosureStub stub; frame_->Push(function_info); Result answer = frame_->CallStub(&stub, 1); @@ -4262,7 +4265,10 @@ void CodeGenerator::InstantiateFunction( // shared function info. frame_->EmitPush(rsi); frame_->EmitPush(function_info); - Result result = frame_->CallRuntime(Runtime::kNewClosure, 2); + frame_->EmitPush(pretenure + ? Factory::true_value() + : Factory::false_value()); + Result result = frame_->CallRuntime(Runtime::kNewClosure, 3); frame_->Push(&result); } } @@ -4279,14 +4285,14 @@ void CodeGenerator::VisitFunctionLiteral(FunctionLiteral* node) { SetStackOverflow(); return; } - InstantiateFunction(function_info); + InstantiateFunction(function_info, node->pretenure()); } void CodeGenerator::VisitSharedFunctionInfoLiteral( SharedFunctionInfoLiteral* node) { Comment cmnt(masm_, "[ SharedFunctionInfoLiteral"); - InstantiateFunction(node->shared_function_info()); + InstantiateFunction(node->shared_function_info(), false); } @@ -7217,6 +7223,11 @@ void CodeGenerator::GenerateGetCachedArrayIndex(ZoneList<Expression*>* args) { } +void CodeGenerator::GenerateFastAsciiArrayJoin(ZoneList<Expression*>* args) { + frame_->Push(Factory::undefined_value()); +} + + void CodeGenerator::VisitCallRuntime(CallRuntime* node) { if (CheckForInlineRuntimeCall(node)) { return; |