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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 19934006: Simplified large object allocation strategy. (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/mips/macro-assembler-mips.cc ('k') | test/cctest/test-heap.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 3820 matching lines...) Expand 10 before | Expand all | Expand 10 after
3831 } 3831 }
3832 3832
3833 3833
3834 void MacroAssembler::Allocate(int object_size, 3834 void MacroAssembler::Allocate(int object_size,
3835 Register result, 3835 Register result,
3836 Register result_end, 3836 Register result_end,
3837 Register scratch, 3837 Register scratch,
3838 Label* gc_required, 3838 Label* gc_required,
3839 AllocationFlags flags) { 3839 AllocationFlags flags) {
3840 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); 3840 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0);
3841 ASSERT(object_size <= Page::kMaxNonCodeHeapObjectSize);
3841 if (!FLAG_inline_new) { 3842 if (!FLAG_inline_new) {
3842 if (emit_debug_code()) { 3843 if (emit_debug_code()) {
3843 // Trash the registers to simulate an allocation failure. 3844 // Trash the registers to simulate an allocation failure.
3844 movl(result, Immediate(0x7091)); 3845 movl(result, Immediate(0x7091));
3845 if (result_end.is_valid()) { 3846 if (result_end.is_valid()) {
3846 movl(result_end, Immediate(0x7191)); 3847 movl(result_end, Immediate(0x7191));
3847 } 3848 }
3848 if (scratch.is_valid()) { 3849 if (scratch.is_valid()) {
3849 movl(scratch, Immediate(0x7291)); 3850 movl(scratch, Immediate(0x7291));
3850 } 3851 }
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
4693 j(greater, &no_memento_available); 4694 j(greater, &no_memento_available);
4694 CompareRoot(MemOperand(scratch_reg, -AllocationMemento::kSize), 4695 CompareRoot(MemOperand(scratch_reg, -AllocationMemento::kSize),
4695 Heap::kAllocationMementoMapRootIndex); 4696 Heap::kAllocationMementoMapRootIndex);
4696 bind(&no_memento_available); 4697 bind(&no_memento_available);
4697 } 4698 }
4698 4699
4699 4700
4700 } } // namespace v8::internal 4701 } } // namespace v8::internal
4701 4702
4702 #endif // V8_TARGET_ARCH_X64 4703 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698