| 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 2773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2784 __ cmpl(rbx, Immediate(JSRegExp::IRREGEXP)); | 2784 __ cmpl(rbx, Immediate(JSRegExp::IRREGEXP)); |
| 2785 __ j(not_equal, &runtime); | 2785 __ j(not_equal, &runtime); |
| 2786 | 2786 |
| 2787 // rax: RegExp data (FixedArray) | 2787 // rax: RegExp data (FixedArray) |
| 2788 // Check that the number of captures fit in the static offsets vector buffer. | 2788 // Check that the number of captures fit in the static offsets vector buffer. |
| 2789 __ SmiToInteger32(rdx, | 2789 __ SmiToInteger32(rdx, |
| 2790 FieldOperand(rax, JSRegExp::kIrregexpCaptureCountOffset)); | 2790 FieldOperand(rax, JSRegExp::kIrregexpCaptureCountOffset)); |
| 2791 // Calculate number of capture registers (number_of_captures + 1) * 2. | 2791 // Calculate number of capture registers (number_of_captures + 1) * 2. |
| 2792 __ leal(rdx, Operand(rdx, rdx, times_1, 2)); | 2792 __ leal(rdx, Operand(rdx, rdx, times_1, 2)); |
| 2793 // Check that the static offsets vector buffer is large enough. | 2793 // Check that the static offsets vector buffer is large enough. |
| 2794 __ cmpl(rdx, Immediate(Isolate::kJSRegexpStaticOffsetsVectorSize)); | 2794 __ cmpl(rdx, Immediate(OffsetsVector::kStaticOffsetsVectorSize)); |
| 2795 __ j(above, &runtime); | 2795 __ j(above, &runtime); |
| 2796 | 2796 |
| 2797 // rax: RegExp data (FixedArray) | 2797 // rax: RegExp data (FixedArray) |
| 2798 // rdx: Number of capture registers | 2798 // rdx: Number of capture registers |
| 2799 // Check that the second argument is a string. | 2799 // Check that the second argument is a string. |
| 2800 __ movq(rdi, Operand(rsp, kSubjectOffset)); | 2800 __ movq(rdi, Operand(rsp, kSubjectOffset)); |
| 2801 __ JumpIfSmi(rdi, &runtime); | 2801 __ JumpIfSmi(rdi, &runtime); |
| 2802 Condition is_string = masm->IsObjectStringType(rdi, rbx, rbx); | 2802 Condition is_string = masm->IsObjectStringType(rdi, rbx, rbx); |
| 2803 __ j(NegateCondition(is_string), &runtime); | 2803 __ j(NegateCondition(is_string), &runtime); |
| 2804 | 2804 |
| (...skipping 3677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6482 #endif | 6482 #endif |
| 6483 | 6483 |
| 6484 __ Ret(); | 6484 __ Ret(); |
| 6485 } | 6485 } |
| 6486 | 6486 |
| 6487 #undef __ | 6487 #undef __ |
| 6488 | 6488 |
| 6489 } } // namespace v8::internal | 6489 } } // namespace v8::internal |
| 6490 | 6490 |
| 6491 #endif // V8_TARGET_ARCH_X64 | 6491 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |