Index: src/arm/macro-assembler-arm.cc |
=================================================================== |
--- src/arm/macro-assembler-arm.cc (revision 6762) |
+++ src/arm/macro-assembler-arm.cc (working copy) |
@@ -929,8 +929,8 @@ |
void MacroAssembler::IsObjectJSStringType(Register object, |
- Register scratch, |
- Label* fail) { |
+ Register scratch, |
+ Label* fail) { |
ASSERT(kNotStringTag != 0); |
ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
@@ -2122,6 +2122,19 @@ |
} |
+void MacroAssembler::AbortIfNotString(Register object) { |
+ STATIC_ASSERT(kSmiTag == 0); |
+ tst(object, Operand(kSmiTagMask)); |
+ Assert(ne, "Operand is not a string"); |
+ push(object); |
+ ldr(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
+ CompareInstanceType(object, object, FIRST_NONSTRING_TYPE); |
+ pop(object); |
+ Assert(lo, "Operand is not a string"); |
+} |
+ |
+ |
+ |
void MacroAssembler::AbortIfNotRootValue(Register src, |
Heap::RootListIndex root_value_index, |
const char* message) { |