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

Side by Side Diff: src/crankshaft/mips64/lithium-codegen-mips64.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/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/ppc/lithium-codegen-ppc.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 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 Comment(";;; Allocate local context"); 154 Comment(";;; Allocate local context");
155 bool need_write_barrier = true; 155 bool need_write_barrier = true;
156 // Argument to NewContext is the function, which is in a1. 156 // Argument to NewContext is the function, which is in a1.
157 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 157 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
158 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; 158 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
159 if (info()->scope()->is_script_scope()) { 159 if (info()->scope()->is_script_scope()) {
160 __ push(a1); 160 __ push(a1);
161 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); 161 __ Push(info()->scope()->GetScopeInfo(info()->isolate()));
162 __ CallRuntime(Runtime::kNewScriptContext); 162 __ CallRuntime(Runtime::kNewScriptContext);
163 deopt_mode = Safepoint::kLazyDeopt; 163 deopt_mode = Safepoint::kLazyDeopt;
164 } else if (slots <= FastNewContextStub::kMaximumSlots) { 164 } else if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
165 FastNewContextStub stub(isolate(), slots); 165 FastNewFunctionContextStub stub(isolate(), slots);
166 __ CallStub(&stub); 166 __ CallStub(&stub);
167 // Result of FastNewContextStub is always in new space. 167 // Result of FastNewFunctionContextStub is always in new space.
168 need_write_barrier = false; 168 need_write_barrier = false;
169 } else { 169 } else {
170 __ push(a1); 170 __ push(a1);
171 __ CallRuntime(Runtime::kNewFunctionContext); 171 __ CallRuntime(Runtime::kNewFunctionContext);
172 } 172 }
173 RecordSafepoint(deopt_mode); 173 RecordSafepoint(deopt_mode);
174 174
175 // Context is returned in both v0. It replaces the context passed to us. 175 // Context is returned in both v0. It replaces the context passed to us.
176 // It's saved in the stack and kept live in cp. 176 // It's saved in the stack and kept live in cp.
177 __ mov(cp, v0); 177 __ mov(cp, v0);
(...skipping 5556 matching lines...) Expand 10 before | Expand all | Expand 10 after
5734 __ ld(result, FieldMemOperand(scratch, 5734 __ ld(result, FieldMemOperand(scratch,
5735 FixedArray::kHeaderSize - kPointerSize)); 5735 FixedArray::kHeaderSize - kPointerSize));
5736 __ bind(deferred->exit()); 5736 __ bind(deferred->exit());
5737 __ bind(&done); 5737 __ bind(&done);
5738 } 5738 }
5739 5739
5740 #undef __ 5740 #undef __
5741 5741
5742 } // namespace internal 5742 } // namespace internal
5743 } // namespace v8 5743 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698