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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 bool function_in_register_r4 = true; | 173 bool function_in_register_r4 = true; |
174 | 174 |
175 // Possibly allocate a local context. | 175 // Possibly allocate a local context. |
176 if (info->scope()->NeedsContext()) { | 176 if (info->scope()->NeedsContext()) { |
177 // Argument to NewContext is the function, which is still in r4. | 177 // Argument to NewContext is the function, which is still in r4. |
178 Comment cmnt(masm_, "[ Allocate context"); | 178 Comment cmnt(masm_, "[ Allocate context"); |
179 bool need_write_barrier = true; | 179 bool need_write_barrier = true; |
180 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 180 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
181 if (info->scope()->is_script_scope()) { | 181 if (info->scope()->is_script_scope()) { |
182 __ push(r4); | 182 __ push(r4); |
183 __ Push(info->scope()->GetScopeInfo(info->isolate())); | 183 __ Push(info->scope()->scope_info()); |
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 FastNewFunctionContextStub stub(isolate()); |
(...skipping 3543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3737 | 3737 |
3738 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3738 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
3739 | 3739 |
3740 DCHECK(interrupt_address == | 3740 DCHECK(interrupt_address == |
3741 isolate->builtins()->OnStackReplacement()->entry()); | 3741 isolate->builtins()->OnStackReplacement()->entry()); |
3742 return ON_STACK_REPLACEMENT; | 3742 return ON_STACK_REPLACEMENT; |
3743 } | 3743 } |
3744 } // namespace internal | 3744 } // namespace internal |
3745 } // namespace v8 | 3745 } // namespace v8 |
3746 #endif // V8_TARGET_ARCH_PPC | 3746 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |