Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 55759856a54a6581c859bdfc0294d723dbf70343..a4d64b9fd5ad936f756a6246aee18024071ea67d 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -2308,6 +2308,32 @@ void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii( |
} |
+template<class T> |
+static void JumpIfNotUniqueNameHelper(MacroAssembler* masm, |
+ T operand_or_register, |
+ Label* not_unique_name, |
+ Label::Distance distance) { |
+ STATIC_ASSERT(((SYMBOL_TYPE - 1) & kIsInternalizedMask) == kInternalizedTag); |
+ masm->cmpb(operand_or_register, Immediate(kInternalizedTag)); |
+ masm->j(less, not_unique_name, distance); |
+ masm->cmpb(operand_or_register, Immediate(SYMBOL_TYPE)); |
+ masm->j(greater, not_unique_name, distance); |
+} |
+ |
+ |
+void MacroAssembler::JumpIfNotUniqueName(Operand operand, |
+ Label* not_unique_name, |
+ Label::Distance distance) { |
+ JumpIfNotUniqueNameHelper<Operand>(this, operand, not_unique_name, distance); |
+} |
+ |
+ |
+void MacroAssembler::JumpIfNotUniqueName(Register reg, |
+ Label* not_unique_name, |
+ Label::Distance distance) { |
+ JumpIfNotUniqueNameHelper<Register>(this, reg, not_unique_name, distance); |
+} |
+ |
void MacroAssembler::Move(Register dst, Register src) { |
if (!dst.is(src)) { |