Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index 8219d30f71cf1831fe0ac22b453ecc9590aafea6..554801cc950aba98436fbceeb878c6b94766f24e 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -643,6 +643,16 @@ Condition MacroAssembler::IsObjectStringType(Register heap_object, |
} |
+Condition MacroAssembler::IsObjectNameType(Register heap_object, |
+ Register map, |
+ Register instance_type) { |
+ mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); |
+ movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); |
+ cmpb(instance_type, static_cast<int8_t>(LAST_NAME_TYPE)); |
+ return below_equal; |
+} |
+ |
+ |
void MacroAssembler::IsObjectJSObjectType(Register heap_object, |
Register map, |
Register scratch, |
@@ -710,6 +720,19 @@ void MacroAssembler::AssertString(Register object) { |
} |
+void MacroAssembler::AssertName(Register object) { |
+ if (emit_debug_code()) { |
+ test(object, Immediate(kSmiTagMask)); |
+ Check(not_equal, "Operand is a smi and not a name"); |
+ push(object); |
+ mov(object, FieldOperand(object, HeapObject::kMapOffset)); |
+ CmpInstanceType(object, LAST_NAME_TYPE); |
+ pop(object); |
+ Check(below_equal, "Operand is not a name"); |
+ } |
+} |
+ |
+ |
void MacroAssembler::AssertNotSmi(Register object) { |
if (emit_debug_code()) { |
test(object, Immediate(kSmiTagMask)); |