Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 0d74a64e20da03986a114ce6fded978df50ab146..19d131af54788b78a68a640d1d316108c0b54943 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -1234,6 +1234,16 @@ void MacroAssembler::IsObjectJSStringType(Register object, |
} |
+void MacroAssembler::IsObjectNameType(Register object, |
+ Register scratch, |
+ Label* fail) { |
+ ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
+ ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); |
+ cmp(scratch, Operand(LAST_NAME_TYPE)); |
+ b(hi, fail); |
+} |
+ |
+ |
#ifdef ENABLE_DEBUGGER_SUPPORT |
void MacroAssembler::DebugBreak() { |
mov(r0, Operand::Zero()); |
@@ -3178,6 +3188,20 @@ void MacroAssembler::AssertString(Register object) { |
} |
+void MacroAssembler::AssertName(Register object) { |
+ if (emit_debug_code()) { |
+ STATIC_ASSERT(kSmiTag == 0); |
+ tst(object, Operand(kSmiTagMask)); |
+ Check(ne, "Operand is a smi and not a name"); |
+ push(object); |
+ ldr(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
+ CompareInstanceType(object, object, LAST_NAME_TYPE); |
+ pop(object); |
+ Check(le, "Operand is not a name"); |
+ } |
+} |
+ |
+ |
void MacroAssembler::AssertRootValue(Register src, |
Heap::RootListIndex root_value_index, |