| 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 11256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11267 | 11267 |
| 11268 // ecx: RegExp data (FixedArray) | 11268 // ecx: RegExp data (FixedArray) |
| 11269 // Check that the number of captures fit in the static offsets vector buffer. | 11269 // Check that the number of captures fit in the static offsets vector buffer. |
| 11270 __ mov(edx, FieldOperand(ecx, JSRegExp::kIrregexpCaptureCountOffset)); | 11270 __ mov(edx, FieldOperand(ecx, JSRegExp::kIrregexpCaptureCountOffset)); |
| 11271 // Calculate number of capture registers (number_of_captures + 1) * 2. This | 11271 // Calculate number of capture registers (number_of_captures + 1) * 2. This |
| 11272 // uses the asumption that smis are 2 * their untagged value. | 11272 // uses the asumption that smis are 2 * their untagged value. |
| 11273 ASSERT_EQ(0, kSmiTag); | 11273 ASSERT_EQ(0, kSmiTag); |
| 11274 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); | 11274 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); |
| 11275 __ add(Operand(edx), Immediate(2)); // edx was a smi. | 11275 __ add(Operand(edx), Immediate(2)); // edx was a smi. |
| 11276 // Check that the static offsets vector buffer is large enough. | 11276 // Check that the static offsets vector buffer is large enough. |
| 11277 __ cmp(edx, OffsetsVector::kStaticOffsetsVectorSize); | 11277 __ cmp(edx, Isolate::kJSRegexpStaticOffsetsVectorSize); |
| 11278 __ j(above, &runtime); | 11278 __ j(above, &runtime); |
| 11279 | 11279 |
| 11280 // ecx: RegExp data (FixedArray) | 11280 // ecx: RegExp data (FixedArray) |
| 11281 // edx: Number of capture registers | 11281 // edx: Number of capture registers |
| 11282 // Check that the second argument is a string. | 11282 // Check that the second argument is a string. |
| 11283 __ mov(eax, Operand(esp, kSubjectOffset)); | 11283 __ mov(eax, Operand(esp, kSubjectOffset)); |
| 11284 __ test(eax, Immediate(kSmiTagMask)); | 11284 __ test(eax, Immediate(kSmiTagMask)); |
| 11285 __ j(zero, &runtime); | 11285 __ j(zero, &runtime); |
| 11286 Condition is_string = masm->IsObjectStringType(eax, ebx, ebx); | 11286 Condition is_string = masm->IsObjectStringType(eax, ebx, ebx); |
| 11287 __ j(NegateCondition(is_string), &runtime); | 11287 __ j(NegateCondition(is_string), &runtime); |
| (...skipping 2434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13722 masm.GetCode(&desc); | 13722 masm.GetCode(&desc); |
| 13723 // Call the function from C++. | 13723 // Call the function from C++. |
| 13724 return FUNCTION_CAST<MemCopyFunction>(buffer); | 13724 return FUNCTION_CAST<MemCopyFunction>(buffer); |
| 13725 } | 13725 } |
| 13726 | 13726 |
| 13727 #undef __ | 13727 #undef __ |
| 13728 | 13728 |
| 13729 } } // namespace v8::internal | 13729 } } // namespace v8::internal |
| 13730 | 13730 |
| 13731 #endif // V8_TARGET_ARCH_IA32 | 13731 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |