OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 for (int i = 0; i < remaining; i++) { | 171 for (int i = 0; i < remaining; i++) { |
172 __ StoreP(ip, MemOperand(sp, i * kPointerSize)); | 172 __ StoreP(ip, MemOperand(sp, i * kPointerSize)); |
173 } | 173 } |
174 } | 174 } |
175 } | 175 } |
176 } | 176 } |
177 | 177 |
178 bool function_in_register_r3 = true; | 178 bool function_in_register_r3 = true; |
179 | 179 |
180 // Possibly allocate a local context. | 180 // Possibly allocate a local context. |
181 if (info->scope()->num_heap_slots() > 0) { | 181 if (info->scope()->NeedsContext()) { |
182 // Argument to NewContext is the function, which is still in r3. | 182 // Argument to NewContext is the function, which is still in r3. |
183 Comment cmnt(masm_, "[ Allocate context"); | 183 Comment cmnt(masm_, "[ Allocate context"); |
184 bool need_write_barrier = true; | 184 bool need_write_barrier = true; |
185 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 185 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
186 if (info->scope()->is_script_scope()) { | 186 if (info->scope()->is_script_scope()) { |
187 __ push(r3); | 187 __ push(r3); |
188 __ Push(info->scope()->GetScopeInfo(info->isolate())); | 188 __ Push(info->scope()->GetScopeInfo(info->isolate())); |
189 __ CallRuntime(Runtime::kNewScriptContext); | 189 __ CallRuntime(Runtime::kNewScriptContext); |
190 PrepareForBailoutForId(BailoutId::ScriptContext(), | 190 PrepareForBailoutForId(BailoutId::ScriptContext(), |
191 BailoutState::TOS_REGISTER); | 191 BailoutState::TOS_REGISTER); |
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 } | 1135 } |
1136 | 1136 |
1137 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, | 1137 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, |
1138 Label* slow) { | 1138 Label* slow) { |
1139 DCHECK(var->IsContextSlot()); | 1139 DCHECK(var->IsContextSlot()); |
1140 Register context = cp; | 1140 Register context = cp; |
1141 Register next = r5; | 1141 Register next = r5; |
1142 Register temp = r6; | 1142 Register temp = r6; |
1143 | 1143 |
1144 for (Scope* s = scope(); s != var->scope(); s = s->outer_scope()) { | 1144 for (Scope* s = scope(); s != var->scope(); s = s->outer_scope()) { |
1145 if (s->num_heap_slots() > 0) { | 1145 if (s->NeedsContext()) { |
1146 if (s->calls_sloppy_eval()) { | 1146 if (s->calls_sloppy_eval()) { |
1147 // Check that extension is "the hole". | 1147 // Check that extension is "the hole". |
1148 __ LoadP(temp, ContextMemOperand(context, Context::EXTENSION_INDEX)); | 1148 __ LoadP(temp, ContextMemOperand(context, Context::EXTENSION_INDEX)); |
1149 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); | 1149 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); |
1150 } | 1150 } |
1151 __ LoadP(next, ContextMemOperand(context, Context::PREVIOUS_INDEX)); | 1151 __ LoadP(next, ContextMemOperand(context, Context::PREVIOUS_INDEX)); |
1152 // Walk the rest of the chain without clobbering cp. | 1152 // Walk the rest of the chain without clobbering cp. |
1153 context = next; | 1153 context = next; |
1154 } | 1154 } |
1155 } | 1155 } |
(...skipping 2494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3650 DCHECK(kOSRBranchInstruction == br_instr); | 3650 DCHECK(kOSRBranchInstruction == br_instr); |
3651 | 3651 |
3652 DCHECK(interrupt_address == | 3652 DCHECK(interrupt_address == |
3653 isolate->builtins()->OnStackReplacement()->entry()); | 3653 isolate->builtins()->OnStackReplacement()->entry()); |
3654 return ON_STACK_REPLACEMENT; | 3654 return ON_STACK_REPLACEMENT; |
3655 } | 3655 } |
3656 | 3656 |
3657 } // namespace internal | 3657 } // namespace internal |
3658 } // namespace v8 | 3658 } // namespace v8 |
3659 #endif // V8_TARGET_ARCH_S390 | 3659 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |