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

Side by Side Diff: src/crankshaft/s390/lithium-codegen-s390.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/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // 2 //
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "src/crankshaft/s390/lithium-codegen-s390.h" 6 #include "src/crankshaft/s390/lithium-codegen-s390.h"
7 7
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 Comment(";;; Allocate local context"); 155 Comment(";;; Allocate local context");
156 bool need_write_barrier = true; 156 bool need_write_barrier = true;
157 // Argument to NewContext is the function, which is in r3. 157 // Argument to NewContext is the function, which is in r3.
158 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 158 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
159 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; 159 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
160 if (info()->scope()->is_script_scope()) { 160 if (info()->scope()->is_script_scope()) {
161 __ push(r3); 161 __ push(r3);
162 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); 162 __ Push(info()->scope()->GetScopeInfo(info()->isolate()));
163 __ CallRuntime(Runtime::kNewScriptContext); 163 __ CallRuntime(Runtime::kNewScriptContext);
164 deopt_mode = Safepoint::kLazyDeopt; 164 deopt_mode = Safepoint::kLazyDeopt;
165 } else if (slots <= FastNewContextStub::kMaximumSlots) { 165 } else if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
166 FastNewContextStub stub(isolate(), slots); 166 FastNewFunctionContextStub stub(isolate(), slots);
167 __ CallStub(&stub); 167 __ CallStub(&stub);
168 // Result of FastNewContextStub is always in new space. 168 // Result of FastNewFunctionContextStub is always in new space.
169 need_write_barrier = false; 169 need_write_barrier = false;
170 } else { 170 } else {
171 __ push(r3); 171 __ push(r3);
172 __ CallRuntime(Runtime::kNewFunctionContext); 172 __ CallRuntime(Runtime::kNewFunctionContext);
173 } 173 }
174 RecordSafepoint(deopt_mode); 174 RecordSafepoint(deopt_mode);
175 175
176 // Context is returned in both r2 and cp. It replaces the context 176 // Context is returned in both r2 and cp. It replaces the context
177 // passed to us. It's saved in the stack and kept live in cp. 177 // passed to us. It's saved in the stack and kept live in cp.
178 __ LoadRR(cp, r2); 178 __ LoadRR(cp, r2);
(...skipping 5494 matching lines...) Expand 10 before | Expand all | Expand 10 after
5673 __ LoadP(result, 5673 __ LoadP(result,
5674 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5674 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5675 __ bind(deferred->exit()); 5675 __ bind(deferred->exit());
5676 __ bind(&done); 5676 __ bind(&done);
5677 } 5677 }
5678 5678
5679 #undef __ 5679 #undef __
5680 5680
5681 } // namespace internal 5681 } // namespace internal
5682 } // namespace v8 5682 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698