OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "ast.h" | 7 #include "ast.h" |
8 #include "compiler.h" | 8 #include "compiler.h" |
9 #include "execution.h" | 9 #include "execution.h" |
10 #include "factory.h" | 10 #include "factory.h" |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 } | 597 } |
598 Handle<ByteArray> byte_codes(IrregexpByteCode(*irregexp, is_ascii), isolate); | 598 Handle<ByteArray> byte_codes(IrregexpByteCode(*irregexp, is_ascii), isolate); |
599 | 599 |
600 IrregexpResult result = IrregexpInterpreter::Match(isolate, | 600 IrregexpResult result = IrregexpInterpreter::Match(isolate, |
601 byte_codes, | 601 byte_codes, |
602 subject, | 602 subject, |
603 raw_output, | 603 raw_output, |
604 index); | 604 index); |
605 if (result == RE_SUCCESS) { | 605 if (result == RE_SUCCESS) { |
606 // Copy capture results to the start of the registers array. | 606 // Copy capture results to the start of the registers array. |
607 OS::MemCopy( | 607 MemCopy(output, raw_output, number_of_capture_registers * sizeof(int32_t)); |
608 output, raw_output, number_of_capture_registers * sizeof(int32_t)); | |
609 } | 608 } |
610 if (result == RE_EXCEPTION) { | 609 if (result == RE_EXCEPTION) { |
611 ASSERT(!isolate->has_pending_exception()); | 610 ASSERT(!isolate->has_pending_exception()); |
612 isolate->StackOverflow(); | 611 isolate->StackOverflow(); |
613 } | 612 } |
614 return result; | 613 return result; |
615 #endif // V8_INTERPRETED_REGEXP | 614 #endif // V8_INTERPRETED_REGEXP |
616 } | 615 } |
617 | 616 |
618 | 617 |
(...skipping 5488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6107 } | 6106 } |
6108 | 6107 |
6109 return compiler.Assemble(¯o_assembler, | 6108 return compiler.Assemble(¯o_assembler, |
6110 node, | 6109 node, |
6111 data->capture_count, | 6110 data->capture_count, |
6112 pattern); | 6111 pattern); |
6113 } | 6112 } |
6114 | 6113 |
6115 | 6114 |
6116 }} // namespace v8::internal | 6115 }} // namespace v8::internal |
OLD | NEW |