| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
| 8 | 8 |
| 9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
| 10 // | 10 // |
| (...skipping 2287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2298 | 2298 |
| 2299 __ bind(&done); | 2299 __ bind(&done); |
| 2300 context()->Plug(result_register()); | 2300 context()->Plug(result_register()); |
| 2301 } | 2301 } |
| 2302 | 2302 |
| 2303 | 2303 |
| 2304 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { | 2304 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { |
| 2305 Label gc_required; | 2305 Label gc_required; |
| 2306 Label allocated; | 2306 Label allocated; |
| 2307 | 2307 |
| 2308 Handle<Map> map(isolate()->native_context()->iterator_result_map()); | 2308 const int instance_size = 5 * kPointerSize; |
| 2309 DCHECK_EQ(isolate()->native_context()->iterator_result_map()->instance_size(), |
| 2310 instance_size); |
| 2309 | 2311 |
| 2310 __ Allocate(map->instance_size(), v0, a2, a3, &gc_required, TAG_OBJECT); | 2312 __ Allocate(instance_size, v0, a2, a3, &gc_required, TAG_OBJECT); |
| 2311 __ jmp(&allocated); | 2313 __ jmp(&allocated); |
| 2312 | 2314 |
| 2313 __ bind(&gc_required); | 2315 __ bind(&gc_required); |
| 2314 __ Push(Smi::FromInt(map->instance_size())); | 2316 __ Push(Smi::FromInt(instance_size)); |
| 2315 __ CallRuntime(Runtime::kAllocateInNewSpace, 1); | 2317 __ CallRuntime(Runtime::kAllocateInNewSpace, 1); |
| 2316 __ ld(context_register(), | 2318 __ ld(context_register(), |
| 2317 MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2319 MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 2318 | 2320 |
| 2319 __ bind(&allocated); | 2321 __ bind(&allocated); |
| 2320 __ li(a1, Operand(map)); | 2322 __ ld(a1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); |
| 2323 __ ld(a1, FieldMemOperand(a1, GlobalObject::kNativeContextOffset)); |
| 2324 __ ld(a1, ContextOperand(a1, Context::ITERATOR_RESULT_MAP_INDEX)); |
| 2321 __ pop(a2); | 2325 __ pop(a2); |
| 2322 __ li(a3, Operand(isolate()->factory()->ToBoolean(done))); | 2326 __ li(a3, Operand(isolate()->factory()->ToBoolean(done))); |
| 2323 __ li(a4, Operand(isolate()->factory()->empty_fixed_array())); | 2327 __ li(a4, Operand(isolate()->factory()->empty_fixed_array())); |
| 2324 DCHECK_EQ(map->instance_size(), 5 * kPointerSize); | |
| 2325 __ sd(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); | 2328 __ sd(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); |
| 2326 __ sd(a4, FieldMemOperand(v0, JSObject::kPropertiesOffset)); | 2329 __ sd(a4, FieldMemOperand(v0, JSObject::kPropertiesOffset)); |
| 2327 __ sd(a4, FieldMemOperand(v0, JSObject::kElementsOffset)); | 2330 __ sd(a4, FieldMemOperand(v0, JSObject::kElementsOffset)); |
| 2328 __ sd(a2, | 2331 __ sd(a2, |
| 2329 FieldMemOperand(v0, JSGeneratorObject::kResultValuePropertyOffset)); | 2332 FieldMemOperand(v0, JSGeneratorObject::kResultValuePropertyOffset)); |
| 2330 __ sd(a3, | 2333 __ sd(a3, |
| 2331 FieldMemOperand(v0, JSGeneratorObject::kResultDonePropertyOffset)); | 2334 FieldMemOperand(v0, JSGeneratorObject::kResultDonePropertyOffset)); |
| 2332 | 2335 |
| 2333 // Only the value field needs a write barrier, as the other values are in the | 2336 // Only the value field needs a write barrier, as the other values are in the |
| 2334 // root set. | 2337 // root set. |
| (...skipping 2945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5280 Assembler::target_address_at(pc_immediate_load_address)) == | 5283 Assembler::target_address_at(pc_immediate_load_address)) == |
| 5281 reinterpret_cast<uint64_t>( | 5284 reinterpret_cast<uint64_t>( |
| 5282 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5285 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5283 return OSR_AFTER_STACK_CHECK; | 5286 return OSR_AFTER_STACK_CHECK; |
| 5284 } | 5287 } |
| 5285 | 5288 |
| 5286 | 5289 |
| 5287 } } // namespace v8::internal | 5290 } } // namespace v8::internal |
| 5288 | 5291 |
| 5289 #endif // V8_TARGET_ARCH_MIPS64 | 5292 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |