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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 } | 617 } |
618 Handle<ByteArray> byte_codes(IrregexpByteCode(*irregexp, is_ascii), isolate); | 618 Handle<ByteArray> byte_codes(IrregexpByteCode(*irregexp, is_ascii), isolate); |
619 | 619 |
620 IrregexpResult result = IrregexpInterpreter::Match(isolate, | 620 IrregexpResult result = IrregexpInterpreter::Match(isolate, |
621 byte_codes, | 621 byte_codes, |
622 subject, | 622 subject, |
623 raw_output, | 623 raw_output, |
624 index); | 624 index); |
625 if (result == RE_SUCCESS) { | 625 if (result == RE_SUCCESS) { |
626 // Copy capture results to the start of the registers array. | 626 // Copy capture results to the start of the registers array. |
627 memcpy(output, raw_output, number_of_capture_registers * sizeof(int32_t)); | 627 OS::MemCopy( |
| 628 output, raw_output, number_of_capture_registers * sizeof(int32_t)); |
628 } | 629 } |
629 if (result == RE_EXCEPTION) { | 630 if (result == RE_EXCEPTION) { |
630 ASSERT(!isolate->has_pending_exception()); | 631 ASSERT(!isolate->has_pending_exception()); |
631 isolate->StackOverflow(); | 632 isolate->StackOverflow(); |
632 } | 633 } |
633 return result; | 634 return result; |
634 #endif // V8_INTERPRETED_REGEXP | 635 #endif // V8_INTERPRETED_REGEXP |
635 } | 636 } |
636 | 637 |
637 | 638 |
(...skipping 5483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6121 } | 6122 } |
6122 | 6123 |
6123 return compiler.Assemble(¯o_assembler, | 6124 return compiler.Assemble(¯o_assembler, |
6124 node, | 6125 node, |
6125 data->capture_count, | 6126 data->capture_count, |
6126 pattern); | 6127 pattern); |
6127 } | 6128 } |
6128 | 6129 |
6129 | 6130 |
6130 }} // namespace v8::internal | 6131 }} // namespace v8::internal |
OLD | NEW |