| 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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 6 | 6 |
| 7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
| 8 // | 8 // |
| 9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
| 10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 __ Subu(sp, sp, Operand(remaining * kPointerSize)); | 170 __ Subu(sp, sp, Operand(remaining * kPointerSize)); |
| 171 for (int i = 0; i < remaining; i++) { | 171 for (int i = 0; i < remaining; i++) { |
| 172 __ sw(t5, MemOperand(sp, i * kPointerSize)); | 172 __ sw(t5, MemOperand(sp, i * kPointerSize)); |
| 173 } | 173 } |
| 174 } | 174 } |
| 175 } | 175 } |
| 176 | 176 |
| 177 bool function_in_register_a1 = true; | 177 bool function_in_register_a1 = true; |
| 178 | 178 |
| 179 // Possibly allocate a local context. | 179 // Possibly allocate a local context. |
| 180 if (info->scope()->num_heap_slots() > 0) { | 180 if (info->scope()->NeedsContext()) { |
| 181 Comment cmnt(masm_, "[ Allocate context"); | 181 Comment cmnt(masm_, "[ Allocate context"); |
| 182 // Argument to NewContext is the function, which is still in a1. | 182 // Argument to NewContext is the function, which is still in a1. |
| 183 bool need_write_barrier = true; | 183 bool need_write_barrier = true; |
| 184 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 184 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
| 185 if (info->scope()->is_script_scope()) { | 185 if (info->scope()->is_script_scope()) { |
| 186 __ push(a1); | 186 __ push(a1); |
| 187 __ Push(info->scope()->GetScopeInfo(info->isolate())); | 187 __ Push(info->scope()->GetScopeInfo(info->isolate())); |
| 188 __ CallRuntime(Runtime::kNewScriptContext); | 188 __ CallRuntime(Runtime::kNewScriptContext); |
| 189 PrepareForBailoutForId(BailoutId::ScriptContext(), | 189 PrepareForBailoutForId(BailoutId::ScriptContext(), |
| 190 BailoutState::TOS_REGISTER); | 190 BailoutState::TOS_REGISTER); |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 | 1200 |
| 1201 | 1201 |
| 1202 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, | 1202 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, |
| 1203 Label* slow) { | 1203 Label* slow) { |
| 1204 DCHECK(var->IsContextSlot()); | 1204 DCHECK(var->IsContextSlot()); |
| 1205 Register context = cp; | 1205 Register context = cp; |
| 1206 Register next = a3; | 1206 Register next = a3; |
| 1207 Register temp = t0; | 1207 Register temp = t0; |
| 1208 | 1208 |
| 1209 for (Scope* s = scope(); s != var->scope(); s = s->outer_scope()) { | 1209 for (Scope* s = scope(); s != var->scope(); s = s->outer_scope()) { |
| 1210 if (s->num_heap_slots() > 0) { | 1210 if (s->NeedsContext()) { |
| 1211 if (s->calls_sloppy_eval()) { | 1211 if (s->calls_sloppy_eval()) { |
| 1212 // Check that extension is "the hole". | 1212 // Check that extension is "the hole". |
| 1213 __ lw(temp, ContextMemOperand(context, Context::EXTENSION_INDEX)); | 1213 __ lw(temp, ContextMemOperand(context, Context::EXTENSION_INDEX)); |
| 1214 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); | 1214 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); |
| 1215 } | 1215 } |
| 1216 __ lw(next, ContextMemOperand(context, Context::PREVIOUS_INDEX)); | 1216 __ lw(next, ContextMemOperand(context, Context::PREVIOUS_INDEX)); |
| 1217 // Walk the rest of the chain without clobbering cp. | 1217 // Walk the rest of the chain without clobbering cp. |
| 1218 context = next; | 1218 context = next; |
| 1219 } | 1219 } |
| 1220 } | 1220 } |
| (...skipping 2535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3756 reinterpret_cast<uint32_t>( | 3756 reinterpret_cast<uint32_t>( |
| 3757 isolate->builtins()->OnStackReplacement()->entry())); | 3757 isolate->builtins()->OnStackReplacement()->entry())); |
| 3758 return ON_STACK_REPLACEMENT; | 3758 return ON_STACK_REPLACEMENT; |
| 3759 } | 3759 } |
| 3760 | 3760 |
| 3761 | 3761 |
| 3762 } // namespace internal | 3762 } // namespace internal |
| 3763 } // namespace v8 | 3763 } // namespace v8 |
| 3764 | 3764 |
| 3765 #endif // V8_TARGET_ARCH_MIPS | 3765 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |