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

Side by Side Diff: src/full-codegen/mips/full-codegen-mips.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
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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 __ Push(info->scope()->scope_info()); 201 __ Push(info->scope()->scope_info());
202 __ CallRuntime(Runtime::kNewScriptContext); 202 __ CallRuntime(Runtime::kNewScriptContext);
203 PrepareForBailoutForId(BailoutId::ScriptContext(), 203 PrepareForBailoutForId(BailoutId::ScriptContext(),
204 BailoutState::TOS_REGISTER); 204 BailoutState::TOS_REGISTER);
205 // The new target value is not used, clobbering is safe. 205 // The new target value is not used, clobbering is safe.
206 DCHECK_NULL(info->scope()->new_target_var()); 206 DCHECK_NULL(info->scope()->new_target_var());
207 } else { 207 } else {
208 if (info->scope()->new_target_var() != nullptr) { 208 if (info->scope()->new_target_var() != nullptr) {
209 __ push(a3); // Preserve new target. 209 __ push(a3); // Preserve new target.
210 } 210 }
211 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { 211 if (slots <= FastNewFunctionContextStub::MaximumSlots()) {
212 FastNewFunctionContextStub stub(isolate()); 212 FastNewFunctionContextStub stub(isolate(), info->scope()->scope_type());
213 __ li(FastNewFunctionContextDescriptor::SlotsRegister(), 213 __ li(FastNewFunctionContextDescriptor::SlotsRegister(),
214 Operand(slots)); 214 Operand(slots));
215 __ CallStub(&stub); 215 __ CallStub(&stub);
216 // Result of FastNewFunctionContextStub is always in new space. 216 // Result of FastNewFunctionContextStub is always in new space.
217 need_write_barrier = false; 217 need_write_barrier = false;
218 } else { 218 } else {
219 __ push(a1); 219 __ push(a1);
220 __ Push(Smi::FromInt(info->scope()->scope_type()));
220 __ CallRuntime(Runtime::kNewFunctionContext); 221 __ CallRuntime(Runtime::kNewFunctionContext);
221 } 222 }
222 if (info->scope()->new_target_var() != nullptr) { 223 if (info->scope()->new_target_var() != nullptr) {
223 __ pop(a3); // Restore new target. 224 __ pop(a3); // Restore new target.
224 } 225 }
225 } 226 }
226 function_in_register_a1 = false; 227 function_in_register_a1 = false;
227 // Context is returned in v0. It replaces the context passed to us. 228 // Context is returned in v0. It replaces the context passed to us.
228 // It's saved in the stack and kept live in cp. 229 // It's saved in the stack and kept live in cp.
229 __ mov(cp, v0); 230 __ mov(cp, v0);
(...skipping 2647 matching lines...) Expand 10 before | Expand all | Expand 10 after
2877 reinterpret_cast<uint32_t>( 2878 reinterpret_cast<uint32_t>(
2878 isolate->builtins()->OnStackReplacement()->entry())); 2879 isolate->builtins()->OnStackReplacement()->entry()));
2879 return ON_STACK_REPLACEMENT; 2880 return ON_STACK_REPLACEMENT;
2880 } 2881 }
2881 2882
2882 2883
2883 } // namespace internal 2884 } // namespace internal
2884 } // namespace v8 2885 } // namespace v8
2885 2886
2886 #endif // V8_TARGET_ARCH_MIPS 2887 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698