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 3014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3025 Check(ne, kOperandIsASmiAndNotAName); | 3025 Check(ne, kOperandIsASmiAndNotAName); |
3026 push(object); | 3026 push(object); |
3027 ldr(object, FieldMemOperand(object, HeapObject::kMapOffset)); | 3027 ldr(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
3028 CompareInstanceType(object, object, LAST_NAME_TYPE); | 3028 CompareInstanceType(object, object, LAST_NAME_TYPE); |
3029 pop(object); | 3029 pop(object); |
3030 Check(le, kOperandIsNotAName); | 3030 Check(le, kOperandIsNotAName); |
3031 } | 3031 } |
3032 } | 3032 } |
3033 | 3033 |
3034 | 3034 |
| 3035 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
| 3036 Register scratch) { |
| 3037 if (emit_debug_code()) { |
| 3038 Label done_checking; |
| 3039 AssertNotSmi(object); |
| 3040 CompareRoot(object, Heap::kUndefinedValueRootIndex); |
| 3041 b(eq, &done_checking); |
| 3042 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 3043 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
| 3044 Assert(eq, kExpectedUndefinedOrCell); |
| 3045 bind(&done_checking); |
| 3046 } |
| 3047 } |
| 3048 |
3035 | 3049 |
3036 void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) { | 3050 void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) { |
3037 if (emit_debug_code()) { | 3051 if (emit_debug_code()) { |
3038 CompareRoot(reg, index); | 3052 CompareRoot(reg, index); |
3039 Check(eq, kHeapNumberMapRegisterClobbered); | 3053 Check(eq, kHeapNumberMapRegisterClobbered); |
3040 } | 3054 } |
3041 } | 3055 } |
3042 | 3056 |
3043 | 3057 |
3044 void MacroAssembler::JumpIfNotHeapNumber(Register object, | 3058 void MacroAssembler::JumpIfNotHeapNumber(Register object, |
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4056 if (divisor < 0 && ms.multiplier() > 0) { | 4070 if (divisor < 0 && ms.multiplier() > 0) { |
4057 sub(result, result, Operand(dividend)); | 4071 sub(result, result, Operand(dividend)); |
4058 } | 4072 } |
4059 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); | 4073 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); |
4060 } | 4074 } |
4061 | 4075 |
4062 | 4076 |
4063 } } // namespace v8::internal | 4077 } } // namespace v8::internal |
4064 | 4078 |
4065 #endif // V8_TARGET_ARCH_ARM | 4079 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |