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

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

Issue 19595004: Rename AllocationSiteInfo to AllocationMemento (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/ia32/macro-assembler-ia32.cc ('k') | src/mips/lithium-codegen-mips.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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } 138 }
139 139
140 140
141 // ------------------------------------------------------------------------- 141 // -------------------------------------------------------------------------
142 // Code generators 142 // Code generators
143 143
144 #define __ ACCESS_MASM(masm) 144 #define __ ACCESS_MASM(masm)
145 145
146 void ElementsTransitionGenerator::GenerateMapChangeElementsTransition( 146 void ElementsTransitionGenerator::GenerateMapChangeElementsTransition(
147 MacroAssembler* masm, AllocationSiteMode mode, 147 MacroAssembler* masm, AllocationSiteMode mode,
148 Label* allocation_site_info_found) { 148 Label* allocation_memento_found) {
149 // ----------- S t a t e ------------- 149 // ----------- S t a t e -------------
150 // -- a0 : value 150 // -- a0 : value
151 // -- a1 : key 151 // -- a1 : key
152 // -- a2 : receiver 152 // -- a2 : receiver
153 // -- ra : return address 153 // -- ra : return address
154 // -- a3 : target map, scratch for subsequent call 154 // -- a3 : target map, scratch for subsequent call
155 // -- t0 : scratch (elements) 155 // -- t0 : 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_memento_found != NULL);
159 masm->TestJSArrayForAllocationSiteInfo(a2, t0, eq, 159 masm->TestJSArrayForAllocationMemento(a2, t0, eq,
160 allocation_site_info_found); 160 allocation_memento_found);
161 } 161 }
162 162
163 // Set transitioned map. 163 // Set transitioned map.
164 __ sw(a3, FieldMemOperand(a2, HeapObject::kMapOffset)); 164 __ sw(a3, FieldMemOperand(a2, HeapObject::kMapOffset));
165 __ RecordWriteField(a2, 165 __ RecordWriteField(a2,
166 HeapObject::kMapOffset, 166 HeapObject::kMapOffset,
167 a3, 167 a3,
168 t5, 168 t5,
169 kRAHasNotBeenSaved, 169 kRAHasNotBeenSaved,
170 kDontSaveFPRegs, 170 kDontSaveFPRegs,
(...skipping 10 matching lines...) Expand all
181 // -- a2 : receiver 181 // -- a2 : receiver
182 // -- ra : return address 182 // -- ra : return address
183 // -- a3 : target map, scratch for subsequent call 183 // -- a3 : target map, scratch for subsequent call
184 // -- t0 : scratch (elements) 184 // -- t0 : 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 187
188 Register scratch = t6; 188 Register scratch = t6;
189 189
190 if (mode == TRACK_ALLOCATION_SITE) { 190 if (mode == TRACK_ALLOCATION_SITE) {
191 masm->TestJSArrayForAllocationSiteInfo(a2, t0, eq, fail); 191 masm->TestJSArrayForAllocationMemento(a2, t0, eq, fail);
192 } 192 }
193 193
194 // 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
195 // to the backing store. 195 // to the backing store.
196 __ lw(t0, FieldMemOperand(a2, JSObject::kElementsOffset)); 196 __ lw(t0, FieldMemOperand(a2, JSObject::kElementsOffset));
197 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex); 197 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex);
198 __ Branch(&only_change_map, eq, at, Operand(t0)); 198 __ Branch(&only_change_map, eq, at, Operand(t0));
199 199
200 __ push(ra); 200 __ push(ra);
201 __ lw(t1, FieldMemOperand(t0, FixedArray::kLengthOffset)); 201 __ lw(t1, FieldMemOperand(t0, FixedArray::kLengthOffset));
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 // -- a0 : value 309 // -- a0 : value
310 // -- a1 : key 310 // -- a1 : key
311 // -- a2 : receiver 311 // -- a2 : receiver
312 // -- ra : return address 312 // -- ra : return address
313 // -- a3 : target map, scratch for subsequent call 313 // -- a3 : target map, scratch for subsequent call
314 // -- t0 : scratch (elements) 314 // -- t0 : scratch (elements)
315 // ----------------------------------- 315 // -----------------------------------
316 Label entry, loop, convert_hole, gc_required, only_change_map; 316 Label entry, loop, convert_hole, gc_required, only_change_map;
317 317
318 if (mode == TRACK_ALLOCATION_SITE) { 318 if (mode == TRACK_ALLOCATION_SITE) {
319 masm->TestJSArrayForAllocationSiteInfo(a2, t0, eq, fail); 319 masm->TestJSArrayForAllocationMemento(a2, t0, eq, fail);
320 } 320 }
321 321
322 // Check for empty arrays, which only require a map transition and no changes 322 // Check for empty arrays, which only require a map transition and no changes
323 // to the backing store. 323 // to the backing store.
324 __ lw(t0, FieldMemOperand(a2, JSObject::kElementsOffset)); 324 __ lw(t0, FieldMemOperand(a2, JSObject::kElementsOffset));
325 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex); 325 __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex);
326 __ Branch(&only_change_map, eq, at, Operand(t0)); 326 __ Branch(&only_change_map, eq, at, Operand(t0));
327 327
328 __ MultiPush(a0.bit() | a1.bit() | a2.bit() | a3.bit() | ra.bit()); 328 __ MultiPush(a0.bit() | a1.bit() | a2.bit() | a3.bit() | ra.bit());
329 329
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); 659 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start()));
660 } 660 }
661 } 661 }
662 662
663 663
664 #undef __ 664 #undef __
665 665
666 } } // namespace v8::internal 666 } } // namespace v8::internal
667 667
668 #endif // V8_TARGET_ARCH_MIPS 668 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698