| 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 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1584 } | 1584 } |
| 1585 | 1585 |
| 1586 | 1586 |
| 1587 void MacroAssembler::Allocate(int object_size, | 1587 void MacroAssembler::Allocate(int object_size, |
| 1588 Register result, | 1588 Register result, |
| 1589 Register result_end, | 1589 Register result_end, |
| 1590 Register scratch, | 1590 Register scratch, |
| 1591 Label* gc_required, | 1591 Label* gc_required, |
| 1592 AllocationFlags flags) { | 1592 AllocationFlags flags) { |
| 1593 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); | 1593 ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); |
| 1594 ASSERT(object_size <= Page::kMaxNonCodeHeapObjectSize); | 1594 ASSERT(object_size <= Page::kMaxRegularHeapObjectSize); |
| 1595 if (!FLAG_inline_new) { | 1595 if (!FLAG_inline_new) { |
| 1596 if (emit_debug_code()) { | 1596 if (emit_debug_code()) { |
| 1597 // Trash the registers to simulate an allocation failure. | 1597 // Trash the registers to simulate an allocation failure. |
| 1598 mov(result, Immediate(0x7091)); | 1598 mov(result, Immediate(0x7091)); |
| 1599 if (result_end.is_valid()) { | 1599 if (result_end.is_valid()) { |
| 1600 mov(result_end, Immediate(0x7191)); | 1600 mov(result_end, Immediate(0x7191)); |
| 1601 } | 1601 } |
| 1602 if (scratch.is_valid()) { | 1602 if (scratch.is_valid()) { |
| 1603 mov(scratch, Immediate(0x7291)); | 1603 mov(scratch, Immediate(0x7291)); |
| 1604 } | 1604 } |
| (...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3643 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); | 3643 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); |
| 3644 j(equal, found); | 3644 j(equal, found); |
| 3645 mov(current, FieldOperand(current, Map::kPrototypeOffset)); | 3645 mov(current, FieldOperand(current, Map::kPrototypeOffset)); |
| 3646 cmp(current, Immediate(factory->null_value())); | 3646 cmp(current, Immediate(factory->null_value())); |
| 3647 j(not_equal, &loop_again); | 3647 j(not_equal, &loop_again); |
| 3648 } | 3648 } |
| 3649 | 3649 |
| 3650 } } // namespace v8::internal | 3650 } } // namespace v8::internal |
| 3651 | 3651 |
| 3652 #endif // V8_TARGET_ARCH_IA32 | 3652 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |