Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 49bcf0cdeb50bc40262c6aa7eca4877b3e902e66..242fa1ec01b35203a1556c7699c33df06c4eed59 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -3866,6 +3866,15 @@ void MacroAssembler::IsObjectJSStringType(Register object, |
} |
+void MacroAssembler::IsObjectNameType(Register object, |
+ Register scratch, |
+ Label* fail) { |
+ lw(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
+ lbu(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); |
+ Branch(fail, hi, scratch, Operand(LAST_NAME_TYPE)); |
+} |
+ |
+ |
// --------------------------------------------------------------------------- |
// Support functions. |
@@ -4897,6 +4906,20 @@ void MacroAssembler::AssertString(Register object) { |
} |
+void MacroAssembler::AssertName(Register object) { |
+ if (emit_debug_code()) { |
+ STATIC_ASSERT(kSmiTag == 0); |
+ And(t0, object, Operand(kSmiTagMask)); |
+ Check(ne, "Operand is a smi and not a name", t0, Operand(zero_reg)); |
+ push(object); |
+ lw(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
+ lbu(object, FieldMemOperand(object, Map::kInstanceTypeOffset)); |
+ pop(object); |
+ Check(le, "Operand is not a name", object, Operand(LAST_NAME_TYPE)); |
+ } |
+} |
+ |
+ |
void MacroAssembler::AssertRootValue(Register src, |
Heap::RootListIndex root_value_index, |
const char* message) { |