Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index eab035fee4a4fc52aabcd632f0e0a4c5f3f33109..bb06eab7383baf84700eb1363003ee215a8d6acf 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -4,15 +4,16 @@ |
#if V8_TARGET_ARCH_X64 |
-#include "src/full-codegen/full-codegen.h" |
#include "src/ast/compile-time-value.h" |
#include "src/ast/scopes.h" |
+#include "src/builtins/builtins-constructor.h" |
#include "src/code-factory.h" |
#include "src/code-stubs.h" |
#include "src/codegen.h" |
#include "src/compilation-info.h" |
#include "src/compiler.h" |
#include "src/debug/debug.h" |
+#include "src/full-codegen/full-codegen.h" |
#include "src/ic/ic.h" |
namespace v8 { |
@@ -187,11 +188,13 @@ void FullCodeGenerator::Generate() { |
if (info->scope()->new_target_var() != nullptr) { |
__ Push(rdx); // Preserve new target. |
} |
- if (slots <= FastNewFunctionContextStub::MaximumSlots()) { |
- FastNewFunctionContextStub stub(isolate(), info->scope()->scope_type()); |
+ if (slots <= |
+ ConstructorBuiltinsAssembler::MaximumFunctionContextSlots()) { |
+ Callable callable = CodeFactory::FastNewFunctionContext( |
+ isolate(), info->scope()->scope_type()); |
__ Set(FastNewFunctionContextDescriptor::SlotsRegister(), slots); |
- __ CallStub(&stub); |
- // Result of FastNewFunctionContextStub is always in new space. |
+ __ Call(callable.code(), RelocInfo::CODE_TARGET); |
+ // Result of the FastNewFunctionContext builtin is always in new space. |
need_write_barrier = false; |
} else { |
__ Push(rdi); |