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 3052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3063 Check(ne, kOperandIsASmiAndNotAName); | 3063 Check(ne, kOperandIsASmiAndNotAName); |
3064 push(object); | 3064 push(object); |
3065 ldr(object, FieldMemOperand(object, HeapObject::kMapOffset)); | 3065 ldr(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
3066 CompareInstanceType(object, object, LAST_NAME_TYPE); | 3066 CompareInstanceType(object, object, LAST_NAME_TYPE); |
3067 pop(object); | 3067 pop(object); |
3068 Check(le, kOperandIsNotAName); | 3068 Check(le, kOperandIsNotAName); |
3069 } | 3069 } |
3070 } | 3070 } |
3071 | 3071 |
3072 | 3072 |
| 3073 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
| 3074 Register scratch) { |
| 3075 if (emit_debug_code()) { |
| 3076 Label done_checking; |
| 3077 AssertNotSmi(object); |
| 3078 CompareRoot(object, Heap::kUndefinedValueRootIndex); |
| 3079 b(eq, &done_checking); |
| 3080 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 3081 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
| 3082 Assert(eq, kExpectedUndefinedOrCell); |
| 3083 bind(&done_checking); |
| 3084 } |
| 3085 } |
| 3086 |
3073 | 3087 |
3074 void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) { | 3088 void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) { |
3075 if (emit_debug_code()) { | 3089 if (emit_debug_code()) { |
3076 CompareRoot(reg, index); | 3090 CompareRoot(reg, index); |
3077 Check(eq, kHeapNumberMapRegisterClobbered); | 3091 Check(eq, kHeapNumberMapRegisterClobbered); |
3078 } | 3092 } |
3079 } | 3093 } |
3080 | 3094 |
3081 | 3095 |
3082 void MacroAssembler::JumpIfNotHeapNumber(Register object, | 3096 void MacroAssembler::JumpIfNotHeapNumber(Register object, |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4075 void CodePatcher::EmitCondition(Condition cond) { | 4089 void CodePatcher::EmitCondition(Condition cond) { |
4076 Instr instr = Assembler::instr_at(masm_.pc_); | 4090 Instr instr = Assembler::instr_at(masm_.pc_); |
4077 instr = (instr & ~kCondMask) | cond; | 4091 instr = (instr & ~kCondMask) | cond; |
4078 masm_.emit(instr); | 4092 masm_.emit(instr); |
4079 } | 4093 } |
4080 | 4094 |
4081 | 4095 |
4082 } } // namespace v8::internal | 4096 } } // namespace v8::internal |
4083 | 4097 |
4084 #endif // V8_TARGET_ARCH_ARM | 4098 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |