| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 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 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1571 __ LoadP(r4, | 1571 __ LoadP(r4, |
| 1572 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset)); | 1572 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset)); |
| 1573 // Calculate number of capture registers (number_of_captures + 1) * 2. | 1573 // Calculate number of capture registers (number_of_captures + 1) * 2. |
| 1574 // SmiToShortArrayOffset accomplishes the multiplication by 2 and | 1574 // SmiToShortArrayOffset accomplishes the multiplication by 2 and |
| 1575 // SmiUntag (which is a nop for 32-bit). | 1575 // SmiUntag (which is a nop for 32-bit). |
| 1576 __ SmiToShortArrayOffset(r4, r4); | 1576 __ SmiToShortArrayOffset(r4, r4); |
| 1577 __ addi(r4, r4, Operand(2)); | 1577 __ addi(r4, r4, Operand(2)); |
| 1578 | 1578 |
| 1579 __ LoadP(r3, MemOperand(sp, kLastMatchInfoOffset)); | 1579 __ LoadP(r3, MemOperand(sp, kLastMatchInfoOffset)); |
| 1580 __ JumpIfSmi(r3, &runtime); | 1580 __ JumpIfSmi(r3, &runtime); |
| 1581 __ CompareObjectType(r3, r5, r5, JS_ARRAY_TYPE); | 1581 __ CompareObjectType(r3, r5, r5, JS_OBJECT_TYPE); |
| 1582 __ bne(&runtime); | 1582 __ bne(&runtime); |
| 1583 // Check that the JSArray is in fast case. | 1583 // Check that the object has fast elements. |
| 1584 __ LoadP(last_match_info_elements, | 1584 __ LoadP(last_match_info_elements, |
| 1585 FieldMemOperand(r3, JSArray::kElementsOffset)); | 1585 FieldMemOperand(r3, JSArray::kElementsOffset)); |
| 1586 __ LoadP(r3, | 1586 __ LoadP(r3, |
| 1587 FieldMemOperand(last_match_info_elements, HeapObject::kMapOffset)); | 1587 FieldMemOperand(last_match_info_elements, HeapObject::kMapOffset)); |
| 1588 __ CompareRoot(r3, Heap::kFixedArrayMapRootIndex); | 1588 __ CompareRoot(r3, Heap::kFixedArrayMapRootIndex); |
| 1589 __ bne(&runtime); | 1589 __ bne(&runtime); |
| 1590 // Check that the last match info has space for the capture registers and the | 1590 // Check that the last match info has space for the capture registers and the |
| 1591 // additional information. | 1591 // additional information. |
| 1592 __ LoadP( | 1592 __ LoadP( |
| 1593 r3, FieldMemOperand(last_match_info_elements, FixedArray::kLengthOffset)); | 1593 r3, FieldMemOperand(last_match_info_elements, FixedArray::kLengthOffset)); |
| (...skipping 3878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5472 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); | 5472 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); |
| 5473 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5473 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
| 5474 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5474 kStackUnwindSpace, NULL, return_value_operand, NULL); |
| 5475 } | 5475 } |
| 5476 | 5476 |
| 5477 #undef __ | 5477 #undef __ |
| 5478 } // namespace internal | 5478 } // namespace internal |
| 5479 } // namespace v8 | 5479 } // namespace v8 |
| 5480 | 5480 |
| 5481 #endif // V8_TARGET_ARCH_PPC | 5481 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |