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

Side by Side Diff: src/hydrogen-check-elimination.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, 6 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/heap-snapshot-generator.cc ('k') | src/hydrogen-gvn.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 "hydrogen-check-elimination.h" 5 #include "hydrogen-check-elimination.h"
6 6
7 #include "hydrogen-alias-analysis.h" 7 #include "hydrogen-alias-analysis.h"
8 #include "hydrogen-flow-engine.h" 8 #include "hydrogen-flow-engine.h"
9 9
10 #define GLOBAL 1 10 #define GLOBAL 1
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 615
616 // Preserve the age of the entries by moving the older entries to the end. 616 // Preserve the age of the entries by moving the older entries to the end.
617 if (cursor_ == size_) return; // Cursor already points at end. 617 if (cursor_ == size_) return; // Cursor already points at end.
618 if (cursor_ != 0) { 618 if (cursor_ != 0) {
619 // | L = oldest | R = newest | | 619 // | L = oldest | R = newest | |
620 // ^ cursor ^ size ^ MAX 620 // ^ cursor ^ size ^ MAX
621 HCheckTableEntry tmp_entries[kMaxTrackedObjects]; 621 HCheckTableEntry tmp_entries[kMaxTrackedObjects];
622 int L = cursor_; 622 int L = cursor_;
623 int R = size_ - cursor_; 623 int R = size_ - cursor_;
624 624
625 OS::MemMove(&tmp_entries[0], &entries_[0], L * sizeof(HCheckTableEntry)); 625 MemMove(&tmp_entries[0], &entries_[0], L * sizeof(HCheckTableEntry));
626 OS::MemMove(&entries_[0], &entries_[L], R * sizeof(HCheckTableEntry)); 626 MemMove(&entries_[0], &entries_[L], R * sizeof(HCheckTableEntry));
627 OS::MemMove(&entries_[R], &tmp_entries[0], L * sizeof(HCheckTableEntry)); 627 MemMove(&entries_[R], &tmp_entries[0], L * sizeof(HCheckTableEntry));
628 } 628 }
629 629
630 cursor_ = size_; // Move cursor to end. 630 cursor_ = size_; // Move cursor to end.
631 } 631 }
632 632
633 static void Print(HCheckTable* table) { 633 static void Print(HCheckTable* table) {
634 if (table == NULL) { 634 if (table == NULL) {
635 PrintF(" unreachable\n"); 635 PrintF(" unreachable\n");
636 return; 636 return;
637 } 637 }
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 PRINT_STAT(removed_cho); 796 PRINT_STAT(removed_cho);
797 PRINT_STAT(narrowed); 797 PRINT_STAT(narrowed);
798 PRINT_STAT(loads); 798 PRINT_STAT(loads);
799 PRINT_STAT(empty); 799 PRINT_STAT(empty);
800 PRINT_STAT(compares_true); 800 PRINT_STAT(compares_true);
801 PRINT_STAT(compares_false); 801 PRINT_STAT(compares_false);
802 PRINT_STAT(transitions); 802 PRINT_STAT(transitions);
803 } 803 }
804 804
805 } } // namespace v8::internal 805 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/hydrogen-gvn.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698