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

Unified Diff: runtime/vm/snapshot.h

Issue 8222017: Fix compilation warnings/errors seen with newer versions of gcc compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 2 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 | « runtime/vm/parser.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.h
===================================================================
--- runtime/vm/snapshot.h (revision 265)
+++ runtime/vm/snapshot.h (working copy)
@@ -59,10 +59,10 @@
static const int kLengthIndex = 0;
static const int kSnapshotFlagIndex = 1;
- static Snapshot* SetupFromBuffer(void* raw_memory);
+ static const Snapshot* SetupFromBuffer(const void* raw_memory);
// Getters.
- uint8_t* content() { return content_; }
+ const uint8_t* content() const { return content_; }
int32_t length() const { return length_; }
bool IsPartialSnapshot() const { return full_snapshot_ == 0; }
@@ -89,9 +89,9 @@
// Stream for reading various types from a buffer.
class ReadStream : public ValueObject {
public:
- ReadStream(uint8_t* buffer, intptr_t size) : buffer_(buffer),
- current_(buffer),
- end_(buffer + size) {}
+ ReadStream(const uint8_t* buffer, intptr_t size) : buffer_(buffer),
+ current_(buffer),
+ end_(buffer + size) {}
private:
template<typename T>
@@ -151,9 +151,9 @@
}
private:
- uint8_t* buffer_;
- uint8_t* current_;
- uint8_t* end_;
+ const uint8_t* buffer_;
+ const uint8_t* current_;
+ const uint8_t* end_;
// SnapshotReader needs access to the private Raw classes.
friend class SnapshotReader;
@@ -266,7 +266,9 @@
// Reads a snapshot into objects.
class SnapshotReader {
public:
- SnapshotReader(Snapshot* snapshot, Heap* heap, ObjectStore* object_store)
+ SnapshotReader(const Snapshot* snapshot,
+ Heap* heap,
+ ObjectStore* object_store)
: stream_(snapshot->content(), snapshot->length()),
classes_serialized_(snapshot->IsFullSnapshot()),
heap_(heap),
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698