Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: src/jsregexp.cc

Issue 13932006: Replace OS::MemCopy with OS::MemMove (just as fast but more flexible). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/isolate.cc ('k') | src/list-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
6121 } 6122 }
6122 6123
6123 return compiler.Assemble(&macro_assembler, 6124 return compiler.Assemble(&macro_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
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/list-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698