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

Side by Side Diff: test/cctest/test-heap-profiler.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 | « test/cctest/test-compiler.cc ('k') | test/cctest/test-parsing.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 TestJSONStream() : eos_signaled_(0), abort_countdown_(-1) {} 770 TestJSONStream() : eos_signaled_(0), abort_countdown_(-1) {}
771 explicit TestJSONStream(int abort_countdown) 771 explicit TestJSONStream(int abort_countdown)
772 : eos_signaled_(0), abort_countdown_(abort_countdown) {} 772 : eos_signaled_(0), abort_countdown_(abort_countdown) {}
773 virtual ~TestJSONStream() {} 773 virtual ~TestJSONStream() {}
774 virtual void EndOfStream() { ++eos_signaled_; } 774 virtual void EndOfStream() { ++eos_signaled_; }
775 virtual WriteResult WriteAsciiChunk(char* buffer, int chars_written) { 775 virtual WriteResult WriteAsciiChunk(char* buffer, int chars_written) {
776 if (abort_countdown_ > 0) --abort_countdown_; 776 if (abort_countdown_ > 0) --abort_countdown_;
777 if (abort_countdown_ == 0) return kAbort; 777 if (abort_countdown_ == 0) return kAbort;
778 CHECK_GT(chars_written, 0); 778 CHECK_GT(chars_written, 0);
779 i::Vector<char> chunk = buffer_.AddBlock(chars_written, '\0'); 779 i::Vector<char> chunk = buffer_.AddBlock(chars_written, '\0');
780 i::OS::MemCopy(chunk.start(), buffer, chars_written); 780 i::MemCopy(chunk.start(), buffer, chars_written);
781 return kContinue; 781 return kContinue;
782 } 782 }
783 virtual WriteResult WriteUint32Chunk(uint32_t* buffer, int chars_written) { 783 virtual WriteResult WriteUint32Chunk(uint32_t* buffer, int chars_written) {
784 ASSERT(false); 784 ASSERT(false);
785 return kAbort; 785 return kAbort;
786 } 786 }
787 void WriteTo(i::Vector<char> dest) { buffer_.WriteTo(dest); } 787 void WriteTo(i::Vector<char> dest) { buffer_.WriteTo(dest); }
788 int eos_signaled() { return eos_signaled_; } 788 int eos_signaled() { return eos_signaled_; }
789 int size() { return buffer_.size(); } 789 int size() { return buffer_.size(); }
790 790
(...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after
2677 map.AddRange(ToAddress(0x180), 0x80, 6U); 2677 map.AddRange(ToAddress(0x180), 0x80, 6U);
2678 map.AddRange(ToAddress(0x180), 0x80, 7U); 2678 map.AddRange(ToAddress(0x180), 0x80, 7U);
2679 CHECK_EQ(7, map.GetTraceNodeId(ToAddress(0x180))); 2679 CHECK_EQ(7, map.GetTraceNodeId(ToAddress(0x180)));
2680 CHECK_EQ(5, map.GetTraceNodeId(ToAddress(0x200))); 2680 CHECK_EQ(5, map.GetTraceNodeId(ToAddress(0x200)));
2681 CHECK_EQ(3, static_cast<int>(map.size())); 2681 CHECK_EQ(3, static_cast<int>(map.size()));
2682 2682
2683 map.Clear(); 2683 map.Clear();
2684 CHECK_EQ(0, static_cast<int>(map.size())); 2684 CHECK_EQ(0, static_cast<int>(map.size()));
2685 CHECK_EQ(0, map.GetTraceNodeId(ToAddress(0x400))); 2685 CHECK_EQ(0, map.GetTraceNodeId(ToAddress(0x400)));
2686 } 2686 }
OLDNEW
« no previous file with comments | « test/cctest/test-compiler.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698