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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
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 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2271 | 2271 |
2272 __ bind(&allocate); | 2272 __ bind(&allocate); |
2273 __ Push(Smi::FromInt(JSIteratorResult::kSize)); | 2273 __ Push(Smi::FromInt(JSIteratorResult::kSize)); |
2274 __ CallRuntime(Runtime::kAllocateInNewSpace, 1); | 2274 __ CallRuntime(Runtime::kAllocateInNewSpace, 1); |
2275 | 2275 |
2276 __ bind(&done_allocate); | 2276 __ bind(&done_allocate); |
2277 __ ld(a1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); | 2277 __ ld(a1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); |
2278 __ ld(a1, FieldMemOperand(a1, GlobalObject::kNativeContextOffset)); | 2278 __ ld(a1, FieldMemOperand(a1, GlobalObject::kNativeContextOffset)); |
2279 __ ld(a1, ContextOperand(a1, Context::ITERATOR_RESULT_MAP_INDEX)); | 2279 __ ld(a1, ContextOperand(a1, Context::ITERATOR_RESULT_MAP_INDEX)); |
2280 __ pop(a2); | 2280 __ pop(a2); |
2281 __ li(a3, Operand(isolate()->factory()->ToBoolean(done))); | 2281 __ LoadRoot(a3, |
2282 __ li(t0, Operand(isolate()->factory()->empty_fixed_array())); | 2282 done ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex); |
| 2283 __ LoadRoot(a4, Heap::kEmptyFixedArrayRootIndex); |
2283 __ sd(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); | 2284 __ sd(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); |
2284 __ sd(t0, FieldMemOperand(v0, JSObject::kPropertiesOffset)); | 2285 __ sd(a4, FieldMemOperand(v0, JSObject::kPropertiesOffset)); |
2285 __ sd(t0, FieldMemOperand(v0, JSObject::kElementsOffset)); | 2286 __ sd(a4, FieldMemOperand(v0, JSObject::kElementsOffset)); |
2286 __ sd(a2, FieldMemOperand(v0, JSIteratorResult::kValueOffset)); | 2287 __ sd(a2, FieldMemOperand(v0, JSIteratorResult::kValueOffset)); |
2287 __ sd(a3, FieldMemOperand(v0, JSIteratorResult::kDoneOffset)); | 2288 __ sd(a3, FieldMemOperand(v0, JSIteratorResult::kDoneOffset)); |
2288 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); | 2289 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); |
2289 } | 2290 } |
2290 | 2291 |
2291 | 2292 |
2292 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { | 2293 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { |
2293 SetExpressionPosition(prop); | 2294 SetExpressionPosition(prop); |
2294 Literal* key = prop->key()->AsLiteral(); | 2295 Literal* key = prop->key()->AsLiteral(); |
2295 DCHECK(!prop->IsSuperAccess()); | 2296 DCHECK(!prop->IsSuperAccess()); |
(...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4495 DCHECK_EQ(2, args->length()); | 4496 DCHECK_EQ(2, args->length()); |
4496 VisitForStackValue(args->at(0)); | 4497 VisitForStackValue(args->at(0)); |
4497 VisitForStackValue(args->at(1)); | 4498 VisitForStackValue(args->at(1)); |
4498 | 4499 |
4499 Label runtime, done; | 4500 Label runtime, done; |
4500 | 4501 |
4501 __ Allocate(JSIteratorResult::kSize, v0, a2, a3, &runtime, TAG_OBJECT); | 4502 __ Allocate(JSIteratorResult::kSize, v0, a2, a3, &runtime, TAG_OBJECT); |
4502 __ ld(a1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); | 4503 __ ld(a1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); |
4503 __ ld(a1, FieldMemOperand(a1, GlobalObject::kNativeContextOffset)); | 4504 __ ld(a1, FieldMemOperand(a1, GlobalObject::kNativeContextOffset)); |
4504 __ ld(a1, ContextOperand(a1, Context::ITERATOR_RESULT_MAP_INDEX)); | 4505 __ ld(a1, ContextOperand(a1, Context::ITERATOR_RESULT_MAP_INDEX)); |
4505 __ pop(a3); | 4506 __ Pop(a2, a3); |
4506 __ pop(a2); | 4507 __ LoadRoot(a4, Heap::kEmptyFixedArrayRootIndex); |
4507 __ li(t0, Operand(isolate()->factory()->empty_fixed_array())); | |
4508 __ sd(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); | 4508 __ sd(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); |
4509 __ sd(t0, FieldMemOperand(v0, JSObject::kPropertiesOffset)); | 4509 __ sd(a4, FieldMemOperand(v0, JSObject::kPropertiesOffset)); |
4510 __ sd(t0, FieldMemOperand(v0, JSObject::kElementsOffset)); | 4510 __ sd(a4, FieldMemOperand(v0, JSObject::kElementsOffset)); |
4511 __ sd(a2, FieldMemOperand(v0, JSIteratorResult::kValueOffset)); | 4511 __ sd(a2, FieldMemOperand(v0, JSIteratorResult::kValueOffset)); |
4512 __ sd(a3, FieldMemOperand(v0, JSIteratorResult::kDoneOffset)); | 4512 __ sd(a3, FieldMemOperand(v0, JSIteratorResult::kDoneOffset)); |
4513 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); | 4513 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); |
4514 __ jmp(&done); | 4514 __ jmp(&done); |
4515 | 4515 |
4516 __ bind(&runtime); | 4516 __ bind(&runtime); |
4517 __ CallRuntime(Runtime::kCreateIterResultObject, 2); | 4517 __ CallRuntime(Runtime::kCreateIterResultObject, 2); |
4518 | 4518 |
4519 __ bind(&done); | 4519 __ bind(&done); |
4520 context()->Plug(v0); | 4520 context()->Plug(v0); |
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5346 reinterpret_cast<uint64_t>( | 5346 reinterpret_cast<uint64_t>( |
5347 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5347 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5348 return OSR_AFTER_STACK_CHECK; | 5348 return OSR_AFTER_STACK_CHECK; |
5349 } | 5349 } |
5350 | 5350 |
5351 | 5351 |
5352 } // namespace internal | 5352 } // namespace internal |
5353 } // namespace v8 | 5353 } // namespace v8 |
5354 | 5354 |
5355 #endif // V8_TARGET_ARCH_MIPS64 | 5355 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |