OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 4403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4414 STATIC_ASSERT(4 == kAsciiStringTag); | 4414 STATIC_ASSERT(4 == kAsciiStringTag); |
4415 STATIC_ASSERT(kTwoByteStringTag == 0); | 4415 STATIC_ASSERT(kTwoByteStringTag == 0); |
4416 // Find the code object based on the assumptions above. | 4416 // Find the code object based on the assumptions above. |
4417 __ and_(r0, r0, Operand(kStringEncodingMask)); | 4417 __ and_(r0, r0, Operand(kStringEncodingMask)); |
4418 __ mov(r3, Operand(r0, ASR, 2), SetCC); | 4418 __ mov(r3, Operand(r0, ASR, 2), SetCC); |
4419 __ ldr(r7, FieldMemOperand(regexp_data, JSRegExp::kDataAsciiCodeOffset), ne); | 4419 __ ldr(r7, FieldMemOperand(regexp_data, JSRegExp::kDataAsciiCodeOffset), ne); |
4420 __ ldr(r7, FieldMemOperand(regexp_data, JSRegExp::kDataUC16CodeOffset), eq); | 4420 __ ldr(r7, FieldMemOperand(regexp_data, JSRegExp::kDataUC16CodeOffset), eq); |
4421 | 4421 |
4422 // Check that the irregexp code has been generated for the actual string | 4422 // Check that the irregexp code has been generated for the actual string |
4423 // encoding. If it has, the field contains a code object otherwise it contains | 4423 // encoding. If it has, the field contains a code object otherwise it contains |
4424 // the hole. | 4424 // a smi (code flushing support). |
4425 __ CompareObjectType(r7, r0, r0, CODE_TYPE); | 4425 __ JumpIfSmi(r7, &runtime); |
4426 __ b(ne, &runtime); | |
4427 | 4426 |
4428 // r3: encoding of subject string (1 if ASCII, 0 if two_byte); | 4427 // r3: encoding of subject string (1 if ASCII, 0 if two_byte); |
4429 // r7: code | 4428 // r7: code |
4430 // subject: Subject string | 4429 // subject: Subject string |
4431 // regexp_data: RegExp data (FixedArray) | 4430 // regexp_data: RegExp data (FixedArray) |
4432 // Load used arguments before starting to push arguments for call to native | 4431 // Load used arguments before starting to push arguments for call to native |
4433 // RegExp code to avoid handling changing stack height. | 4432 // RegExp code to avoid handling changing stack height. |
4434 __ ldr(r1, MemOperand(sp, kPreviousIndexOffset)); | 4433 __ ldr(r1, MemOperand(sp, kPreviousIndexOffset)); |
4435 __ mov(r1, Operand(r1, ASR, kSmiTagSize)); | 4434 __ mov(r1, Operand(r1, ASR, kSmiTagSize)); |
4436 | 4435 |
(...skipping 2165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6602 __ mov(result, Operand(0)); | 6601 __ mov(result, Operand(0)); |
6603 __ Ret(); | 6602 __ Ret(); |
6604 } | 6603 } |
6605 | 6604 |
6606 | 6605 |
6607 #undef __ | 6606 #undef __ |
6608 | 6607 |
6609 } } // namespace v8::internal | 6608 } } // namespace v8::internal |
6610 | 6609 |
6611 #endif // V8_TARGET_ARCH_ARM | 6610 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |