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

Unified Diff: src/serialize.h

Issue 18842: Experimental: periodic merge of the bleeding_edge branch to the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/scopes.cc ('k') | src/serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.h
===================================================================
--- src/serialize.h (revision 1168)
+++ src/serialize.h (working copy)
@@ -135,7 +135,7 @@
// Returns the serialized buffer. Ownership is transferred to the
// caller. Only the destructor and getters may be called after this call.
- void Finalize(char** str, int* len);
+ void Finalize(byte** str, int* len);
int roots() { return roots_; }
int objects() { return objects_; }
@@ -211,7 +211,7 @@
class SnapshotReader {
public:
- SnapshotReader(const char* str, int len): str_(str), end_(str + len) {}
+ SnapshotReader(const byte* str, int len): str_(str), end_(str + len) {}
void ExpectC(char expected) {
int c = GetC();
@@ -225,8 +225,8 @@
}
int GetInt() {
- int result = *reinterpret_cast<const int*>(str_);
- str_ += sizeof(result);
+ int result;
+ GetBytes(reinterpret_cast<Address>(&result), sizeof(result));
return result;
}
@@ -247,8 +247,8 @@
}
private:
- const char* str_;
- const char* end_;
+ const byte* str_;
+ const byte* end_;
};
@@ -257,12 +257,12 @@
class Deserializer: public ObjectVisitor {
public:
// Create a deserializer. The snapshot is held in str and has size len.
- Deserializer(const char* str, int len);
+ Deserializer(const byte* str, int len);
virtual ~Deserializer();
// Read the flags from the header of the file, and set those that
- // should be inhereted from the snapshot.
+ // should be inherited from the snapshot.
void GetFlags();
// Read saved profiling information from the file and log it if required.
« no previous file with comments | « src/scopes.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698