| 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 4030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4041 } | 4041 } |
| 4042 | 4042 |
| 4043 | 4043 |
| 4044 void MacroAssembler::Allocate(int object_size, | 4044 void MacroAssembler::Allocate(int object_size, |
| 4045 Register result, | 4045 Register result, |
| 4046 Register result_end, | 4046 Register result_end, |
| 4047 Register scratch, | 4047 Register scratch, |
| 4048 Label* gc_required, | 4048 Label* gc_required, |
| 4049 AllocationFlags flags) { | 4049 AllocationFlags flags) { |
| 4050 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); | 4050 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); |
| 4051 ASSERT(object_size <= Page::kMaxNonCodeHeapObjectSize); | 4051 ASSERT(object_size <= Page::kMaxRegularHeapObjectSize); |
| 4052 if (!FLAG_inline_new) { | 4052 if (!FLAG_inline_new) { |
| 4053 if (emit_debug_code()) { | 4053 if (emit_debug_code()) { |
| 4054 // Trash the registers to simulate an allocation failure. | 4054 // Trash the registers to simulate an allocation failure. |
| 4055 movl(result, Immediate(0x7091)); | 4055 movl(result, Immediate(0x7091)); |
| 4056 if (result_end.is_valid()) { | 4056 if (result_end.is_valid()) { |
| 4057 movl(result_end, Immediate(0x7191)); | 4057 movl(result_end, Immediate(0x7191)); |
| 4058 } | 4058 } |
| 4059 if (scratch.is_valid()) { | 4059 if (scratch.is_valid()) { |
| 4060 movl(scratch, Immediate(0x7291)); | 4060 movl(scratch, Immediate(0x7291)); |
| 4061 } | 4061 } |
| (...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4991 j(equal, found); | 4991 j(equal, found); |
| 4992 movp(current, FieldOperand(current, Map::kPrototypeOffset)); | 4992 movp(current, FieldOperand(current, Map::kPrototypeOffset)); |
| 4993 CompareRoot(current, Heap::kNullValueRootIndex); | 4993 CompareRoot(current, Heap::kNullValueRootIndex); |
| 4994 j(not_equal, &loop_again); | 4994 j(not_equal, &loop_again); |
| 4995 } | 4995 } |
| 4996 | 4996 |
| 4997 | 4997 |
| 4998 } } // namespace v8::internal | 4998 } } // namespace v8::internal |
| 4999 | 4999 |
| 5000 #endif // V8_TARGET_ARCH_X64 | 5000 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |