OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 Abort(kOperandIsASmiAndNotAName); | 1258 Abort(kOperandIsASmiAndNotAName); |
1259 Bind(¬_smi); | 1259 Bind(¬_smi); |
1260 | 1260 |
1261 Ldr(Tmp1(), FieldMemOperand(object, HeapObject::kMapOffset)); | 1261 Ldr(Tmp1(), FieldMemOperand(object, HeapObject::kMapOffset)); |
1262 CompareInstanceType(Tmp1(), Tmp1(), LAST_NAME_TYPE); | 1262 CompareInstanceType(Tmp1(), Tmp1(), LAST_NAME_TYPE); |
1263 Check(ls, kOperandIsNotAName); | 1263 Check(ls, kOperandIsNotAName); |
1264 } | 1264 } |
1265 } | 1265 } |
1266 | 1266 |
1267 | 1267 |
| 1268 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
| 1269 Register scratch) { |
| 1270 if (emit_debug_code()) { |
| 1271 Label done_checking; |
| 1272 AssertNotSmi(object); |
| 1273 JumpIfRoot(object, Heap::kUndefinedValueRootIndex, &done_checking); |
| 1274 Ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 1275 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
| 1276 Assert(eq, kExpectedUndefinedOrCell); |
| 1277 Bind(&done_checking); |
| 1278 } |
| 1279 } |
| 1280 |
| 1281 |
1268 void MacroAssembler::AssertString(Register object) { | 1282 void MacroAssembler::AssertString(Register object) { |
1269 if (emit_debug_code()) { | 1283 if (emit_debug_code()) { |
1270 Register temp = Tmp1(); | 1284 Register temp = Tmp1(); |
1271 STATIC_ASSERT(kSmiTag == 0); | 1285 STATIC_ASSERT(kSmiTag == 0); |
1272 Tst(object, kSmiTagMask); | 1286 Tst(object, kSmiTagMask); |
1273 Check(ne, kOperandIsASmiAndNotAString); | 1287 Check(ne, kOperandIsASmiAndNotAString); |
1274 Ldr(temp, FieldMemOperand(object, HeapObject::kMapOffset)); | 1288 Ldr(temp, FieldMemOperand(object, HeapObject::kMapOffset)); |
1275 CompareInstanceType(temp, temp, FIRST_NONSTRING_TYPE); | 1289 CompareInstanceType(temp, temp, FIRST_NONSTRING_TYPE); |
1276 Check(lo, kOperandIsNotAString); | 1290 Check(lo, kOperandIsNotAString); |
1277 } | 1291 } |
(...skipping 3519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4797 } | 4811 } |
4798 } | 4812 } |
4799 | 4813 |
4800 | 4814 |
4801 #undef __ | 4815 #undef __ |
4802 | 4816 |
4803 | 4817 |
4804 } } // namespace v8::internal | 4818 } } // namespace v8::internal |
4805 | 4819 |
4806 #endif // V8_TARGET_ARCH_A64 | 4820 #endif // V8_TARGET_ARCH_A64 |
OLD | NEW |