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

Side by Side Diff: src/serialize.cc

Issue 297303004: Revert 21502 - "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/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 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 } 1700 }
1701 } 1701 }
1702 // One of the strings in the natives cache should match the resource. We 1702 // One of the strings in the natives cache should match the resource. We
1703 // can't serialize any other kinds of external strings. 1703 // can't serialize any other kinds of external strings.
1704 UNREACHABLE(); 1704 UNREACHABLE();
1705 } 1705 }
1706 1706
1707 1707
1708 static Code* CloneCodeObject(HeapObject* code) { 1708 static Code* CloneCodeObject(HeapObject* code) {
1709 Address copy = new byte[code->Size()]; 1709 Address copy = new byte[code->Size()];
1710 MemCopy(copy, code->address(), code->Size()); 1710 OS::MemCopy(copy, code->address(), code->Size());
1711 return Code::cast(HeapObject::FromAddress(copy)); 1711 return Code::cast(HeapObject::FromAddress(copy));
1712 } 1712 }
1713 1713
1714 1714
1715 static void WipeOutRelocations(Code* code) { 1715 static void WipeOutRelocations(Code* code) {
1716 int mode_mask = 1716 int mode_mask =
1717 RelocInfo::kCodeTargetMask | 1717 RelocInfo::kCodeTargetMask |
1718 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | 1718 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) |
1719 RelocInfo::ModeMask(RelocInfo::EXTERNAL_REFERENCE) | 1719 RelocInfo::ModeMask(RelocInfo::EXTERNAL_REFERENCE) |
1720 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY); 1720 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1832 1832
1833 bool SnapshotByteSource::AtEOF() { 1833 bool SnapshotByteSource::AtEOF() {
1834 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false; 1834 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false;
1835 for (int x = position_; x < length_; x++) { 1835 for (int x = position_; x < length_; x++) {
1836 if (data_[x] != SerializerDeserializer::nop()) return false; 1836 if (data_[x] != SerializerDeserializer::nop()) return false;
1837 } 1837 }
1838 return true; 1838 return true;
1839 } 1839 }
1840 1840
1841 } } // namespace v8::internal 1841 } } // 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