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

Side by Side Diff: src/x64/codegen-x64.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/objects-printer.cc ('k') | src/x64/lithium-codegen-x64.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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 #undef __ 247 #undef __
248 248
249 // ------------------------------------------------------------------------- 249 // -------------------------------------------------------------------------
250 // Code generators 250 // Code generators
251 251
252 #define __ ACCESS_MASM(masm) 252 #define __ ACCESS_MASM(masm)
253 253
254 void ElementsTransitionGenerator::GenerateMapChangeElementsTransition( 254 void ElementsTransitionGenerator::GenerateMapChangeElementsTransition(
255 MacroAssembler* masm, AllocationSiteMode mode, 255 MacroAssembler* masm, AllocationSiteMode mode,
256 Label* allocation_site_info_found) { 256 Label* allocation_memento_found) {
257 // ----------- S t a t e ------------- 257 // ----------- S t a t e -------------
258 // -- rax : value 258 // -- rax : value
259 // -- rbx : target map 259 // -- rbx : target map
260 // -- rcx : key 260 // -- rcx : key
261 // -- rdx : receiver 261 // -- rdx : receiver
262 // -- rsp[0] : return address 262 // -- rsp[0] : return address
263 // ----------------------------------- 263 // -----------------------------------
264 if (mode == TRACK_ALLOCATION_SITE) { 264 if (mode == TRACK_ALLOCATION_SITE) {
265 ASSERT(allocation_site_info_found != NULL); 265 ASSERT(allocation_memento_found != NULL);
266 __ TestJSArrayForAllocationSiteInfo(rdx, rdi); 266 __ TestJSArrayForAllocationMemento(rdx, rdi);
267 __ j(equal, allocation_site_info_found); 267 __ j(equal, allocation_memento_found);
268 } 268 }
269 269
270 // Set transitioned map. 270 // Set transitioned map.
271 __ movq(FieldOperand(rdx, HeapObject::kMapOffset), rbx); 271 __ movq(FieldOperand(rdx, HeapObject::kMapOffset), rbx);
272 __ RecordWriteField(rdx, 272 __ RecordWriteField(rdx,
273 HeapObject::kMapOffset, 273 HeapObject::kMapOffset,
274 rbx, 274 rbx,
275 rdi, 275 rdi,
276 kDontSaveFPRegs, 276 kDontSaveFPRegs,
277 EMIT_REMEMBERED_SET, 277 EMIT_REMEMBERED_SET,
278 OMIT_SMI_CHECK); 278 OMIT_SMI_CHECK);
279 } 279 }
280 280
281 281
282 void ElementsTransitionGenerator::GenerateSmiToDouble( 282 void ElementsTransitionGenerator::GenerateSmiToDouble(
283 MacroAssembler* masm, AllocationSiteMode mode, Label* fail) { 283 MacroAssembler* masm, AllocationSiteMode mode, Label* fail) {
284 // ----------- S t a t e ------------- 284 // ----------- S t a t e -------------
285 // -- rax : value 285 // -- rax : value
286 // -- rbx : target map 286 // -- rbx : target map
287 // -- rcx : key 287 // -- rcx : key
288 // -- rdx : receiver 288 // -- rdx : receiver
289 // -- rsp[0] : return address 289 // -- rsp[0] : return address
290 // ----------------------------------- 290 // -----------------------------------
291 // The fail label is not actually used since we do not allocate. 291 // The fail label is not actually used since we do not allocate.
292 Label allocated, new_backing_store, only_change_map, done; 292 Label allocated, new_backing_store, only_change_map, done;
293 293
294 if (mode == TRACK_ALLOCATION_SITE) { 294 if (mode == TRACK_ALLOCATION_SITE) {
295 __ TestJSArrayForAllocationSiteInfo(rdx, rdi); 295 __ TestJSArrayForAllocationMemento(rdx, rdi);
296 __ j(equal, fail); 296 __ j(equal, fail);
297 } 297 }
298 298
299 // Check for empty arrays, which only require a map transition and no changes 299 // Check for empty arrays, which only require a map transition and no changes
300 // to the backing store. 300 // to the backing store.
301 __ movq(r8, FieldOperand(rdx, JSObject::kElementsOffset)); 301 __ movq(r8, FieldOperand(rdx, JSObject::kElementsOffset));
302 __ CompareRoot(r8, Heap::kEmptyFixedArrayRootIndex); 302 __ CompareRoot(r8, Heap::kEmptyFixedArrayRootIndex);
303 __ j(equal, &only_change_map); 303 __ j(equal, &only_change_map);
304 304
305 // Check backing store for COW-ness. For COW arrays we have to 305 // Check backing store for COW-ness. For COW arrays we have to
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 // ----------- S t a t e ------------- 411 // ----------- S t a t e -------------
412 // -- rax : value 412 // -- rax : value
413 // -- rbx : target map 413 // -- rbx : target map
414 // -- rcx : key 414 // -- rcx : key
415 // -- rdx : receiver 415 // -- rdx : receiver
416 // -- rsp[0] : return address 416 // -- rsp[0] : return address
417 // ----------------------------------- 417 // -----------------------------------
418 Label loop, entry, convert_hole, gc_required, only_change_map; 418 Label loop, entry, convert_hole, gc_required, only_change_map;
419 419
420 if (mode == TRACK_ALLOCATION_SITE) { 420 if (mode == TRACK_ALLOCATION_SITE) {
421 __ TestJSArrayForAllocationSiteInfo(rdx, rdi); 421 __ TestJSArrayForAllocationMemento(rdx, rdi);
422 __ j(equal, fail); 422 __ j(equal, fail);
423 } 423 }
424 424
425 // Check for empty arrays, which only require a map transition and no changes 425 // Check for empty arrays, which only require a map transition and no changes
426 // to the backing store. 426 // to the backing store.
427 __ movq(r8, FieldOperand(rdx, JSObject::kElementsOffset)); 427 __ movq(r8, FieldOperand(rdx, JSObject::kElementsOffset));
428 __ CompareRoot(r8, Heap::kEmptyFixedArrayRootIndex); 428 __ CompareRoot(r8, Heap::kEmptyFixedArrayRootIndex);
429 __ j(equal, &only_change_map); 429 __ j(equal, &only_change_map);
430 430
431 __ push(rax); 431 __ push(rax);
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 i++) { 740 i++) {
741 patcher.masm()->nop(); 741 patcher.masm()->nop();
742 } 742 }
743 } 743 }
744 } 744 }
745 745
746 746
747 } } // namespace v8::internal 747 } } // namespace v8::internal
748 748
749 #endif // V8_TARGET_ARCH_X64 749 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698