| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 4800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4811 // regexp_data: RegExp data (FixedArray) | 4811 // regexp_data: RegExp data (FixedArray) |
| 4812 // Check that the number of captures fit in the static offsets vector buffer. | 4812 // Check that the number of captures fit in the static offsets vector buffer. |
| 4813 __ ldr(r2, | 4813 __ ldr(r2, |
| 4814 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset)); | 4814 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset)); |
| 4815 // Calculate number of capture registers (number_of_captures + 1) * 2. This | 4815 // Calculate number of capture registers (number_of_captures + 1) * 2. This |
| 4816 // uses the asumption that smis are 2 * their untagged value. | 4816 // uses the asumption that smis are 2 * their untagged value. |
| 4817 STATIC_ASSERT(kSmiTag == 0); | 4817 STATIC_ASSERT(kSmiTag == 0); |
| 4818 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1); | 4818 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1); |
| 4819 __ add(r2, r2, Operand(2)); // r2 was a smi. | 4819 __ add(r2, r2, Operand(2)); // r2 was a smi. |
| 4820 // Check that the static offsets vector buffer is large enough. | 4820 // Check that the static offsets vector buffer is large enough. |
| 4821 __ cmp(r2, Operand(Isolate::kJSRegexpStaticOffsetsVectorSize)); | 4821 __ cmp(r2, Operand(OffsetsVector::kStaticOffsetsVectorSize)); |
| 4822 __ b(hi, &runtime); | 4822 __ b(hi, &runtime); |
| 4823 | 4823 |
| 4824 // r2: Number of capture registers | 4824 // r2: Number of capture registers |
| 4825 // regexp_data: RegExp data (FixedArray) | 4825 // regexp_data: RegExp data (FixedArray) |
| 4826 // Check that the second argument is a string. | 4826 // Check that the second argument is a string. |
| 4827 __ ldr(subject, MemOperand(sp, kSubjectOffset)); | 4827 __ ldr(subject, MemOperand(sp, kSubjectOffset)); |
| 4828 __ JumpIfSmi(subject, &runtime); | 4828 __ JumpIfSmi(subject, &runtime); |
| 4829 Condition is_string = masm->IsObjectStringType(subject, r0); | 4829 Condition is_string = masm->IsObjectStringType(subject, r0); |
| 4830 __ b(NegateCondition(is_string), &runtime); | 4830 __ b(NegateCondition(is_string), &runtime); |
| 4831 // Get the length of the string to r3. | 4831 // Get the length of the string to r3. |
| (...skipping 2781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7613 | 7613 |
| 7614 __ Pop(lr, r5, r1); | 7614 __ Pop(lr, r5, r1); |
| 7615 __ Ret(); | 7615 __ Ret(); |
| 7616 } | 7616 } |
| 7617 | 7617 |
| 7618 #undef __ | 7618 #undef __ |
| 7619 | 7619 |
| 7620 } } // namespace v8::internal | 7620 } } // namespace v8::internal |
| 7621 | 7621 |
| 7622 #endif // V8_TARGET_ARCH_ARM | 7622 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |