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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1492 __ ldr(r1, | 1492 __ ldr(r1, |
1493 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset)); | 1493 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset)); |
1494 // Calculate number of capture registers (number_of_captures + 1) * 2. | 1494 // Calculate number of capture registers (number_of_captures + 1) * 2. |
1495 // Multiplying by 2 comes for free since r1 is smi-tagged. | 1495 // Multiplying by 2 comes for free since r1 is smi-tagged. |
1496 STATIC_ASSERT(kSmiTag == 0); | 1496 STATIC_ASSERT(kSmiTag == 0); |
1497 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1); | 1497 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1); |
1498 __ add(r1, r1, Operand(2)); // r1 was a smi. | 1498 __ add(r1, r1, Operand(2)); // r1 was a smi. |
1499 | 1499 |
1500 __ ldr(r0, MemOperand(sp, kLastMatchInfoOffset)); | 1500 __ ldr(r0, MemOperand(sp, kLastMatchInfoOffset)); |
1501 __ JumpIfSmi(r0, &runtime); | 1501 __ JumpIfSmi(r0, &runtime); |
1502 __ CompareObjectType(r0, r2, r2, JS_ARRAY_TYPE); | 1502 __ CompareObjectType(r0, r2, r2, JS_OBJECT_TYPE); |
1503 __ b(ne, &runtime); | 1503 __ b(ne, &runtime); |
1504 // Check that the JSArray is in fast case. | 1504 // Check that the object has fast elements. |
1505 __ ldr(last_match_info_elements, | 1505 __ ldr(last_match_info_elements, |
1506 FieldMemOperand(r0, JSArray::kElementsOffset)); | 1506 FieldMemOperand(r0, JSArray::kElementsOffset)); |
1507 __ ldr(r0, FieldMemOperand(last_match_info_elements, HeapObject::kMapOffset)); | 1507 __ ldr(r0, FieldMemOperand(last_match_info_elements, HeapObject::kMapOffset)); |
1508 __ CompareRoot(r0, Heap::kFixedArrayMapRootIndex); | 1508 __ CompareRoot(r0, Heap::kFixedArrayMapRootIndex); |
1509 __ b(ne, &runtime); | 1509 __ b(ne, &runtime); |
1510 // Check that the last match info has space for the capture registers and the | 1510 // Check that the last match info has space for the capture registers and the |
1511 // additional information. | 1511 // additional information. |
1512 __ ldr(r0, | 1512 __ ldr(r0, |
1513 FieldMemOperand(last_match_info_elements, FixedArray::kLengthOffset)); | 1513 FieldMemOperand(last_match_info_elements, FixedArray::kLengthOffset)); |
1514 __ add(r2, r1, Operand(RegExpImpl::kLastMatchOverhead)); | 1514 __ add(r2, r1, Operand(RegExpImpl::kLastMatchOverhead)); |
(...skipping 3699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5214 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5214 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
5215 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5215 kStackUnwindSpace, NULL, return_value_operand, NULL); |
5216 } | 5216 } |
5217 | 5217 |
5218 #undef __ | 5218 #undef __ |
5219 | 5219 |
5220 } // namespace internal | 5220 } // namespace internal |
5221 } // namespace v8 | 5221 } // namespace v8 |
5222 | 5222 |
5223 #endif // V8_TARGET_ARCH_ARM | 5223 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |