| 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_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2323 | 2323 |
| 2324 __ bind(&done); | 2324 __ bind(&done); |
| 2325 context()->Plug(result_register()); | 2325 context()->Plug(result_register()); |
| 2326 } | 2326 } |
| 2327 | 2327 |
| 2328 | 2328 |
| 2329 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { | 2329 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { |
| 2330 Label gc_required; | 2330 Label gc_required; |
| 2331 Label allocated; | 2331 Label allocated; |
| 2332 | 2332 |
| 2333 Handle<Map> map(isolate()->native_context()->iterator_result_map()); | 2333 const int instance_size = 5 * kPointerSize; |
| 2334 DCHECK_EQ(isolate()->native_context()->iterator_result_map()->instance_size(), |
| 2335 instance_size); |
| 2334 | 2336 |
| 2335 __ Allocate(map->instance_size(), r0, r2, r3, &gc_required, TAG_OBJECT); | 2337 __ Allocate(instance_size, r0, r2, r3, &gc_required, TAG_OBJECT); |
| 2336 __ jmp(&allocated); | 2338 __ jmp(&allocated); |
| 2337 | 2339 |
| 2338 __ bind(&gc_required); | 2340 __ bind(&gc_required); |
| 2339 __ Push(Smi::FromInt(map->instance_size())); | 2341 __ Push(Smi::FromInt(instance_size)); |
| 2340 __ CallRuntime(Runtime::kAllocateInNewSpace, 1); | 2342 __ CallRuntime(Runtime::kAllocateInNewSpace, 1); |
| 2341 __ ldr(context_register(), | 2343 __ ldr(context_register(), |
| 2342 MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2344 MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 2343 | 2345 |
| 2344 __ bind(&allocated); | 2346 __ bind(&allocated); |
| 2345 __ mov(r1, Operand(map)); | 2347 __ ldr(r1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); |
| 2348 __ ldr(r1, FieldMemOperand(r1, GlobalObject::kNativeContextOffset)); |
| 2349 __ ldr(r1, ContextOperand(r1, Context::ITERATOR_RESULT_MAP_INDEX)); |
| 2346 __ pop(r2); | 2350 __ pop(r2); |
| 2347 __ mov(r3, Operand(isolate()->factory()->ToBoolean(done))); | 2351 __ mov(r3, Operand(isolate()->factory()->ToBoolean(done))); |
| 2348 __ mov(r4, Operand(isolate()->factory()->empty_fixed_array())); | 2352 __ mov(r4, Operand(isolate()->factory()->empty_fixed_array())); |
| 2349 DCHECK_EQ(map->instance_size(), 5 * kPointerSize); | |
| 2350 __ str(r1, FieldMemOperand(r0, HeapObject::kMapOffset)); | 2353 __ str(r1, FieldMemOperand(r0, HeapObject::kMapOffset)); |
| 2351 __ str(r4, FieldMemOperand(r0, JSObject::kPropertiesOffset)); | 2354 __ str(r4, FieldMemOperand(r0, JSObject::kPropertiesOffset)); |
| 2352 __ str(r4, FieldMemOperand(r0, JSObject::kElementsOffset)); | 2355 __ str(r4, FieldMemOperand(r0, JSObject::kElementsOffset)); |
| 2353 __ str(r2, | 2356 __ str(r2, |
| 2354 FieldMemOperand(r0, JSGeneratorObject::kResultValuePropertyOffset)); | 2357 FieldMemOperand(r0, JSGeneratorObject::kResultValuePropertyOffset)); |
| 2355 __ str(r3, | 2358 __ str(r3, |
| 2356 FieldMemOperand(r0, JSGeneratorObject::kResultDonePropertyOffset)); | 2359 FieldMemOperand(r0, JSGeneratorObject::kResultDonePropertyOffset)); |
| 2357 | 2360 |
| 2358 // Only the value field needs a write barrier, as the other values are in the | 2361 // Only the value field needs a write barrier, as the other values are in the |
| 2359 // root set. | 2362 // root set. |
| (...skipping 2990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5350 | 5353 |
| 5351 DCHECK(interrupt_address == | 5354 DCHECK(interrupt_address == |
| 5352 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5355 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5353 return OSR_AFTER_STACK_CHECK; | 5356 return OSR_AFTER_STACK_CHECK; |
| 5354 } | 5357 } |
| 5355 | 5358 |
| 5356 | 5359 |
| 5357 } } // namespace v8::internal | 5360 } } // namespace v8::internal |
| 5358 | 5361 |
| 5359 #endif // V8_TARGET_ARCH_ARM | 5362 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |