| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 7 #if V8_TARGET_ARCH_PPC |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 } | 212 } |
| 213 function_in_register = false; | 213 function_in_register = false; |
| 214 // Context is returned in r3. It replaces the context passed to us. | 214 // Context is returned in r3. It replaces the context passed to us. |
| 215 // It's saved in the stack and kept live in cp. | 215 // It's saved in the stack and kept live in cp. |
| 216 __ mr(cp, r3); | 216 __ mr(cp, r3); |
| 217 __ StoreP(r3, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 217 __ StoreP(r3, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 218 // Copy any necessary parameters into the context. | 218 // Copy any necessary parameters into the context. |
| 219 int num_parameters = info->scope()->num_parameters(); | 219 int num_parameters = info->scope()->num_parameters(); |
| 220 int first_parameter = info->scope()->has_this_declaration() ? -1 : 0; | 220 int first_parameter = info->scope()->has_this_declaration() ? -1 : 0; |
| 221 for (int i = first_parameter; i < num_parameters; i++) { | 221 for (int i = first_parameter; i < num_parameters; i++) { |
| 222 Variable* var = (i == -1) ? scope()->receiver() : scope()->parameter(i); | 222 Variable* var = |
| 223 (i == -1) ? scope()->receiver() : scope()->parameter_var(i); |
| 223 if (var->IsContextSlot()) { | 224 if (var->IsContextSlot()) { |
| 224 int parameter_offset = StandardFrameConstants::kCallerSPOffset + | 225 int parameter_offset = StandardFrameConstants::kCallerSPOffset + |
| 225 (num_parameters - 1 - i) * kPointerSize; | 226 (num_parameters - 1 - i) * kPointerSize; |
| 226 // Load parameter from stack. | 227 // Load parameter from stack. |
| 227 __ LoadP(r3, MemOperand(fp, parameter_offset), r0); | 228 __ LoadP(r3, MemOperand(fp, parameter_offset), r0); |
| 228 // Store it in the context. | 229 // Store it in the context. |
| 229 MemOperand target = ContextOperand(cp, var->index()); | 230 MemOperand target = ContextOperand(cp, var->index()); |
| 230 __ StoreP(r3, target, r0); | 231 __ StoreP(r3, target, r0); |
| 231 | 232 |
| 232 // Update the write barrier. | 233 // Update the write barrier. |
| (...skipping 5334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5567 return ON_STACK_REPLACEMENT; | 5568 return ON_STACK_REPLACEMENT; |
| 5568 } | 5569 } |
| 5569 | 5570 |
| 5570 DCHECK(interrupt_address == | 5571 DCHECK(interrupt_address == |
| 5571 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5572 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5572 return OSR_AFTER_STACK_CHECK; | 5573 return OSR_AFTER_STACK_CHECK; |
| 5573 } | 5574 } |
| 5574 } // namespace internal | 5575 } // namespace internal |
| 5575 } // namespace v8 | 5576 } // namespace v8 |
| 5576 #endif // V8_TARGET_ARCH_PPC | 5577 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |