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

Unified Diff: runtime/vm/assembler.h

Issue 26294002: Cleanups: int -> intptr_t for "array" lengths, memory sizes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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/bin/dartutils.cc ('k') | runtime/vm/assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler.h
===================================================================
--- runtime/vm/assembler.h (revision 28314)
+++ runtime/vm/assembler.h (working copy)
@@ -51,7 +51,7 @@
// into executable memory.
class AssemblerFixup : public ZoneAllocated {
public:
- virtual void Process(const MemoryRegion& region, int position) = 0;
+ virtual void Process(const MemoryRegion& region, intptr_t position) = 0;
// It would be ideal if the destructor method could be made private,
// but the g++ compiler complains when this is subclassed.
@@ -59,13 +59,13 @@
private:
AssemblerFixup* previous_;
- int position_;
+ intptr_t position_;
AssemblerFixup* previous() const { return previous_; }
void set_previous(AssemblerFixup* previous) { previous_ = previous; }
- int position() const { return position_; }
- void set_position(int position) { position_ = position; }
+ intptr_t position() const { return position_; }
+ void set_position(intptr_t position) { position_ = position; }
friend class AssemblerBuffer;
};
@@ -89,17 +89,19 @@
cursor_ -= sizeof(T);
}
- template<typename T> T Load(int position) {
- ASSERT(position >= 0 && position <= (Size() - static_cast<int>(sizeof(T))));
+ template<typename T> T Load(intptr_t position) {
+ ASSERT(position >= 0 &&
+ position <= (Size() - static_cast<intptr_t>(sizeof(T))));
return *reinterpret_cast<T*>(contents_ + position);
}
- template<typename T> void Store(int position, T value) {
- ASSERT(position >= 0 && position <= (Size() - static_cast<int>(sizeof(T))));
+ template<typename T> void Store(intptr_t position, T value) {
+ ASSERT(position >= 0 &&
+ position <= (Size() - static_cast<intptr_t>(sizeof(T))));
*reinterpret_cast<T*>(contents_ + position) = value;
}
- const ZoneGrowableArray<int>& pointer_offsets() const {
+ const ZoneGrowableArray<intptr_t>& pointer_offsets() const {
#if defined(DEBUG)
ASSERT(fixups_processed_);
#endif
@@ -174,7 +176,7 @@
uword cursor_;
uword limit_;
AssemblerFixup* fixup_;
- ZoneGrowableArray<int>* pointer_offsets_;
+ ZoneGrowableArray<intptr_t>* pointer_offsets_;
#if defined(DEBUG)
bool fixups_processed_;
#endif
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/vm/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698