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 4799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4810 Check(ne, kOperandIsASmiAndNotAName, t0, Operand(zero_reg)); | 4810 Check(ne, kOperandIsASmiAndNotAName, t0, Operand(zero_reg)); |
4811 push(object); | 4811 push(object); |
4812 lw(object, FieldMemOperand(object, HeapObject::kMapOffset)); | 4812 lw(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
4813 lbu(object, FieldMemOperand(object, Map::kInstanceTypeOffset)); | 4813 lbu(object, FieldMemOperand(object, Map::kInstanceTypeOffset)); |
4814 Check(le, kOperandIsNotAName, object, Operand(LAST_NAME_TYPE)); | 4814 Check(le, kOperandIsNotAName, object, Operand(LAST_NAME_TYPE)); |
4815 pop(object); | 4815 pop(object); |
4816 } | 4816 } |
4817 } | 4817 } |
4818 | 4818 |
4819 | 4819 |
| 4820 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
| 4821 Register scratch) { |
| 4822 if (emit_debug_code()) { |
| 4823 Label done_checking; |
| 4824 AssertNotSmi(object); |
| 4825 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); |
| 4826 Branch(&done_checking, eq, object, Operand(scratch)); |
| 4827 push(object); |
| 4828 lw(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 4829 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
| 4830 Assert(eq, kExpectedUndefinedOrCell, object, Operand(scratch)); |
| 4831 pop(object); |
| 4832 bind(&done_checking); |
| 4833 } |
| 4834 } |
| 4835 |
| 4836 |
4820 void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) { | 4837 void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) { |
4821 if (emit_debug_code()) { | 4838 if (emit_debug_code()) { |
4822 ASSERT(!reg.is(at)); | 4839 ASSERT(!reg.is(at)); |
4823 LoadRoot(at, index); | 4840 LoadRoot(at, index); |
4824 Check(eq, kHeapNumberMapRegisterClobbered, reg, Operand(at)); | 4841 Check(eq, kHeapNumberMapRegisterClobbered, reg, Operand(at)); |
4825 } | 4842 } |
4826 } | 4843 } |
4827 | 4844 |
4828 | 4845 |
4829 void MacroAssembler::JumpIfNotHeapNumber(Register object, | 4846 void MacroAssembler::JumpIfNotHeapNumber(Register object, |
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5724 } | 5741 } |
5725 if (ms.shift() > 0) { | 5742 if (ms.shift() > 0) { |
5726 sra(result, result, ms.shift()); | 5743 sra(result, result, ms.shift()); |
5727 } | 5744 } |
5728 } | 5745 } |
5729 | 5746 |
5730 | 5747 |
5731 } } // namespace v8::internal | 5748 } } // namespace v8::internal |
5732 | 5749 |
5733 #endif // V8_TARGET_ARCH_MIPS | 5750 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |