Index: src/arm64/macro-assembler-arm64-inl.h |
diff --git a/src/arm64/macro-assembler-arm64-inl.h b/src/arm64/macro-assembler-arm64-inl.h |
index a915058d3164edfd5b1a584685c005b5bcaeca15..445513bf5abb619ca68d959fc1f4866b7c8fb393 100644 |
--- a/src/arm64/macro-assembler-arm64-inl.h |
+++ b/src/arm64/macro-assembler-arm64-inl.h |
@@ -1434,6 +1434,32 @@ |
} |
+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)); |
+ // If cmp result is lt, the following ccmp will clear all flags. |
+ // Z == 0, N == V implies gt condition. |
+ Cmp(scratch, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE); |
+ Ccmp(scratch, LAST_NONCALLABLE_SPEC_OBJECT_TYPE, NoFlag, ge); |
+ |
+ // If we didn't get a valid label object just fall through and leave the |
+ // flags updated. |
+ if (fail != NULL) { |
+ B(gt, fail); |
+ } |
+} |
+ |
+ |
void MacroAssembler::IsObjectJSStringType(Register object, |
Register type, |
Label* not_string, |