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 4959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4970 // regexp_data: RegExp data (FixedArray) | 4970 // regexp_data: RegExp data (FixedArray) |
4971 // Check that the number of captures fit in the static offsets vector buffer. | 4971 // Check that the number of captures fit in the static offsets vector buffer. |
4972 __ lw(a2, | 4972 __ lw(a2, |
4973 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset)); | 4973 FieldMemOperand(regexp_data, JSRegExp::kIrregexpCaptureCountOffset)); |
4974 // Calculate number of capture registers (number_of_captures + 1) * 2. This | 4974 // Calculate number of capture registers (number_of_captures + 1) * 2. This |
4975 // uses the asumption that smis are 2 * their untagged value. | 4975 // uses the asumption that smis are 2 * their untagged value. |
4976 STATIC_ASSERT(kSmiTag == 0); | 4976 STATIC_ASSERT(kSmiTag == 0); |
4977 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1); | 4977 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 1); |
4978 __ Addu(a2, a2, Operand(2)); // a2 was a smi. | 4978 __ Addu(a2, a2, Operand(2)); // a2 was a smi. |
4979 // Check that the static offsets vector buffer is large enough. | 4979 // Check that the static offsets vector buffer is large enough. |
4980 __ Branch(&runtime, hi, a2, Operand(OffsetsVector::kStaticOffsetsVectorSize)); | 4980 __ Branch( |
| 4981 &runtime, hi, a2, Operand(Isolate::kJSRegexpStaticOffsetsVectorSize)); |
4981 | 4982 |
4982 // a2: Number of capture registers | 4983 // a2: Number of capture registers |
4983 // regexp_data: RegExp data (FixedArray) | 4984 // regexp_data: RegExp data (FixedArray) |
4984 // Check that the second argument is a string. | 4985 // Check that the second argument is a string. |
4985 __ lw(subject, MemOperand(sp, kSubjectOffset)); | 4986 __ lw(subject, MemOperand(sp, kSubjectOffset)); |
4986 __ JumpIfSmi(subject, &runtime); | 4987 __ JumpIfSmi(subject, &runtime); |
4987 __ GetObjectType(subject, a0, a0); | 4988 __ GetObjectType(subject, a0, a0); |
4988 __ And(a0, a0, Operand(kIsNotStringMask)); | 4989 __ And(a0, a0, Operand(kIsNotStringMask)); |
4989 STATIC_ASSERT(kStringTag == 0); | 4990 STATIC_ASSERT(kStringTag == 0); |
4990 __ Branch(&runtime, ne, a0, Operand(zero_reg)); | 4991 __ Branch(&runtime, ne, a0, Operand(zero_reg)); |
(...skipping 2833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7824 __ Pop(ra, t1, a1); | 7825 __ Pop(ra, t1, a1); |
7825 __ Ret(); | 7826 __ Ret(); |
7826 } | 7827 } |
7827 | 7828 |
7828 | 7829 |
7829 #undef __ | 7830 #undef __ |
7830 | 7831 |
7831 } } // namespace v8::internal | 7832 } } // namespace v8::internal |
7832 | 7833 |
7833 #endif // V8_TARGET_ARCH_MIPS | 7834 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |