| 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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
| 8 | 8 |
| 9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
| 10 // | 10 // |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 } | 213 } |
| 214 function_in_register = false; | 214 function_in_register = false; |
| 215 // Context is returned in v0. It replaces the context passed to us. | 215 // Context is returned in v0. It replaces the context passed to us. |
| 216 // It's saved in the stack and kept live in cp. | 216 // It's saved in the stack and kept live in cp. |
| 217 __ mov(cp, v0); | 217 __ mov(cp, v0); |
| 218 __ sd(v0, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 218 __ sd(v0, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 219 // Copy any necessary parameters into the context. | 219 // Copy any necessary parameters into the context. |
| 220 int num_parameters = info->scope()->num_parameters(); | 220 int num_parameters = info->scope()->num_parameters(); |
| 221 int first_parameter = info->scope()->has_this_declaration() ? -1 : 0; | 221 int first_parameter = info->scope()->has_this_declaration() ? -1 : 0; |
| 222 for (int i = first_parameter; i < num_parameters; i++) { | 222 for (int i = first_parameter; i < num_parameters; i++) { |
| 223 Variable* var = (i == -1) ? scope()->receiver() : scope()->parameter(i); | 223 Variable* var = |
| 224 (i == -1) ? scope()->receiver() : scope()->parameter_var(i); |
| 224 if (var->IsContextSlot()) { | 225 if (var->IsContextSlot()) { |
| 225 int parameter_offset = StandardFrameConstants::kCallerSPOffset + | 226 int parameter_offset = StandardFrameConstants::kCallerSPOffset + |
| 226 (num_parameters - 1 - i) * kPointerSize; | 227 (num_parameters - 1 - i) * kPointerSize; |
| 227 // Load parameter from stack. | 228 // Load parameter from stack. |
| 228 __ ld(a0, MemOperand(fp, parameter_offset)); | 229 __ ld(a0, MemOperand(fp, parameter_offset)); |
| 229 // Store it in the context. | 230 // Store it in the context. |
| 230 MemOperand target = ContextOperand(cp, var->index()); | 231 MemOperand target = ContextOperand(cp, var->index()); |
| 231 __ sd(a0, target); | 232 __ sd(a0, target); |
| 232 | 233 |
| 233 // Update the write barrier. | 234 // Update the write barrier. |
| (...skipping 5333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5567 reinterpret_cast<uint64_t>( | 5568 reinterpret_cast<uint64_t>( |
| 5568 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5569 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5569 return OSR_AFTER_STACK_CHECK; | 5570 return OSR_AFTER_STACK_CHECK; |
| 5570 } | 5571 } |
| 5571 | 5572 |
| 5572 | 5573 |
| 5573 } // namespace internal | 5574 } // namespace internal |
| 5574 } // namespace v8 | 5575 } // namespace v8 |
| 5575 | 5576 |
| 5576 #endif // V8_TARGET_ARCH_MIPS64 | 5577 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |