OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 8483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8494 __ ldr(r3, FieldMemOperand(subject, String::kLengthOffset)); | 8494 __ ldr(r3, FieldMemOperand(subject, String::kLengthOffset)); |
8495 | 8495 |
8496 // r2: Number of capture registers | 8496 // r2: Number of capture registers |
8497 // r3: Length of subject string as a smi | 8497 // r3: Length of subject string as a smi |
8498 // subject: Subject string | 8498 // subject: Subject string |
8499 // regexp_data: RegExp data (FixedArray) | 8499 // regexp_data: RegExp data (FixedArray) |
8500 // Check that the third argument is a positive smi less than the subject | 8500 // Check that the third argument is a positive smi less than the subject |
8501 // string length. A negative value will be greater (unsigned comparison). | 8501 // string length. A negative value will be greater (unsigned comparison). |
8502 __ ldr(r0, MemOperand(sp, kPreviousIndexOffset)); | 8502 __ ldr(r0, MemOperand(sp, kPreviousIndexOffset)); |
8503 __ tst(r0, Operand(kSmiTagMask)); | 8503 __ tst(r0, Operand(kSmiTagMask)); |
8504 __ b(eq, &runtime); | 8504 __ b(ne, &runtime); |
8505 __ cmp(r3, Operand(r0)); | 8505 __ cmp(r3, Operand(r0)); |
8506 __ b(le, &runtime); | 8506 __ b(ls, &runtime); |
8507 | 8507 |
8508 // r2: Number of capture registers | 8508 // r2: Number of capture registers |
8509 // subject: Subject string | 8509 // subject: Subject string |
8510 // regexp_data: RegExp data (FixedArray) | 8510 // regexp_data: RegExp data (FixedArray) |
8511 // Check that the fourth object is a JSArray object. | 8511 // Check that the fourth object is a JSArray object. |
8512 __ ldr(r0, MemOperand(sp, kLastMatchInfoOffset)); | 8512 __ ldr(r0, MemOperand(sp, kLastMatchInfoOffset)); |
8513 __ tst(r0, Operand(kSmiTagMask)); | 8513 __ tst(r0, Operand(kSmiTagMask)); |
8514 __ b(eq, &runtime); | 8514 __ b(eq, &runtime); |
8515 __ CompareObjectType(r0, r1, r1, JS_ARRAY_TYPE); | 8515 __ CompareObjectType(r0, r1, r1, JS_ARRAY_TYPE); |
8516 __ b(ne, &runtime); | 8516 __ b(ne, &runtime); |
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9880 | 9880 |
9881 // Just jump to runtime to add the two strings. | 9881 // Just jump to runtime to add the two strings. |
9882 __ bind(&string_add_runtime); | 9882 __ bind(&string_add_runtime); |
9883 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); | 9883 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); |
9884 } | 9884 } |
9885 | 9885 |
9886 | 9886 |
9887 #undef __ | 9887 #undef __ |
9888 | 9888 |
9889 } } // namespace v8::internal | 9889 } } // namespace v8::internal |
OLD | NEW |