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

Unified Diff: src/full-codegen/x64/full-codegen-x64.cc

Issue 2177273002: Make FastNewFunctionContextStub take slots parameter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 4 years, 5 months 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/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9862b805e13bb48f299125dd12d9c223533204ff..67c8ecb908ccd3d4b50c67e9b4581889f4489b00 100644
--- a/src/full-codegen/x64/full-codegen-x64.cc
+++ b/src/full-codegen/x64/full-codegen-x64.cc
@@ -174,15 +174,11 @@ void FullCodeGenerator::Generate() {
if (info->scope()->new_target_var() != nullptr) {
__ Push(rdx); // Preserve new target.
}
- if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
- FastNewFunctionContextStub stub(isolate(), slots);
- __ CallStub(&stub);
- // Result of FastNewFunctionContextStub is always in new space.
- need_write_barrier = false;
- } else {
- __ Push(rdi);
- __ CallRuntime(Runtime::kNewFunctionContext);
- }
+ FastNewFunctionContextStub stub(isolate());
+ __ Set(FastNewFunctionContextDescriptor::SlotsRegister(), slots);
+ __ CallStub(&stub);
+ // Result of FastNewFunctionContextStub is always in new space.
+ need_write_barrier = false;
if (info->scope()->new_target_var() != nullptr) {
__ Pop(rdx); // Restore new target.
}
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698