OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1735 __ LoadRoot(a1, Heap::kempty_stringRootIndex); | 1735 __ LoadRoot(a1, Heap::kempty_stringRootIndex); |
1736 __ Branch(&runtime, ne, a0, Operand(a1)); | 1736 __ Branch(&runtime, ne, a0, Operand(a1)); |
1737 __ ld(subject, FieldMemOperand(subject, ConsString::kFirstOffset)); | 1737 __ ld(subject, FieldMemOperand(subject, ConsString::kFirstOffset)); |
1738 | 1738 |
1739 // (4) Is subject external? If yes, go to (7). | 1739 // (4) Is subject external? If yes, go to (7). |
1740 __ bind(&check_underlying); | 1740 __ bind(&check_underlying); |
1741 __ ld(a0, FieldMemOperand(subject, HeapObject::kMapOffset)); | 1741 __ ld(a0, FieldMemOperand(subject, HeapObject::kMapOffset)); |
1742 __ lbu(a0, FieldMemOperand(a0, Map::kInstanceTypeOffset)); | 1742 __ lbu(a0, FieldMemOperand(a0, Map::kInstanceTypeOffset)); |
1743 STATIC_ASSERT(kSeqStringTag == 0); | 1743 STATIC_ASSERT(kSeqStringTag == 0); |
1744 __ And(at, a0, Operand(kStringRepresentationMask)); | 1744 __ And(at, a0, Operand(kStringRepresentationMask)); |
1745 // The underlying external string is never a short external string. | |
1746 STATIC_ASSERT(ExternalString::kMaxShortLength < ConsString::kMinLength); | |
1747 STATIC_ASSERT(ExternalString::kMaxShortLength < SlicedString::kMinLength); | |
1748 __ Branch(&external_string, ne, at, Operand(zero_reg)); // Go to (7). | 1745 __ Branch(&external_string, ne, at, Operand(zero_reg)); // Go to (7). |
1749 | 1746 |
1750 // (5) Sequential string. Load regexp code according to encoding. | 1747 // (5) Sequential string. Load regexp code according to encoding. |
1751 __ bind(&seq_string); | 1748 __ bind(&seq_string); |
1752 // subject: sequential subject string (or look-alike, external string) | 1749 // subject: sequential subject string (or look-alike, external string) |
1753 // a3: original subject string | 1750 // a3: original subject string |
1754 // Load previous index and check range before a3 is overwritten. We have to | 1751 // Load previous index and check range before a3 is overwritten. We have to |
1755 // use a3 instead of subject here because subject might have been only made | 1752 // use a3 instead of subject here because subject might have been only made |
1756 // to look like a sequential string when it actually is an external string. | 1753 // to look like a sequential string when it actually is an external string. |
1757 __ ld(a1, MemOperand(sp, kPreviousIndexOffset)); | 1754 __ ld(a1, MemOperand(sp, kPreviousIndexOffset)); |
(...skipping 4020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5778 kStackUnwindSpace, kInvalidStackOffset, | 5775 kStackUnwindSpace, kInvalidStackOffset, |
5779 return_value_operand, NULL); | 5776 return_value_operand, NULL); |
5780 } | 5777 } |
5781 | 5778 |
5782 #undef __ | 5779 #undef __ |
5783 | 5780 |
5784 } // namespace internal | 5781 } // namespace internal |
5785 } // namespace v8 | 5782 } // namespace v8 |
5786 | 5783 |
5787 #endif // V8_TARGET_ARCH_MIPS64 | 5784 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |