| 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 2262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2273 | 2273 |
| 2274 __ bind(&allocate); | 2274 __ bind(&allocate); |
| 2275 __ Push(Smi::FromInt(JSIteratorResult::kSize)); | 2275 __ Push(Smi::FromInt(JSIteratorResult::kSize)); |
| 2276 __ CallRuntime(Runtime::kAllocateInNewSpace, 1); | 2276 __ CallRuntime(Runtime::kAllocateInNewSpace, 1); |
| 2277 | 2277 |
| 2278 __ bind(&done_allocate); | 2278 __ bind(&done_allocate); |
| 2279 __ lw(a1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); | 2279 __ lw(a1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); |
| 2280 __ lw(a1, FieldMemOperand(a1, GlobalObject::kNativeContextOffset)); | 2280 __ lw(a1, FieldMemOperand(a1, GlobalObject::kNativeContextOffset)); |
| 2281 __ lw(a1, ContextOperand(a1, Context::ITERATOR_RESULT_MAP_INDEX)); | 2281 __ lw(a1, ContextOperand(a1, Context::ITERATOR_RESULT_MAP_INDEX)); |
| 2282 __ pop(a2); | 2282 __ pop(a2); |
| 2283 __ li(a3, Operand(isolate()->factory()->ToBoolean(done))); | 2283 __ LoadRoot(a3, |
| 2284 __ li(t0, Operand(isolate()->factory()->empty_fixed_array())); | 2284 done ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex); |
| 2285 __ LoadRoot(t0, Heap::kEmptyFixedArrayRootIndex); |
| 2285 __ sw(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); | 2286 __ sw(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); |
| 2286 __ sw(t0, FieldMemOperand(v0, JSObject::kPropertiesOffset)); | 2287 __ sw(t0, FieldMemOperand(v0, JSObject::kPropertiesOffset)); |
| 2287 __ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset)); | 2288 __ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset)); |
| 2288 __ sw(a2, FieldMemOperand(v0, JSIteratorResult::kValueOffset)); | 2289 __ sw(a2, FieldMemOperand(v0, JSIteratorResult::kValueOffset)); |
| 2289 __ sw(a3, FieldMemOperand(v0, JSIteratorResult::kDoneOffset)); | 2290 __ sw(a3, FieldMemOperand(v0, JSIteratorResult::kDoneOffset)); |
| 2290 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); | 2291 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); |
| 2291 } | 2292 } |
| 2292 | 2293 |
| 2293 | 2294 |
| 2294 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { | 2295 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { |
| (...skipping 2196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4491 DCHECK_EQ(2, args->length()); | 4492 DCHECK_EQ(2, args->length()); |
| 4492 VisitForStackValue(args->at(0)); | 4493 VisitForStackValue(args->at(0)); |
| 4493 VisitForStackValue(args->at(1)); | 4494 VisitForStackValue(args->at(1)); |
| 4494 | 4495 |
| 4495 Label runtime, done; | 4496 Label runtime, done; |
| 4496 | 4497 |
| 4497 __ Allocate(JSIteratorResult::kSize, v0, a2, a3, &runtime, TAG_OBJECT); | 4498 __ Allocate(JSIteratorResult::kSize, v0, a2, a3, &runtime, TAG_OBJECT); |
| 4498 __ lw(a1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); | 4499 __ lw(a1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); |
| 4499 __ lw(a1, FieldMemOperand(a1, GlobalObject::kNativeContextOffset)); | 4500 __ lw(a1, FieldMemOperand(a1, GlobalObject::kNativeContextOffset)); |
| 4500 __ lw(a1, ContextOperand(a1, Context::ITERATOR_RESULT_MAP_INDEX)); | 4501 __ lw(a1, ContextOperand(a1, Context::ITERATOR_RESULT_MAP_INDEX)); |
| 4501 __ pop(a3); | 4502 __ Pop(a2, a3); |
| 4502 __ pop(a2); | 4503 __ LoadRoot(t0, Heap::kEmptyFixedArrayRootIndex); |
| 4503 __ li(t0, Operand(isolate()->factory()->empty_fixed_array())); | |
| 4504 __ sw(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); | 4504 __ sw(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); |
| 4505 __ sw(t0, FieldMemOperand(v0, JSObject::kPropertiesOffset)); | 4505 __ sw(t0, FieldMemOperand(v0, JSObject::kPropertiesOffset)); |
| 4506 __ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset)); | 4506 __ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset)); |
| 4507 __ sw(a2, FieldMemOperand(v0, JSIteratorResult::kValueOffset)); | 4507 __ sw(a2, FieldMemOperand(v0, JSIteratorResult::kValueOffset)); |
| 4508 __ sw(a3, FieldMemOperand(v0, JSIteratorResult::kDoneOffset)); | 4508 __ sw(a3, FieldMemOperand(v0, JSIteratorResult::kDoneOffset)); |
| 4509 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); | 4509 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); |
| 4510 __ jmp(&done); | 4510 __ jmp(&done); |
| 4511 | 4511 |
| 4512 __ bind(&runtime); | 4512 __ bind(&runtime); |
| 4513 __ CallRuntime(Runtime::kCreateIterResultObject, 2); | 4513 __ CallRuntime(Runtime::kCreateIterResultObject, 2); |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5339 reinterpret_cast<uint32_t>( | 5339 reinterpret_cast<uint32_t>( |
| 5340 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5340 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5341 return OSR_AFTER_STACK_CHECK; | 5341 return OSR_AFTER_STACK_CHECK; |
| 5342 } | 5342 } |
| 5343 | 5343 |
| 5344 | 5344 |
| 5345 } // namespace internal | 5345 } // namespace internal |
| 5346 } // namespace v8 | 5346 } // namespace v8 |
| 5347 | 5347 |
| 5348 #endif // V8_TARGET_ARCH_MIPS | 5348 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |