OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // Emit the remaining pushes. | 160 // Emit the remaining pushes. |
161 for (int i = 0; i < remaining; i++) { | 161 for (int i = 0; i < remaining; i++) { |
162 __ push(r9); | 162 __ push(r9); |
163 } | 163 } |
164 } | 164 } |
165 } | 165 } |
166 | 166 |
167 bool function_in_register_r1 = true; | 167 bool function_in_register_r1 = true; |
168 | 168 |
169 // Possibly allocate a local context. | 169 // Possibly allocate a local context. |
170 if (info->scope()->num_heap_slots() > 0) { | 170 if (info->scope()->NeedsContext()) { |
171 // Argument to NewContext is the function, which is still in r1. | 171 // Argument to NewContext is the function, which is still in r1. |
172 Comment cmnt(masm_, "[ Allocate context"); | 172 Comment cmnt(masm_, "[ Allocate context"); |
173 bool need_write_barrier = true; | 173 bool need_write_barrier = true; |
174 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 174 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
175 if (info->scope()->is_script_scope()) { | 175 if (info->scope()->is_script_scope()) { |
176 __ push(r1); | 176 __ push(r1); |
177 __ Push(info->scope()->GetScopeInfo(info->isolate())); | 177 __ Push(info->scope()->GetScopeInfo(info->isolate())); |
178 __ CallRuntime(Runtime::kNewScriptContext); | 178 __ CallRuntime(Runtime::kNewScriptContext); |
179 PrepareForBailoutForId(BailoutId::ScriptContext(), | 179 PrepareForBailoutForId(BailoutId::ScriptContext(), |
180 BailoutState::TOS_REGISTER); | 180 BailoutState::TOS_REGISTER); |
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 | 1205 |
1206 | 1206 |
1207 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, | 1207 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, |
1208 Label* slow) { | 1208 Label* slow) { |
1209 DCHECK(var->IsContextSlot()); | 1209 DCHECK(var->IsContextSlot()); |
1210 Register context = cp; | 1210 Register context = cp; |
1211 Register next = r3; | 1211 Register next = r3; |
1212 Register temp = r4; | 1212 Register temp = r4; |
1213 | 1213 |
1214 for (Scope* s = scope(); s != var->scope(); s = s->outer_scope()) { | 1214 for (Scope* s = scope(); s != var->scope(); s = s->outer_scope()) { |
1215 if (s->num_heap_slots() > 0) { | 1215 if (s->NeedsContext()) { |
1216 if (s->calls_sloppy_eval()) { | 1216 if (s->calls_sloppy_eval()) { |
1217 // Check that extension is "the hole". | 1217 // Check that extension is "the hole". |
1218 __ ldr(temp, ContextMemOperand(context, Context::EXTENSION_INDEX)); | 1218 __ ldr(temp, ContextMemOperand(context, Context::EXTENSION_INDEX)); |
1219 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); | 1219 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); |
1220 } | 1220 } |
1221 __ ldr(next, ContextMemOperand(context, Context::PREVIOUS_INDEX)); | 1221 __ ldr(next, ContextMemOperand(context, Context::PREVIOUS_INDEX)); |
1222 // Walk the rest of the chain without clobbering cp. | 1222 // Walk the rest of the chain without clobbering cp. |
1223 context = next; | 1223 context = next; |
1224 } | 1224 } |
1225 } | 1225 } |
(...skipping 2589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3815 DCHECK(interrupt_address == | 3815 DCHECK(interrupt_address == |
3816 isolate->builtins()->OnStackReplacement()->entry()); | 3816 isolate->builtins()->OnStackReplacement()->entry()); |
3817 return ON_STACK_REPLACEMENT; | 3817 return ON_STACK_REPLACEMENT; |
3818 } | 3818 } |
3819 | 3819 |
3820 | 3820 |
3821 } // namespace internal | 3821 } // namespace internal |
3822 } // namespace v8 | 3822 } // namespace v8 |
3823 | 3823 |
3824 #endif // V8_TARGET_ARCH_ARM | 3824 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |