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

Side by Side Diff: src/x64/codegen-x64.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: A few more review comments 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
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/full-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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // ----------- S t a t e ------------- 276 // ----------- S t a t e -------------
277 // -- rax : value 277 // -- rax : value
278 // -- rbx : target map 278 // -- rbx : target map
279 // -- rcx : key 279 // -- rcx : key
280 // -- rdx : receiver 280 // -- rdx : receiver
281 // -- rsp[0] : return address 281 // -- rsp[0] : return address
282 // ----------------------------------- 282 // -----------------------------------
283 // The fail label is not actually used since we do not allocate. 283 // The fail label is not actually used since we do not allocate.
284 Label allocated, new_backing_store, only_change_map, done; 284 Label allocated, new_backing_store, only_change_map, done;
285 285
286 if (FLAG_track_allocation_sites) {
287 masm->TestJSArrayForAllocationSiteInfo(rdx, rdi, fail);
288 }
289
286 // Check for empty arrays, which only require a map transition and no changes 290 // Check for empty arrays, which only require a map transition and no changes
287 // to the backing store. 291 // to the backing store.
288 __ movq(r8, FieldOperand(rdx, JSObject::kElementsOffset)); 292 __ movq(r8, FieldOperand(rdx, JSObject::kElementsOffset));
289 __ CompareRoot(r8, Heap::kEmptyFixedArrayRootIndex); 293 __ CompareRoot(r8, Heap::kEmptyFixedArrayRootIndex);
290 __ j(equal, &only_change_map); 294 __ j(equal, &only_change_map);
291 295
292 // Check backing store for COW-ness. For COW arrays we have to 296 // Check backing store for COW-ness. For COW arrays we have to
293 // allocate a new backing store. 297 // allocate a new backing store.
294 __ SmiToInteger32(r9, FieldOperand(r8, FixedDoubleArray::kLengthOffset)); 298 __ SmiToInteger32(r9, FieldOperand(r8, FixedDoubleArray::kLengthOffset));
295 __ CompareRoot(FieldOperand(r8, HeapObject::kMapOffset), 299 __ CompareRoot(FieldOperand(r8, HeapObject::kMapOffset),
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 CodePatcher patcher(sequence, young_length); 762 CodePatcher patcher(sequence, young_length);
759 patcher.masm()->call(stub->instruction_start()); 763 patcher.masm()->call(stub->instruction_start());
760 patcher.masm()->nop(); 764 patcher.masm()->nop();
761 } 765 }
762 } 766 }
763 767
764 768
765 } } // namespace v8::internal 769 } } // namespace v8::internal
766 770
767 #endif // V8_TARGET_ARCH_X64 771 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698