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

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 Comment(";;; Allocate local context"); 165 Comment(";;; Allocate local context");
166 bool need_write_barrier = true; 166 bool need_write_barrier = true;
167 // Argument to NewContext is the function, which is in r4. 167 // Argument to NewContext is the function, which is in r4.
168 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 168 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
169 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; 169 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
170 if (info()->scope()->is_script_scope()) { 170 if (info()->scope()->is_script_scope()) {
171 __ push(r4); 171 __ push(r4);
172 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); 172 __ Push(info()->scope()->GetScopeInfo(info()->isolate()));
173 __ CallRuntime(Runtime::kNewScriptContext); 173 __ CallRuntime(Runtime::kNewScriptContext);
174 deopt_mode = Safepoint::kLazyDeopt; 174 deopt_mode = Safepoint::kLazyDeopt;
175 } else if (slots <= FastNewContextStub::kMaximumSlots) { 175 } else if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
176 FastNewContextStub stub(isolate(), slots); 176 FastNewFunctionContextStub stub(isolate(), slots);
177 __ CallStub(&stub); 177 __ CallStub(&stub);
178 // Result of FastNewContextStub is always in new space. 178 // Result of FastNewFunctionContextStub is always in new space.
179 need_write_barrier = false; 179 need_write_barrier = false;
180 } else { 180 } else {
181 __ push(r4); 181 __ push(r4);
182 __ CallRuntime(Runtime::kNewFunctionContext); 182 __ CallRuntime(Runtime::kNewFunctionContext);
183 } 183 }
184 RecordSafepoint(deopt_mode); 184 RecordSafepoint(deopt_mode);
185 185
186 // Context is returned in both r3 and cp. It replaces the context 186 // Context is returned in both r3 and cp. It replaces the context
187 // passed to us. It's saved in the stack and kept live in cp. 187 // passed to us. It's saved in the stack and kept live in cp.
188 __ mr(cp, r3); 188 __ mr(cp, r3);
(...skipping 5598 matching lines...) Expand 10 before | Expand all | Expand 10 after
5787 __ LoadP(result, 5787 __ LoadP(result,
5788 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5788 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5789 __ bind(deferred->exit()); 5789 __ bind(deferred->exit());
5790 __ bind(&done); 5790 __ bind(&done);
5791 } 5791 }
5792 5792
5793 #undef __ 5793 #undef __
5794 5794
5795 } // namespace internal 5795 } // namespace internal
5796 } // namespace v8 5796 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-codegen-mips64.cc ('k') | src/crankshaft/s390/lithium-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698