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

Unified Diff: runtime/vm/assembler_ia32.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/vm/assembler_arm.cc ('k') | runtime/vm/assembler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_ia32.h
===================================================================
--- runtime/vm/assembler_ia32.h (revision 28314)
+++ runtime/vm/assembler_ia32.h (working copy)
@@ -112,7 +112,7 @@
void SetDisp32(int32_t disp) {
ASSERT(length_ == 1 || length_ == 2);
- int disp_size = sizeof(disp);
+ intptr_t disp_size = sizeof(disp);
memmove(&encoding_[length_], &disp, disp_size);
length_ += disp_size;
}
@@ -125,7 +125,7 @@
explicit Operand(Register reg) { SetModRM(3, reg); }
// Get the operand encoding byte at the given index.
- uint8_t encoding_at(int index) const {
+ uint8_t encoding_at(intptr_t index) const {
ASSERT(index >= 0 && index < length_);
return encoding_[index];
}
@@ -235,17 +235,17 @@
// Returns the position for bound labels. Cannot be used for unused or linked
// labels.
- int Position() const {
+ intptr_t Position() const {
ASSERT(IsBound());
return -position_ - kWordSize;
}
- int LinkPosition() const {
+ intptr_t LinkPosition() const {
ASSERT(IsLinked());
return position_ - kWordSize;
}
- int NearPosition() {
+ intptr_t NearPosition() {
ASSERT(HasNear());
return unresolved_near_positions_[--unresolved_];
}
@@ -256,20 +256,20 @@
bool HasNear() const { return unresolved_ != 0; }
private:
- void BindTo(int position) {
+ void BindTo(intptr_t position) {
ASSERT(!IsBound());
ASSERT(!HasNear());
position_ = -position - kWordSize;
ASSERT(IsBound());
}
- void LinkTo(int position) {
+ void LinkTo(intptr_t position) {
ASSERT(!IsBound());
position_ = position + kWordSize;
ASSERT(IsLinked());
}
- void NearLinkTo(int position) {
+ void NearLinkTo(intptr_t position) {
ASSERT(!IsBound());
ASSERT(unresolved_ < kMaxUnresolvedBranches);
unresolved_near_positions_[unresolved_++] = position;
@@ -277,9 +277,9 @@
static const int kMaxUnresolvedBranches = 20;
- int position_;
- int unresolved_;
- int unresolved_near_positions_[kMaxUnresolvedBranches];
+ intptr_t position_;
+ intptr_t unresolved_;
+ intptr_t unresolved_near_positions_[kMaxUnresolvedBranches];
friend class Assembler;
DISALLOW_COPY_AND_ASSIGN(Label);
@@ -696,13 +696,13 @@
sarl(reg, Immediate(kSmiTagSize));
}
- int PreferredLoopAlignment() { return 16; }
- void Align(int alignment, int offset);
+ intptr_t PreferredLoopAlignment() { return 16; }
+ void Align(intptr_t alignment, intptr_t offset);
void Bind(Label* label);
- int CodeSize() const { return buffer_.Size(); }
- int prologue_offset() const { return prologue_offset_; }
- const ZoneGrowableArray<int>& GetPointerOffsets() const {
+ intptr_t CodeSize() const { return buffer_.Size(); }
+ intptr_t prologue_offset() const { return prologue_offset_; }
+ const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const {
return buffer_.pointer_offsets();
}
const GrowableObjectArray& object_pool() const { return object_pool_; }
@@ -774,7 +774,7 @@
void Untested(const char* message);
void Unreachable(const char* message);
- static void InitializeMemoryWithBreakpoints(uword data, int length);
+ static void InitializeMemoryWithBreakpoints(uword data, intptr_t length);
void Comment(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
const Code::Comments& GetCodeComments() const;
@@ -785,7 +785,7 @@
private:
AssemblerBuffer buffer_;
GrowableObjectArray& object_pool_; // Object pool is not used on ia32.
- int prologue_offset_;
+ intptr_t prologue_offset_;
class CodeComment : public ZoneAllocated {
public:
@@ -814,7 +814,7 @@
void EmitOperand(int rm, const Operand& operand);
void EmitImmediate(const Immediate& imm);
void EmitComplex(int rm, const Operand& operand, const Immediate& immediate);
- void EmitLabel(Label* label, int instruction_size);
+ void EmitLabel(Label* label, intptr_t instruction_size);
void EmitLabelLink(Label* label);
void EmitNearLabelLink(Label* label);
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/assembler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698