Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index bdedb18f2f59756d9e1cd26be0d8ce7bd8eb39ca..761448c0d9bd20fd06927b28fc5f30ae6439057d 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -3026,6 +3026,19 @@ void MacroAssembler::AssertString(Register object) { |
} |
+void MacroAssembler::AssertName(Register object) { |
+ if (emit_debug_code()) { |
+ testb(object, Immediate(kSmiTagMask)); |
+ Check(not_equal, "Operand is a smi and not a name"); |
+ push(object); |
+ movq(object, FieldOperand(object, HeapObject::kMapOffset)); |
+ CmpInstanceType(object, LAST_NAME_TYPE); |
+ pop(object); |
+ Check(below_equal, "Operand is not a name"); |
+ } |
+} |
+ |
+ |
void MacroAssembler::AssertRootValue(Register src, |
Heap::RootListIndex root_value_index, |
const char* message) { |
@@ -3050,6 +3063,16 @@ Condition MacroAssembler::IsObjectStringType(Register heap_object, |
} |
+Condition MacroAssembler::IsObjectNameType(Register heap_object, |
+ Register map, |
+ Register instance_type) { |
+ movq(map, FieldOperand(heap_object, HeapObject::kMapOffset)); |
+ movzxbl(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); |
+ cmpb(instance_type, Immediate(static_cast<int8_t>(LAST_NAME_TYPE))); |
+ return below_equal; |
+} |
+ |
+ |
void MacroAssembler::TryGetFunctionPrototype(Register function, |
Register result, |
Label* miss, |