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

Side by Side Diff: src/serialize.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/serialize.h ('k') | src/string-stream.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 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 "accessors.h" 7 #include "accessors.h"
8 #include "api.h" 8 #include "api.h"
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "deoptimizer.h" 10 #include "deoptimizer.h"
(...skipping 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 } 1705 }
1706 } 1706 }
1707 // One of the strings in the natives cache should match the resource. We 1707 // One of the strings in the natives cache should match the resource. We
1708 // can't serialize any other kinds of external strings. 1708 // can't serialize any other kinds of external strings.
1709 UNREACHABLE(); 1709 UNREACHABLE();
1710 } 1710 }
1711 1711
1712 1712
1713 static Code* CloneCodeObject(HeapObject* code) { 1713 static Code* CloneCodeObject(HeapObject* code) {
1714 Address copy = new byte[code->Size()]; 1714 Address copy = new byte[code->Size()];
1715 OS::MemCopy(copy, code->address(), code->Size()); 1715 MemCopy(copy, code->address(), code->Size());
1716 return Code::cast(HeapObject::FromAddress(copy)); 1716 return Code::cast(HeapObject::FromAddress(copy));
1717 } 1717 }
1718 1718
1719 1719
1720 static void WipeOutRelocations(Code* code) { 1720 static void WipeOutRelocations(Code* code) {
1721 int mode_mask = 1721 int mode_mask =
1722 RelocInfo::kCodeTargetMask | 1722 RelocInfo::kCodeTargetMask |
1723 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | 1723 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) |
1724 RelocInfo::ModeMask(RelocInfo::EXTERNAL_REFERENCE) | 1724 RelocInfo::ModeMask(RelocInfo::EXTERNAL_REFERENCE) |
1725 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY); 1725 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1837 1837
1838 bool SnapshotByteSource::AtEOF() { 1838 bool SnapshotByteSource::AtEOF() {
1839 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false; 1839 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false;
1840 for (int x = position_; x < length_; x++) { 1840 for (int x = position_; x < length_; x++) {
1841 if (data_[x] != SerializerDeserializer::nop()) return false; 1841 if (data_[x] != SerializerDeserializer::nop()) return false;
1842 } 1842 }
1843 return true; 1843 return true;
1844 } 1844 }
1845 1845
1846 } } // namespace v8::internal 1846 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/serialize.h ('k') | src/string-stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698