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

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

Issue 2435023002: Use a different map to distinguish eval contexts (Closed)
Patch Set: Changes from review Created 4 years 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 bool need_write_barrier = true; 171 bool need_write_barrier = true;
172 // Argument to NewContext is the function, which is in a1. 172 // Argument to NewContext is the function, which is in a1.
173 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 173 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
174 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; 174 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
175 if (info()->scope()->is_script_scope()) { 175 if (info()->scope()->is_script_scope()) {
176 __ push(a1); 176 __ push(a1);
177 __ Push(info()->scope()->scope_info()); 177 __ Push(info()->scope()->scope_info());
178 __ CallRuntime(Runtime::kNewScriptContext); 178 __ CallRuntime(Runtime::kNewScriptContext);
179 deopt_mode = Safepoint::kLazyDeopt; 179 deopt_mode = Safepoint::kLazyDeopt;
180 } else { 180 } else {
181 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { 181 if (slots <= FastNewFunctionContextStub::MaximumSlots()) {
182 FastNewFunctionContextStub stub(isolate()); 182 FastNewFunctionContextStub stub(isolate(),
183 info()->scope()->scope_type());
183 __ li(FastNewFunctionContextDescriptor::SlotsRegister(), 184 __ li(FastNewFunctionContextDescriptor::SlotsRegister(),
184 Operand(slots)); 185 Operand(slots));
185 __ CallStub(&stub); 186 __ CallStub(&stub);
186 // Result of FastNewFunctionContextStub is always in new space. 187 // Result of FastNewFunctionContextStub is always in new space.
187 need_write_barrier = false; 188 need_write_barrier = false;
188 } else { 189 } else {
189 __ push(a1); 190 __ push(a1);
191 __ Push(Smi::FromInt(info()->scope()->scope_type()));
190 __ CallRuntime(Runtime::kNewFunctionContext); 192 __ CallRuntime(Runtime::kNewFunctionContext);
191 } 193 }
192 } 194 }
193 RecordSafepoint(deopt_mode); 195 RecordSafepoint(deopt_mode);
194 196
195 // Context is returned in both v0. It replaces the context passed to us. 197 // Context is returned in both v0. It replaces the context passed to us.
196 // It's saved in the stack and kept live in cp. 198 // It's saved in the stack and kept live in cp.
197 __ mov(cp, v0); 199 __ mov(cp, v0);
198 __ sd(v0, MemOperand(fp, StandardFrameConstants::kContextOffset)); 200 __ sd(v0, MemOperand(fp, StandardFrameConstants::kContextOffset));
199 // Copy any necessary parameters into the context. 201 // Copy any necessary parameters into the context.
(...skipping 5420 matching lines...) Expand 10 before | Expand all | Expand 10 after
5620 __ ld(result, FieldMemOperand(scratch, 5622 __ ld(result, FieldMemOperand(scratch,
5621 FixedArray::kHeaderSize - kPointerSize)); 5623 FixedArray::kHeaderSize - kPointerSize));
5622 __ bind(deferred->exit()); 5624 __ bind(deferred->exit());
5623 __ bind(&done); 5625 __ bind(&done);
5624 } 5626 }
5625 5627
5626 #undef __ 5628 #undef __
5627 5629
5628 } // namespace internal 5630 } // namespace internal
5629 } // namespace v8 5631 } // 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