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

Side by Side Diff: src/crankshaft/x87/lithium-codegen-x87.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/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm/full-codegen-arm.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 Comment(";;; Allocate local context"); 141 Comment(";;; Allocate local context");
142 bool need_write_barrier = true; 142 bool need_write_barrier = true;
143 // Argument to NewContext is the function, which is still in edi. 143 // Argument to NewContext is the function, which is still in edi.
144 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 144 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
145 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; 145 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
146 if (info()->scope()->is_script_scope()) { 146 if (info()->scope()->is_script_scope()) {
147 __ push(edi); 147 __ push(edi);
148 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); 148 __ Push(info()->scope()->GetScopeInfo(info()->isolate()));
149 __ CallRuntime(Runtime::kNewScriptContext); 149 __ CallRuntime(Runtime::kNewScriptContext);
150 deopt_mode = Safepoint::kLazyDeopt; 150 deopt_mode = Safepoint::kLazyDeopt;
151 } else if (slots <= FastNewContextStub::kMaximumSlots) { 151 } else if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
152 FastNewContextStub stub(isolate(), slots); 152 FastNewFunctionContextStub stub(isolate(), slots);
153 __ CallStub(&stub); 153 __ CallStub(&stub);
154 // Result of FastNewContextStub is always in new space. 154 // Result of FastNewFunctionContextStub is always in new space.
155 need_write_barrier = false; 155 need_write_barrier = false;
156 } else { 156 } else {
157 __ push(edi); 157 __ push(edi);
158 __ CallRuntime(Runtime::kNewFunctionContext); 158 __ CallRuntime(Runtime::kNewFunctionContext);
159 } 159 }
160 RecordSafepoint(deopt_mode); 160 RecordSafepoint(deopt_mode);
161 161
162 // Context is returned in eax. It replaces the context passed to us. 162 // Context is returned in eax. It replaces the context passed to us.
163 // It's saved in the stack and kept live in esi. 163 // It's saved in the stack and kept live in esi.
164 __ mov(esi, eax); 164 __ mov(esi, eax);
(...skipping 5613 matching lines...) Expand 10 before | Expand all | Expand 10 after
5778 __ bind(deferred->exit()); 5778 __ bind(deferred->exit());
5779 __ bind(&done); 5779 __ bind(&done);
5780 } 5780 }
5781 5781
5782 #undef __ 5782 #undef __
5783 5783
5784 } // namespace internal 5784 } // namespace internal
5785 } // namespace v8 5785 } // namespace v8
5786 5786
5787 #endif // V8_TARGET_ARCH_X87 5787 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698