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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // Emit the remaining pushes. | 166 // Emit the remaining pushes. |
167 for (int i = 0; i < remaining; i++) { | 167 for (int i = 0; i < remaining; i++) { |
168 __ push(ip); | 168 __ push(ip); |
169 } | 169 } |
170 } | 170 } |
171 } | 171 } |
172 | 172 |
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()->num_heap_slots() > 0) { | 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()->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); |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 | 1169 |
1170 | 1170 |
1171 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, | 1171 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, |
1172 Label* slow) { | 1172 Label* slow) { |
1173 DCHECK(var->IsContextSlot()); | 1173 DCHECK(var->IsContextSlot()); |
1174 Register context = cp; | 1174 Register context = cp; |
1175 Register next = r6; | 1175 Register next = r6; |
1176 Register temp = r7; | 1176 Register temp = r7; |
1177 | 1177 |
1178 for (Scope* s = scope(); s != var->scope(); s = s->outer_scope()) { | 1178 for (Scope* s = scope(); s != var->scope(); s = s->outer_scope()) { |
1179 if (s->num_heap_slots() > 0) { | 1179 if (s->NeedsContext()) { |
1180 if (s->calls_sloppy_eval()) { | 1180 if (s->calls_sloppy_eval()) { |
1181 // Check that extension is "the hole". | 1181 // Check that extension is "the hole". |
1182 __ LoadP(temp, ContextMemOperand(context, Context::EXTENSION_INDEX)); | 1182 __ LoadP(temp, ContextMemOperand(context, Context::EXTENSION_INDEX)); |
1183 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); | 1183 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); |
1184 } | 1184 } |
1185 __ LoadP(next, ContextMemOperand(context, Context::PREVIOUS_INDEX)); | 1185 __ LoadP(next, ContextMemOperand(context, Context::PREVIOUS_INDEX)); |
1186 // Walk the rest of the chain without clobbering cp. | 1186 // Walk the rest of the chain without clobbering cp. |
1187 context = next; | 1187 context = next; |
1188 } | 1188 } |
1189 } | 1189 } |
(...skipping 2546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3736 | 3736 |
3737 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3737 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
3738 | 3738 |
3739 DCHECK(interrupt_address == | 3739 DCHECK(interrupt_address == |
3740 isolate->builtins()->OnStackReplacement()->entry()); | 3740 isolate->builtins()->OnStackReplacement()->entry()); |
3741 return ON_STACK_REPLACEMENT; | 3741 return ON_STACK_REPLACEMENT; |
3742 } | 3742 } |
3743 } // namespace internal | 3743 } // namespace internal |
3744 } // namespace v8 | 3744 } // namespace v8 |
3745 #endif // V8_TARGET_ARCH_PPC | 3745 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |