| 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 #if V8_TARGET_ARCH_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 6 | 6 |
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 __ Push(info->scope()->GetScopeInfo(info->isolate())); | 183 __ Push(info->scope()->GetScopeInfo(info->isolate())); |
| 184 __ CallRuntime(Runtime::kNewScriptContext); | 184 __ CallRuntime(Runtime::kNewScriptContext); |
| 185 PrepareForBailoutForId(BailoutId::ScriptContext(), | 185 PrepareForBailoutForId(BailoutId::ScriptContext(), |
| 186 BailoutState::TOS_REGISTER); | 186 BailoutState::TOS_REGISTER); |
| 187 // The new target value is not used, clobbering is safe. | 187 // The new target value is not used, clobbering is safe. |
| 188 DCHECK_NULL(info->scope()->new_target_var()); | 188 DCHECK_NULL(info->scope()->new_target_var()); |
| 189 } else { | 189 } else { |
| 190 if (info->scope()->new_target_var() != nullptr) { | 190 if (info->scope()->new_target_var() != nullptr) { |
| 191 __ push(r6); // Preserve new target. | 191 __ push(r6); // Preserve new target. |
| 192 } | 192 } |
| 193 FastNewFunctionContextStub stub(isolate()); | 193 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { |
| 194 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); | 194 FastNewFunctionContextStub stub(isolate()); |
| 195 __ CallStub(&stub); | 195 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
| 196 // Result of FastNewFunctionContextStub is always in new space. | 196 Operand(slots)); |
| 197 need_write_barrier = false; | 197 __ CallStub(&stub); |
| 198 // Result of FastNewFunctionContextStub is always in new space. |
| 199 need_write_barrier = false; |
| 200 } else { |
| 201 __ push(r4); |
| 202 __ CallRuntime(Runtime::kNewFunctionContext); |
| 203 } |
| 198 if (info->scope()->new_target_var() != nullptr) { | 204 if (info->scope()->new_target_var() != nullptr) { |
| 199 __ pop(r6); // Preserve new target. | 205 __ pop(r6); // Preserve new target. |
| 200 } | 206 } |
| 201 } | 207 } |
| 202 function_in_register_r4 = false; | 208 function_in_register_r4 = false; |
| 203 // Context is returned in r3. It replaces the context passed to us. | 209 // Context is returned in r3. It replaces the context passed to us. |
| 204 // It's saved in the stack and kept live in cp. | 210 // It's saved in the stack and kept live in cp. |
| 205 __ mr(cp, r3); | 211 __ mr(cp, r3); |
| 206 __ StoreP(r3, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 212 __ StoreP(r3, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 207 // Copy any necessary parameters into the context. | 213 // Copy any necessary parameters into the context. |
| (...skipping 3530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3738 | 3744 |
| 3739 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3745 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
| 3740 | 3746 |
| 3741 DCHECK(interrupt_address == | 3747 DCHECK(interrupt_address == |
| 3742 isolate->builtins()->OnStackReplacement()->entry()); | 3748 isolate->builtins()->OnStackReplacement()->entry()); |
| 3743 return ON_STACK_REPLACEMENT; | 3749 return ON_STACK_REPLACEMENT; |
| 3744 } | 3750 } |
| 3745 } // namespace internal | 3751 } // namespace internal |
| 3746 } // namespace v8 | 3752 } // namespace v8 |
| 3747 #endif // V8_TARGET_ARCH_PPC | 3753 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |