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

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

Issue 11663005: Adapt Danno's Track Allocation Info idea to fast literals. When allocating a literal array, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ported to other platforms Created 7 years, 11 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
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // -- r0 : value 172 // -- r0 : value
173 // -- r1 : key 173 // -- r1 : key
174 // -- r2 : receiver 174 // -- r2 : receiver
175 // -- lr : return address 175 // -- lr : return address
176 // -- r3 : target map, scratch for subsequent call 176 // -- r3 : target map, scratch for subsequent call
177 // -- r4 : scratch (elements) 177 // -- r4 : scratch (elements)
178 // ----------------------------------- 178 // -----------------------------------
179 Label loop, entry, convert_hole, gc_required, only_change_map, done; 179 Label loop, entry, convert_hole, gc_required, only_change_map, done;
180 bool vfp2_supported = CpuFeatures::IsSupported(VFP2); 180 bool vfp2_supported = CpuFeatures::IsSupported(VFP2);
181 181
182 if (FLAG_use_allocation_site_info) {
183 masm->PerformAllocationSiteInfoCheck(fail);
184 }
185
182 // Check for empty arrays, which only require a map transition and no changes 186 // Check for empty arrays, which only require a map transition and no changes
183 // to the backing store. 187 // to the backing store.
184 __ ldr(r4, FieldMemOperand(r2, JSObject::kElementsOffset)); 188 __ ldr(r4, FieldMemOperand(r2, JSObject::kElementsOffset));
185 __ CompareRoot(r4, Heap::kEmptyFixedArrayRootIndex); 189 __ CompareRoot(r4, Heap::kEmptyFixedArrayRootIndex);
186 __ b(eq, &only_change_map); 190 __ b(eq, &only_change_map);
187 191
188 __ push(lr); 192 __ push(lr);
189 __ ldr(r5, FieldMemOperand(r4, FixedArray::kLengthOffset)); 193 __ ldr(r5, FieldMemOperand(r4, FixedArray::kLengthOffset));
190 // r4: source FixedArray 194 // r4: source FixedArray
191 // r5: number of elements (smi-tagged) 195 // r5: number of elements (smi-tagged)
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 // ----------- S t a t e ------------- 312 // ----------- S t a t e -------------
309 // -- r0 : value 313 // -- r0 : value
310 // -- r1 : key 314 // -- r1 : key
311 // -- r2 : receiver 315 // -- r2 : receiver
312 // -- lr : return address 316 // -- lr : return address
313 // -- r3 : target map, scratch for subsequent call 317 // -- r3 : target map, scratch for subsequent call
314 // -- r4 : scratch (elements) 318 // -- r4 : scratch (elements)
315 // ----------------------------------- 319 // -----------------------------------
316 Label entry, loop, convert_hole, gc_required, only_change_map; 320 Label entry, loop, convert_hole, gc_required, only_change_map;
317 321
322 // TODO(mvstanton): don't pretransition double to object
323 // if (FLAG_use_allocation_site_info) {
324 // masm->PerformAllocationSiteInfoCheck(fail);
325 // }
326
318 // Check for empty arrays, which only require a map transition and no changes 327 // Check for empty arrays, which only require a map transition and no changes
319 // to the backing store. 328 // to the backing store.
320 __ ldr(r4, FieldMemOperand(r2, JSObject::kElementsOffset)); 329 __ ldr(r4, FieldMemOperand(r2, JSObject::kElementsOffset));
321 __ CompareRoot(r4, Heap::kEmptyFixedArrayRootIndex); 330 __ CompareRoot(r4, Heap::kEmptyFixedArrayRootIndex);
322 __ b(eq, &only_change_map); 331 __ b(eq, &only_change_map);
323 332
324 __ push(lr); 333 __ push(lr);
325 __ Push(r3, r2, r1, r0); 334 __ Push(r3, r2, r1, r0);
326 __ ldr(r5, FieldMemOperand(r4, FixedArray::kLengthOffset)); 335 __ ldr(r5, FieldMemOperand(r4, FixedArray::kLengthOffset));
327 // r4: source FixedDoubleArray 336 // r4: source FixedDoubleArray
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 patcher.masm()->add(r0, pc, Operand(-8)); 690 patcher.masm()->add(r0, pc, Operand(-8));
682 patcher.masm()->ldr(pc, MemOperand(pc, -4)); 691 patcher.masm()->ldr(pc, MemOperand(pc, -4));
683 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); 692 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start()));
684 } 693 }
685 } 694 }
686 695
687 696
688 } } // namespace v8::internal 697 } } // namespace v8::internal
689 698
690 #endif // V8_TARGET_ARCH_ARM 699 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698