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

Side by Side Diff: src/serialize.h

Issue 306473004: Reland 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/scanner.h ('k') | src/serialize.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 #ifndef V8_SERIALIZE_H_ 5 #ifndef V8_SERIALIZE_H_
6 #define V8_SERIALIZE_H_ 6 #define V8_SERIALIZE_H_
7 7
8 #include "hashmap.h" 8 #include "hashmap.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 Advance(bytes); 276 Advance(bytes);
277 uint32_t mask = 0xffffffffu; 277 uint32_t mask = 0xffffffffu;
278 mask >>= 32 - (bytes << 3); 278 mask >>= 32 - (bytes << 3);
279 answer &= mask; 279 answer &= mask;
280 answer >>= 2; 280 answer >>= 2;
281 return answer; 281 return answer;
282 } 282 }
283 283
284 284
285 void SnapshotByteSource::CopyRaw(byte* to, int number_of_bytes) { 285 void SnapshotByteSource::CopyRaw(byte* to, int number_of_bytes) {
286 OS::MemCopy(to, data_ + position_, number_of_bytes); 286 MemCopy(to, data_ + position_, number_of_bytes);
287 position_ += number_of_bytes; 287 position_ += number_of_bytes;
288 } 288 }
289 289
290 290
291 // A Deserializer reads a snapshot and reconstructs the Object graph it defines. 291 // A Deserializer reads a snapshot and reconstructs the Object graph it defines.
292 class Deserializer: public SerializerDeserializer { 292 class Deserializer: public SerializerDeserializer {
293 public: 293 public:
294 // Create a deserializer from a snapshot byte source. 294 // Create a deserializer from a snapshot byte source.
295 explicit Deserializer(SnapshotByteSource* source); 295 explicit Deserializer(SnapshotByteSource* source);
296 296
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 private: 629 private:
630 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { 630 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) {
631 return false; 631 return false;
632 } 632 }
633 }; 633 };
634 634
635 635
636 } } // namespace v8::internal 636 } } // namespace v8::internal
637 637
638 #endif // V8_SERIALIZE_H_ 638 #endif // V8_SERIALIZE_H_
OLDNEW
« no previous file with comments | « src/scanner.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698