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

Side by Side Diff: src/snapshot.h

Issue 18583: Change type of snapshot from char array to byte array to avoid portability pr... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 11 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.cc ('k') | src/snapshot-common.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 27 matching lines...) Expand all
38 static bool Initialize(const char* snapshot_file = NULL); 38 static bool Initialize(const char* snapshot_file = NULL);
39 39
40 // Returns whether or not the snapshot is enabled. 40 // Returns whether or not the snapshot is enabled.
41 static bool IsEnabled() { return size_ != 0; } 41 static bool IsEnabled() { return size_ != 0; }
42 42
43 // Write snapshot to the given file. Returns true if snapshot was written 43 // Write snapshot to the given file. Returns true if snapshot was written
44 // successfully. 44 // successfully.
45 static bool WriteToFile(const char* snapshot_file); 45 static bool WriteToFile(const char* snapshot_file);
46 46
47 private: 47 private:
48 static const char data_[]; 48 static const byte data_[];
49 static int size_; 49 static int size_;
50 50
51 static bool Deserialize(const char* content, int len); 51 static bool Deserialize(const byte* content, int len);
52 52
53 DISALLOW_IMPLICIT_CONSTRUCTORS(Snapshot); 53 DISALLOW_IMPLICIT_CONSTRUCTORS(Snapshot);
54 }; 54 };
55 55
56 } } // namespace v8::internal 56 } } // namespace v8::internal
57 57
58 #endif // V8_SNAPSHOT_H_ 58 #endif // V8_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | src/snapshot-common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698