Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 6effec1e3193933e52ce36b8b98dfd9c322644be..4a131465902fb76eaa86248c1feadbd5c37ecfe1 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -178,6 +178,12 @@ void MacroAssembler::Drop(int count, Condition cond) { |
} |
+void MacroAssembler::Ret(int drop, Condition cond) { |
+ Drop(drop, cond); |
+ Ret(cond); |
+} |
+ |
+ |
void MacroAssembler::Swap(Register reg1, |
Register reg2, |
Register scratch, |
@@ -821,6 +827,38 @@ void MacroAssembler::InvokeFunction(JSFunction* function, |
} |
+void MacroAssembler::IsObjectJSObjectType(Register heap_object, |
+ Register map, |
+ Register scratch, |
+ Label* fail) { |
+ ldr(map, FieldMemOperand(heap_object, HeapObject::kMapOffset)); |
+ IsInstanceJSObjectType(map, scratch, fail); |
+} |
+ |
+ |
+void MacroAssembler::IsInstanceJSObjectType(Register map, |
+ Register scratch, |
+ Label* fail) { |
+ ldrb(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
+ cmp(scratch, Operand(FIRST_JS_OBJECT_TYPE)); |
+ b(lt, fail); |
+ cmp(scratch, Operand(LAST_JS_OBJECT_TYPE)); |
+ b(gt, fail); |
+} |
+ |
+ |
+void MacroAssembler::IsObjectJSStringType(Register object, |
+ Register scratch, |
+ Label* fail) { |
+ ASSERT(kNotStringTag != 0); |
+ |
+ ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
+ ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); |
+ tst(scratch, Operand(kIsNotStringMask)); |
+ b(nz, fail); |
+} |
+ |
+ |
#ifdef ENABLE_DEBUGGER_SUPPORT |
void MacroAssembler::DebugBreak() { |
ASSERT(allow_stub_calls()); |