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

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.cc

Issue 2113673002: [stubs]: Convert FastNewContext stub to turbofan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rename based on feedback 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 unified diff | Download patch
« no previous file with comments | « src/crankshaft/s390/lithium-codegen-s390.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 Comment(";;; Allocate local context"); 174 Comment(";;; Allocate local context");
175 bool need_write_barrier = true; 175 bool need_write_barrier = true;
176 // Argument to NewContext is the function, which is still in rdi. 176 // Argument to NewContext is the function, which is still in rdi.
177 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 177 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
178 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; 178 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
179 if (info()->scope()->is_script_scope()) { 179 if (info()->scope()->is_script_scope()) {
180 __ Push(rdi); 180 __ Push(rdi);
181 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); 181 __ Push(info()->scope()->GetScopeInfo(info()->isolate()));
182 __ CallRuntime(Runtime::kNewScriptContext); 182 __ CallRuntime(Runtime::kNewScriptContext);
183 deopt_mode = Safepoint::kLazyDeopt; 183 deopt_mode = Safepoint::kLazyDeopt;
184 } else if (slots <= FastNewContextStub::kMaximumSlots) { 184 } else if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
185 FastNewContextStub stub(isolate(), slots); 185 FastNewFunctionContextStub stub(isolate(), slots);
186 __ CallStub(&stub); 186 __ CallStub(&stub);
187 // Result of FastNewContextStub is always in new space. 187 // Result of FastNewFunctionContextStub is always in new space.
188 need_write_barrier = false; 188 need_write_barrier = false;
189 } else { 189 } else {
190 __ Push(rdi); 190 __ Push(rdi);
191 __ CallRuntime(Runtime::kNewFunctionContext); 191 __ CallRuntime(Runtime::kNewFunctionContext);
192 } 192 }
193 RecordSafepoint(deopt_mode); 193 RecordSafepoint(deopt_mode);
194 194
195 // Context is returned in rax. It replaces the context passed to us. 195 // Context is returned in rax. It replaces the context passed to us.
196 // It's saved in the stack and kept live in rsi. 196 // It's saved in the stack and kept live in rsi.
197 __ movp(rsi, rax); 197 __ movp(rsi, rax);
(...skipping 5375 matching lines...) Expand 10 before | Expand all | Expand 10 after
5573 __ bind(deferred->exit()); 5573 __ bind(deferred->exit());
5574 __ bind(&done); 5574 __ bind(&done);
5575 } 5575 }
5576 5576
5577 #undef __ 5577 #undef __
5578 5578
5579 } // namespace internal 5579 } // namespace internal
5580 } // namespace v8 5580 } // namespace v8
5581 5581
5582 #endif // V8_TARGET_ARCH_X64 5582 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/crankshaft/s390/lithium-codegen-s390.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698