| Index: src/x64/macro-assembler-x64.h
|
| ===================================================================
|
| --- src/x64/macro-assembler-x64.h (revision 6621)
|
| +++ src/x64/macro-assembler-x64.h (working copy)
|
| @@ -540,7 +540,15 @@
|
|
|
| // ---------------------------------------------------------------------------
|
| // String macros.
|
| +
|
| + // If object is a string, its map is loaded into object_map.
|
| template <typename LabelType>
|
| + void JumpIfNotString(Register object,
|
| + Register object_map,
|
| + LabelType* not_string);
|
| +
|
| +
|
| + template <typename LabelType>
|
| void JumpIfNotBothSequentialAsciiStrings(Register first_object,
|
| Register second_object,
|
| Register scratch1,
|
| @@ -1458,6 +1466,8 @@
|
| ASSERT(!src1.is(kScratchRegister));
|
| ASSERT(!src2.is(kScratchRegister));
|
| ASSERT(!dst.is(rcx));
|
| + // dst and src1 can be the same, because the one case that bails out
|
| + // is a shift by 0, which leaves dst, and therefore src1, unchanged.
|
| NearLabel result_ok;
|
| if (src1.is(rcx) || src2.is(rcx)) {
|
| movq(kScratchRegister, rcx);
|
| @@ -1592,6 +1602,17 @@
|
|
|
|
|
| template <typename LabelType>
|
| +void MacroAssembler::JumpIfNotString(Register object,
|
| + Register object_map,
|
| + LabelType* not_string) {
|
| + Condition is_smi = CheckSmi(object);
|
| + j(is_smi, not_string);
|
| + CmpObjectType(object, FIRST_NONSTRING_TYPE, object_map);
|
| + j(above_equal, not_string);
|
| +}
|
| +
|
| +
|
| +template <typename LabelType>
|
| void MacroAssembler::JumpIfNotBothSequentialAsciiStrings(Register first_object,
|
| Register second_object,
|
| Register scratch1,
|
|
|