OLD | NEW |
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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 } | 216 } |
217 function_in_register = false; | 217 function_in_register = false; |
218 // Context is returned in v0. It replaces the context passed to us. | 218 // Context is returned in v0. It replaces the context passed to us. |
219 // It's saved in the stack and kept live in cp. | 219 // It's saved in the stack and kept live in cp. |
220 __ mov(cp, v0); | 220 __ mov(cp, v0); |
221 __ sw(v0, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 221 __ sw(v0, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
222 // Copy any necessary parameters into the context. | 222 // Copy any necessary parameters into the context. |
223 int num_parameters = info->scope()->num_parameters(); | 223 int num_parameters = info->scope()->num_parameters(); |
224 int first_parameter = info->scope()->has_this_declaration() ? -1 : 0; | 224 int first_parameter = info->scope()->has_this_declaration() ? -1 : 0; |
225 for (int i = first_parameter; i < num_parameters; i++) { | 225 for (int i = first_parameter; i < num_parameters; i++) { |
226 Variable* var = (i == -1) ? scope()->receiver() : scope()->parameter(i); | 226 Variable* var = |
| 227 (i == -1) ? scope()->receiver() : scope()->parameter_var(i); |
227 if (var->IsContextSlot()) { | 228 if (var->IsContextSlot()) { |
228 int parameter_offset = StandardFrameConstants::kCallerSPOffset + | 229 int parameter_offset = StandardFrameConstants::kCallerSPOffset + |
229 (num_parameters - 1 - i) * kPointerSize; | 230 (num_parameters - 1 - i) * kPointerSize; |
230 // Load parameter from stack. | 231 // Load parameter from stack. |
231 __ lw(a0, MemOperand(fp, parameter_offset)); | 232 __ lw(a0, MemOperand(fp, parameter_offset)); |
232 // Store it in the context. | 233 // Store it in the context. |
233 MemOperand target = ContextOperand(cp, var->index()); | 234 MemOperand target = ContextOperand(cp, var->index()); |
234 __ sw(a0, target); | 235 __ sw(a0, target); |
235 | 236 |
236 // Update the write barrier. | 237 // Update the write barrier. |
(...skipping 5323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5560 reinterpret_cast<uint32_t>( | 5561 reinterpret_cast<uint32_t>( |
5561 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5562 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5562 return OSR_AFTER_STACK_CHECK; | 5563 return OSR_AFTER_STACK_CHECK; |
5563 } | 5564 } |
5564 | 5565 |
5565 | 5566 |
5566 } // namespace internal | 5567 } // namespace internal |
5567 } // namespace v8 | 5568 } // namespace v8 |
5568 | 5569 |
5569 #endif // V8_TARGET_ARCH_MIPS | 5570 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |