| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |