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

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

Issue 11659022: Generate the TransitionElementsStub using Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review feedback Created 7 years, 10 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/deoptimizer-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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // ----------- S t a t e ------------- 149 // ----------- S t a t e -------------
150 // -- r0 : value 150 // -- r0 : value
151 // -- r1 : key 151 // -- r1 : key
152 // -- r2 : receiver 152 // -- r2 : receiver
153 // -- lr : return address 153 // -- lr : return address
154 // -- r3 : target map, scratch for subsequent call 154 // -- r3 : target map, scratch for subsequent call
155 // -- r4 : scratch (elements) 155 // -- r4 : scratch (elements)
156 // ----------------------------------- 156 // -----------------------------------
157 if (mode == TRACK_ALLOCATION_SITE) { 157 if (mode == TRACK_ALLOCATION_SITE) {
158 ASSERT(allocation_site_info_found != NULL); 158 ASSERT(allocation_site_info_found != NULL);
159 masm->TestJSArrayForAllocationSiteInfo(r2, r4, 159 __ TestJSArrayForAllocationSiteInfo(r2, r4);
160 allocation_site_info_found); 160 __ b(eq, allocation_site_info_found);
161 } 161 }
162 162
163 // Set transitioned map. 163 // Set transitioned map.
164 __ str(r3, FieldMemOperand(r2, HeapObject::kMapOffset)); 164 __ str(r3, FieldMemOperand(r2, HeapObject::kMapOffset));
165 __ RecordWriteField(r2, 165 __ RecordWriteField(r2,
166 HeapObject::kMapOffset, 166 HeapObject::kMapOffset,
167 r3, 167 r3,
168 r9, 168 r9,
169 kLRHasNotBeenSaved, 169 kLRHasNotBeenSaved,
170 kDontSaveFPRegs, 170 kDontSaveFPRegs,
171 EMIT_REMEMBERED_SET, 171 EMIT_REMEMBERED_SET,
172 OMIT_SMI_CHECK); 172 OMIT_SMI_CHECK);
173 } 173 }
174 174
175 175
176 void ElementsTransitionGenerator::GenerateSmiToDouble( 176 void ElementsTransitionGenerator::GenerateSmiToDouble(
177 MacroAssembler* masm, AllocationSiteMode mode, Label* fail) { 177 MacroAssembler* masm, AllocationSiteMode mode, Label* fail) {
178 // ----------- S t a t e ------------- 178 // ----------- S t a t e -------------
179 // -- r0 : value 179 // -- r0 : value
180 // -- r1 : key 180 // -- r1 : key
181 // -- r2 : receiver 181 // -- r2 : receiver
182 // -- lr : return address 182 // -- lr : return address
183 // -- r3 : target map, scratch for subsequent call 183 // -- r3 : target map, scratch for subsequent call
184 // -- r4 : scratch (elements) 184 // -- r4 : scratch (elements)
185 // ----------------------------------- 185 // -----------------------------------
186 Label loop, entry, convert_hole, gc_required, only_change_map, done; 186 Label loop, entry, convert_hole, gc_required, only_change_map, done;
187 bool vfp2_supported = CpuFeatures::IsSupported(VFP2); 187 bool vfp2_supported = CpuFeatures::IsSupported(VFP2);
188 188
189 if (mode == TRACK_ALLOCATION_SITE) { 189 if (mode == TRACK_ALLOCATION_SITE) {
190 masm->TestJSArrayForAllocationSiteInfo(r2, r4, fail); 190 __ TestJSArrayForAllocationSiteInfo(r2, r4);
191 __ b(eq, fail);
191 } 192 }
192 193
193 // Check for empty arrays, which only require a map transition and no changes 194 // Check for empty arrays, which only require a map transition and no changes
194 // to the backing store. 195 // to the backing store.
195 __ ldr(r4, FieldMemOperand(r2, JSObject::kElementsOffset)); 196 __ ldr(r4, FieldMemOperand(r2, JSObject::kElementsOffset));
196 __ CompareRoot(r4, Heap::kEmptyFixedArrayRootIndex); 197 __ CompareRoot(r4, Heap::kEmptyFixedArrayRootIndex);
197 __ b(eq, &only_change_map); 198 __ b(eq, &only_change_map);
198 199
199 __ push(lr); 200 __ push(lr);
200 __ ldr(r5, FieldMemOperand(r4, FixedArray::kLengthOffset)); 201 __ ldr(r5, FieldMemOperand(r4, FixedArray::kLengthOffset));
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // -- r0 : value 321 // -- r0 : value
321 // -- r1 : key 322 // -- r1 : key
322 // -- r2 : receiver 323 // -- r2 : receiver
323 // -- lr : return address 324 // -- lr : return address
324 // -- r3 : target map, scratch for subsequent call 325 // -- r3 : target map, scratch for subsequent call
325 // -- r4 : scratch (elements) 326 // -- r4 : scratch (elements)
326 // ----------------------------------- 327 // -----------------------------------
327 Label entry, loop, convert_hole, gc_required, only_change_map; 328 Label entry, loop, convert_hole, gc_required, only_change_map;
328 329
329 if (mode == TRACK_ALLOCATION_SITE) { 330 if (mode == TRACK_ALLOCATION_SITE) {
330 masm->TestJSArrayForAllocationSiteInfo(r2, r4, fail); 331 __ TestJSArrayForAllocationSiteInfo(r2, r4);
332 __ b(eq, fail);
331 } 333 }
332 334
333 // Check for empty arrays, which only require a map transition and no changes 335 // Check for empty arrays, which only require a map transition and no changes
334 // to the backing store. 336 // to the backing store.
335 __ ldr(r4, FieldMemOperand(r2, JSObject::kElementsOffset)); 337 __ ldr(r4, FieldMemOperand(r2, JSObject::kElementsOffset));
336 __ CompareRoot(r4, Heap::kEmptyFixedArrayRootIndex); 338 __ CompareRoot(r4, Heap::kEmptyFixedArrayRootIndex);
337 __ b(eq, &only_change_map); 339 __ b(eq, &only_change_map);
338 340
339 __ push(lr); 341 __ push(lr);
340 __ Push(r3, r2, r1, r0); 342 __ Push(r3, r2, r1, r0);
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 patcher.masm()->add(r0, pc, Operand(-8)); 698 patcher.masm()->add(r0, pc, Operand(-8));
697 patcher.masm()->ldr(pc, MemOperand(pc, -4)); 699 patcher.masm()->ldr(pc, MemOperand(pc, -4));
698 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); 700 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start()));
699 } 701 }
700 } 702 }
701 703
702 704
703 } } // namespace v8::internal 705 } } // namespace v8::internal
704 706
705 #endif // V8_TARGET_ARCH_ARM 707 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/deoptimizer-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698