| 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 8545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8556 __ SmiCompare(rbx, Smi::FromInt(JSRegExp::IRREGEXP)); | 8556 __ SmiCompare(rbx, Smi::FromInt(JSRegExp::IRREGEXP)); |
| 8557 __ j(not_equal, &runtime); | 8557 __ j(not_equal, &runtime); |
| 8558 | 8558 |
| 8559 // rcx: RegExp data (FixedArray) | 8559 // rcx: RegExp data (FixedArray) |
| 8560 // Check that the number of captures fit in the static offsets vector buffer. | 8560 // Check that the number of captures fit in the static offsets vector buffer. |
| 8561 __ movq(rdx, FieldOperand(rcx, JSRegExp::kIrregexpCaptureCountOffset)); | 8561 __ movq(rdx, FieldOperand(rcx, JSRegExp::kIrregexpCaptureCountOffset)); |
| 8562 // Calculate number of capture registers (number_of_captures + 1) * 2. | 8562 // Calculate number of capture registers (number_of_captures + 1) * 2. |
| 8563 __ PositiveSmiTimesPowerOfTwoToInteger64(rdx, rdx, 1); | 8563 __ PositiveSmiTimesPowerOfTwoToInteger64(rdx, rdx, 1); |
| 8564 __ addq(rdx, Immediate(2)); // rdx was number_of_captures * 2. | 8564 __ addq(rdx, Immediate(2)); // rdx was number_of_captures * 2. |
| 8565 // Check that the static offsets vector buffer is large enough. | 8565 // Check that the static offsets vector buffer is large enough. |
| 8566 __ cmpq(rdx, Immediate(OffsetsVector::kStaticOffsetsVectorSize)); | 8566 __ cmpq(rdx, Immediate(Isolate::kJSRegexpStaticOffsetsVectorSize)); |
| 8567 __ j(above, &runtime); | 8567 __ j(above, &runtime); |
| 8568 | 8568 |
| 8569 // rcx: RegExp data (FixedArray) | 8569 // rcx: RegExp data (FixedArray) |
| 8570 // rdx: Number of capture registers | 8570 // rdx: Number of capture registers |
| 8571 // Check that the second argument is a string. | 8571 // Check that the second argument is a string. |
| 8572 __ movq(rax, Operand(rsp, kSubjectOffset)); | 8572 __ movq(rax, Operand(rsp, kSubjectOffset)); |
| 8573 __ JumpIfSmi(rax, &runtime); | 8573 __ JumpIfSmi(rax, &runtime); |
| 8574 Condition is_string = masm->IsObjectStringType(rax, rbx, rbx); | 8574 Condition is_string = masm->IsObjectStringType(rax, rbx, rbx); |
| 8575 __ j(NegateCondition(is_string), &runtime); | 8575 __ j(NegateCondition(is_string), &runtime); |
| 8576 // Get the length of the string to rbx. | 8576 // Get the length of the string to rbx. |
| (...skipping 3377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11954 } | 11954 } |
| 11955 | 11955 |
| 11956 #endif | 11956 #endif |
| 11957 | 11957 |
| 11958 | 11958 |
| 11959 #undef __ | 11959 #undef __ |
| 11960 | 11960 |
| 11961 } } // namespace v8::internal | 11961 } } // namespace v8::internal |
| 11962 | 11962 |
| 11963 #endif // V8_TARGET_ARCH_X64 | 11963 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |