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

Side by Side Diff: src/full-codegen/mips64/full-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/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-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 #if V8_TARGET_ARCH_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 __ Push(info->scope()->scope_info()); 200 __ Push(info->scope()->scope_info());
201 __ CallRuntime(Runtime::kNewScriptContext); 201 __ CallRuntime(Runtime::kNewScriptContext);
202 PrepareForBailoutForId(BailoutId::ScriptContext(), 202 PrepareForBailoutForId(BailoutId::ScriptContext(),
203 BailoutState::TOS_REGISTER); 203 BailoutState::TOS_REGISTER);
204 // The new target value is not used, clobbering is safe. 204 // The new target value is not used, clobbering is safe.
205 DCHECK_NULL(info->scope()->new_target_var()); 205 DCHECK_NULL(info->scope()->new_target_var());
206 } else { 206 } else {
207 if (info->scope()->new_target_var() != nullptr) { 207 if (info->scope()->new_target_var() != nullptr) {
208 __ push(a3); // Preserve new target. 208 __ push(a3); // Preserve new target.
209 } 209 }
210 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { 210 if (slots <= FastNewFunctionContextStub::MaximumSlots()) {
211 FastNewFunctionContextStub stub(isolate()); 211 FastNewFunctionContextStub stub(isolate(), info->scope()->scope_type());
212 __ li(FastNewFunctionContextDescriptor::SlotsRegister(), 212 __ li(FastNewFunctionContextDescriptor::SlotsRegister(),
213 Operand(slots)); 213 Operand(slots));
214 __ CallStub(&stub); 214 __ CallStub(&stub);
215 // Result of FastNewFunctionContextStub is always in new space. 215 // Result of FastNewFunctionContextStub is always in new space.
216 need_write_barrier = false; 216 need_write_barrier = false;
217 } else { 217 } else {
218 __ push(a1); 218 __ push(a1);
219 __ Push(Smi::FromInt(info->scope()->scope_type()));
219 __ CallRuntime(Runtime::kNewFunctionContext); 220 __ CallRuntime(Runtime::kNewFunctionContext);
220 } 221 }
221 if (info->scope()->new_target_var() != nullptr) { 222 if (info->scope()->new_target_var() != nullptr) {
222 __ pop(a3); // Restore new target. 223 __ pop(a3); // Restore new target.
223 } 224 }
224 } 225 }
225 function_in_register_a1 = false; 226 function_in_register_a1 = false;
226 // Context is returned in v0. It replaces the context passed to us. 227 // Context is returned in v0. It replaces the context passed to us.
227 // It's saved in the stack and kept live in cp. 228 // It's saved in the stack and kept live in cp.
228 __ mov(cp, v0); 229 __ mov(cp, v0);
(...skipping 2657 matching lines...) Expand 10 before | Expand all | Expand 10 after
2886 reinterpret_cast<uint64_t>( 2887 reinterpret_cast<uint64_t>(
2887 isolate->builtins()->OnStackReplacement()->entry())); 2888 isolate->builtins()->OnStackReplacement()->entry()));
2888 return ON_STACK_REPLACEMENT; 2889 return ON_STACK_REPLACEMENT;
2889 } 2890 }
2890 2891
2891 2892
2892 } // namespace internal 2893 } // namespace internal
2893 } // namespace v8 2894 } // namespace v8
2894 2895
2895 #endif // V8_TARGET_ARCH_MIPS64 2896 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698