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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1621 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset)); | 1621 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset)); |
1622 // Calculate number of capture registers (number_of_captures + 1) * 2. | 1622 // Calculate number of capture registers (number_of_captures + 1) * 2. |
1623 // Multiplying by 2 comes for free since r1 is smi-tagged. | 1623 // Multiplying by 2 comes for free since r1 is smi-tagged. |
1624 STATIC_ASSERT(kSmiTag == 0); | 1624 STATIC_ASSERT(kSmiTag == 0); |
1625 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1); | 1625 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1); |
1626 __ Addu(a1, a1, Operand(2)); // a1 was a smi. | 1626 __ Addu(a1, a1, Operand(2)); // a1 was a smi. |
1627 | 1627 |
1628 __ lw(a0, MemOperand(sp, kLastMatchInfoOffset)); | 1628 __ lw(a0, MemOperand(sp, kLastMatchInfoOffset)); |
1629 __ JumpIfSmi(a0, &runtime); | 1629 __ JumpIfSmi(a0, &runtime); |
1630 __ GetObjectType(a0, a2, a2); | 1630 __ GetObjectType(a0, a2, a2); |
1631 __ Branch(&runtime, ne, a2, Operand(JS_ARRAY_TYPE)); | 1631 __ Branch(&runtime, ne, a2, Operand(JS_OBJECT_TYPE)); |
1632 // Check that the JSArray is in fast case. | 1632 // Check that the object has fast elements. |
1633 __ lw(last_match_info_elements, | 1633 __ lw(last_match_info_elements, |
1634 FieldMemOperand(a0, JSArray::kElementsOffset)); | 1634 FieldMemOperand(a0, JSArray::kElementsOffset)); |
1635 __ lw(a0, FieldMemOperand(last_match_info_elements, HeapObject::kMapOffset)); | 1635 __ lw(a0, FieldMemOperand(last_match_info_elements, HeapObject::kMapOffset)); |
1636 __ LoadRoot(at, Heap::kFixedArrayMapRootIndex); | 1636 __ LoadRoot(at, Heap::kFixedArrayMapRootIndex); |
1637 __ Branch(&runtime, ne, a0, Operand(at)); | 1637 __ Branch(&runtime, ne, a0, Operand(at)); |
1638 // Check that the last match info has space for the capture registers and the | 1638 // Check that the last match info has space for the capture registers and the |
1639 // additional information. | 1639 // additional information. |
1640 __ lw(a0, | 1640 __ lw(a0, |
1641 FieldMemOperand(last_match_info_elements, FixedArray::kLengthOffset)); | 1641 FieldMemOperand(last_match_info_elements, FixedArray::kLengthOffset)); |
1642 __ Addu(a2, a1, Operand(RegExpImpl::kLastMatchOverhead)); | 1642 __ Addu(a2, a1, Operand(RegExpImpl::kLastMatchOverhead)); |
(...skipping 3761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5404 kStackUnwindSpace, kInvalidStackOffset, | 5404 kStackUnwindSpace, kInvalidStackOffset, |
5405 return_value_operand, NULL); | 5405 return_value_operand, NULL); |
5406 } | 5406 } |
5407 | 5407 |
5408 #undef __ | 5408 #undef __ |
5409 | 5409 |
5410 } // namespace internal | 5410 } // namespace internal |
5411 } // namespace v8 | 5411 } // namespace v8 |
5412 | 5412 |
5413 #endif // V8_TARGET_ARCH_MIPS | 5413 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |