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

Side by Side Diff: runtime/vm/snapshot.h

Issue 415513002: - Fix a lot of warnings generated by -Wshorten-64-to-32 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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 | « runtime/vm/service.cc ('k') | runtime/vm/snapshot.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_SNAPSHOT_H_ 5 #ifndef VM_SNAPSHOT_H_
6 #define VM_SNAPSHOT_H_ 6 #define VM_SNAPSHOT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/bitfield.h" 10 #include "vm/bitfield.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 }; 134 };
135 135
136 static const int kHeaderSize = 2 * sizeof(int64_t); 136 static const int kHeaderSize = 2 * sizeof(int64_t);
137 static const int kLengthIndex = 0; 137 static const int kLengthIndex = 0;
138 static const int kSnapshotFlagIndex = 1; 138 static const int kSnapshotFlagIndex = 1;
139 139
140 static const Snapshot* SetupFromBuffer(const void* raw_memory); 140 static const Snapshot* SetupFromBuffer(const void* raw_memory);
141 141
142 // Getters. 142 // Getters.
143 const uint8_t* content() const { return content_; } 143 const uint8_t* content() const { return content_; }
144 int64_t length() const { return length_; } 144 intptr_t length() const { return static_cast<intptr_t>(length_); }
145 Kind kind() const { return static_cast<Kind>(kind_); } 145 Kind kind() const { return static_cast<Kind>(kind_); }
146 146
147 bool IsMessageSnapshot() const { return kind_ == kMessage; } 147 bool IsMessageSnapshot() const { return kind_ == kMessage; }
148 bool IsScriptSnapshot() const { return kind_ == kScript; } 148 bool IsScriptSnapshot() const { return kind_ == kScript; }
149 bool IsFullSnapshot() const { return kind_ == kFull; } 149 bool IsFullSnapshot() const { return kind_ == kFull; }
150 uint8_t* Addr() { return reinterpret_cast<uint8_t*>(this); } 150 uint8_t* Addr() { return reinterpret_cast<uint8_t*>(this); }
151 151
152 static intptr_t length_offset() { return OFFSET_OF(Snapshot, length_); } 152 static intptr_t length_offset() { return OFFSET_OF(Snapshot, length_); }
153 static intptr_t kind_offset() { 153 static intptr_t kind_offset() {
154 return OFFSET_OF(Snapshot, kind_); 154 return OFFSET_OF(Snapshot, kind_);
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 private: 702 private:
703 SnapshotWriter* writer_; 703 SnapshotWriter* writer_;
704 bool as_references_; 704 bool as_references_;
705 705
706 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); 706 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor);
707 }; 707 };
708 708
709 } // namespace dart 709 } // namespace dart
710 710
711 #endif // VM_SNAPSHOT_H_ 711 #endif // VM_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698