Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: src/arm/codegen-arm.cc

Issue 12440041: Generalizing remaining Allocate functions in the macro assemblers used in pretenuring. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 __ push(lr); 201 __ push(lr);
202 __ ldr(r5, FieldMemOperand(r4, FixedArray::kLengthOffset)); 202 __ ldr(r5, FieldMemOperand(r4, FixedArray::kLengthOffset));
203 // r4: source FixedArray 203 // r4: source FixedArray
204 // r5: number of elements (smi-tagged) 204 // r5: number of elements (smi-tagged)
205 205
206 // Allocate new FixedDoubleArray. 206 // Allocate new FixedDoubleArray.
207 // Use lr as a temporary register. 207 // Use lr as a temporary register.
208 __ mov(lr, Operand(r5, LSL, 2)); 208 __ mov(lr, Operand(r5, LSL, 2));
209 __ add(lr, lr, Operand(FixedDoubleArray::kHeaderSize)); 209 __ add(lr, lr, Operand(FixedDoubleArray::kHeaderSize));
210 __ AllocateInNewSpace(lr, r6, r7, r9, &gc_required, DOUBLE_ALIGNMENT); 210 __ Allocate(lr, r6, r7, r9, &gc_required, DOUBLE_ALIGNMENT);
211 // r6: destination FixedDoubleArray, not tagged as heap object. 211 // r6: destination FixedDoubleArray, not tagged as heap object.
212 212
213 // Set destination FixedDoubleArray's length and map. 213 // Set destination FixedDoubleArray's length and map.
214 __ LoadRoot(r9, Heap::kFixedDoubleArrayMapRootIndex); 214 __ LoadRoot(r9, Heap::kFixedDoubleArrayMapRootIndex);
215 __ str(r5, MemOperand(r6, FixedDoubleArray::kLengthOffset)); 215 __ str(r5, MemOperand(r6, FixedDoubleArray::kLengthOffset));
216 // Update receiver's map. 216 // Update receiver's map.
217 __ str(r9, MemOperand(r6, HeapObject::kMapOffset)); 217 __ str(r9, MemOperand(r6, HeapObject::kMapOffset));
218 218
219 __ str(r3, FieldMemOperand(r2, HeapObject::kMapOffset)); 219 __ str(r3, FieldMemOperand(r2, HeapObject::kMapOffset));
220 __ RecordWriteField(r2, 220 __ RecordWriteField(r2,
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 __ push(lr); 342 __ push(lr);
343 __ Push(r3, r2, r1, r0); 343 __ Push(r3, r2, r1, r0);
344 __ ldr(r5, FieldMemOperand(r4, FixedArray::kLengthOffset)); 344 __ ldr(r5, FieldMemOperand(r4, FixedArray::kLengthOffset));
345 // r4: source FixedDoubleArray 345 // r4: source FixedDoubleArray
346 // r5: number of elements (smi-tagged) 346 // r5: number of elements (smi-tagged)
347 347
348 // Allocate new FixedArray. 348 // Allocate new FixedArray.
349 __ mov(r0, Operand(FixedDoubleArray::kHeaderSize)); 349 __ mov(r0, Operand(FixedDoubleArray::kHeaderSize));
350 __ add(r0, r0, Operand(r5, LSL, 1)); 350 __ add(r0, r0, Operand(r5, LSL, 1));
351 __ AllocateInNewSpace(r0, r6, r7, r9, &gc_required, NO_ALLOCATION_FLAGS); 351 __ Allocate(r0, r6, r7, r9, &gc_required, NO_ALLOCATION_FLAGS);
352 // r6: destination FixedArray, not tagged as heap object 352 // r6: destination FixedArray, not tagged as heap object
353 // Set destination FixedDoubleArray's length and map. 353 // Set destination FixedDoubleArray's length and map.
354 __ LoadRoot(r9, Heap::kFixedArrayMapRootIndex); 354 __ LoadRoot(r9, Heap::kFixedArrayMapRootIndex);
355 __ str(r5, MemOperand(r6, FixedDoubleArray::kLengthOffset)); 355 __ str(r5, MemOperand(r6, FixedDoubleArray::kLengthOffset));
356 __ str(r9, MemOperand(r6, HeapObject::kMapOffset)); 356 __ str(r9, MemOperand(r6, HeapObject::kMapOffset));
357 357
358 // Prepare for conversion loop. 358 // Prepare for conversion loop.
359 __ add(r4, r4, Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag + 4)); 359 __ add(r4, r4, Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag + 4));
360 __ add(r3, r6, Operand(FixedArray::kHeaderSize)); 360 __ add(r3, r6, Operand(FixedArray::kHeaderSize));
361 __ add(r6, r6, Operand(kHeapObjectTag)); 361 __ add(r6, r6, Operand(kHeapObjectTag));
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 patcher.masm()->add(r0, pc, Operand(-8)); 699 patcher.masm()->add(r0, pc, Operand(-8));
700 patcher.masm()->ldr(pc, MemOperand(pc, -4)); 700 patcher.masm()->ldr(pc, MemOperand(pc, -4));
701 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); 701 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start()));
702 } 702 }
703 } 703 }
704 704
705 705
706 } } // namespace v8::internal 706 } } // namespace v8::internal
707 707
708 #endif // V8_TARGET_ARCH_ARM 708 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698