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

Unified Diff: runtime/vm/object.h

Issue 10835034: Fix an off-by-one error in the stack frame iteration. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Renaming per review comments. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/code_descriptors_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index c0571874f9b94c4b10701f9d512baa98af14abfa..f54c0819c55a5e0013c465f747064e69df73077d 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -2258,8 +2258,8 @@ class Stackmap : public Object {
static const intptr_t kNoMaximum = -1;
static const intptr_t kNoMinimum = -1;
- bool IsObject(intptr_t offset) const {
- return InRange(offset) && GetBit(offset);
+ bool IsObject(intptr_t index) const {
+ return InRange(index) && GetBit(index);
}
uword PC() const { return raw_ptr()->pc_; }
void SetPC(uword value) const { raw_ptr()->pc_ = value; }
@@ -2267,11 +2267,11 @@ class Stackmap : public Object {
RawCode* GetCode() const { return raw_ptr()->code_; }
void SetCode(const Code& code) const;
- // Return the offset of the highest stack slot that has an object.
- intptr_t MaximumBitOffset() const { return raw_ptr()->max_set_bit_offset_; }
+ // Return the index of the highest stack slot that has an object.
+ intptr_t MaximumBitIndex() const { return raw_ptr()->max_set_bit_index_; }
- // Return the offset of the lowest stack slot that has an object.
- intptr_t MinimumBitOffset() const { return raw_ptr()->min_set_bit_offset_; }
+ // Return the index of the lowest stack slot that has an object.
+ intptr_t MinimumBitIndex() const { return raw_ptr()->min_set_bit_index_; }
static intptr_t InstanceSize() {
ASSERT(sizeof(RawStackmap) == OFFSET_OF(RawStackmap, data_));
@@ -2285,17 +2285,17 @@ class Stackmap : public Object {
private:
inline intptr_t SizeInBits() const;
- void SetMinBitOffset(intptr_t value) const {
- raw_ptr()->min_set_bit_offset_ = value;
+ void SetMinBitIndex(intptr_t value) const {
+ raw_ptr()->min_set_bit_index_ = value;
}
- void SetMaxBitOffset(intptr_t value) const {
- raw_ptr()->max_set_bit_offset_ = value;
+ void SetMaxBitIndex(intptr_t value) const {
+ raw_ptr()->max_set_bit_index_ = value;
}
- bool InRange(intptr_t offset) const { return offset < SizeInBits(); }
+ bool InRange(intptr_t index) const { return index < SizeInBits(); }
- bool GetBit(intptr_t bit_offset) const;
- void SetBit(intptr_t bit_offset, bool value) const;
+ bool GetBit(intptr_t bit_index) const;
+ void SetBit(intptr_t bit_index, bool value) const;
void set_bitmap_size_in_bytes(intptr_t value) const;
« no previous file with comments | « runtime/vm/code_descriptors_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698