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

Side by Side Diff: src/regexp-macro-assembler-irregexp.cc

Issue 302563004: Move OS::MemCopy and OS::MemMove out of platform to utils (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/prettyprinter.cc ('k') | src/regexp-stack.cc » ('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 2008-2009 the V8 project authors. All rights reserved. 1 // Copyright 2008-2009 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 #include "ast.h" 6 #include "ast.h"
7 #include "bytecodes-irregexp.h" 7 #include "bytecodes-irregexp.h"
8 #include "regexp-macro-assembler.h" 8 #include "regexp-macro-assembler.h"
9 #include "regexp-macro-assembler-irregexp.h" 9 #include "regexp-macro-assembler-irregexp.h"
10 #include "regexp-macro-assembler-irregexp-inl.h" 10 #include "regexp-macro-assembler-irregexp-inl.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 return array; 427 return array;
428 } 428 }
429 429
430 430
431 int RegExpMacroAssemblerIrregexp::length() { 431 int RegExpMacroAssemblerIrregexp::length() {
432 return pc_; 432 return pc_;
433 } 433 }
434 434
435 435
436 void RegExpMacroAssemblerIrregexp::Copy(Address a) { 436 void RegExpMacroAssemblerIrregexp::Copy(Address a) {
437 OS::MemCopy(a, buffer_.start(), length()); 437 MemCopy(a, buffer_.start(), length());
438 } 438 }
439 439
440 440
441 void RegExpMacroAssemblerIrregexp::Expand() { 441 void RegExpMacroAssemblerIrregexp::Expand() {
442 bool old_buffer_was_our_own = own_buffer_; 442 bool old_buffer_was_our_own = own_buffer_;
443 Vector<byte> old_buffer = buffer_; 443 Vector<byte> old_buffer = buffer_;
444 buffer_ = Vector<byte>::New(old_buffer.length() * 2); 444 buffer_ = Vector<byte>::New(old_buffer.length() * 2);
445 own_buffer_ = true; 445 own_buffer_ = true;
446 OS::MemCopy(buffer_.start(), old_buffer.start(), old_buffer.length()); 446 MemCopy(buffer_.start(), old_buffer.start(), old_buffer.length());
447 if (old_buffer_was_our_own) { 447 if (old_buffer_was_our_own) {
448 old_buffer.Dispose(); 448 old_buffer.Dispose();
449 } 449 }
450 } 450 }
451 451
452 #endif // V8_INTERPRETED_REGEXP 452 #endif // V8_INTERPRETED_REGEXP
453 453
454 } } // namespace v8::internal 454 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/prettyprinter.cc ('k') | src/regexp-stack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698