Index: runtime/vm/object.h |
diff --git a/runtime/vm/object.h b/runtime/vm/object.h |
index 25f3bc97e04144c38aaa794cdc482e7f4ba79683..a3d64da6020da3ad585fa3efdfe3aae0bc2eba3d 100644 |
--- a/runtime/vm/object.h |
+++ b/runtime/vm/object.h |
@@ -2356,17 +2356,14 @@ class Stackmap : public Object { |
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; } |
- RawCode* GetCode() const { return raw_ptr()->code_; } |
- void SetCode(const Code& code) const; |
+ RawCode* Code() const { return raw_ptr()->code_; } |
+ void SetCode(const dart::Code& code) const; |
- // Return the index of the highest stack slot that has an object. |
- intptr_t MaximumBitIndex() const { return raw_ptr()->max_set_bit_index_; } |
+ intptr_t Length() const { return raw_ptr()->length_; } |
- // Return the index of the lowest stack slot that has an object. |
- intptr_t MinimumBitIndex() const { return raw_ptr()->min_set_bit_index_; } |
+ uword PC() const { return raw_ptr()->pc_; } |
+ void SetPC(uword value) const { raw_ptr()->pc_ = value; } |
static const intptr_t kMaxLengthInBytes = kSmiMax; |
@@ -2374,32 +2371,25 @@ class Stackmap : public Object { |
ASSERT(sizeof(RawStackmap) == OFFSET_OF(RawStackmap, data_)); |
return 0; |
} |
- static intptr_t InstanceSize(intptr_t length_in_bytes) { |
- ASSERT(length_in_bytes >= 0); |
- ASSERT(length_in_bytes <= kMaxLengthInBytes); |
- return RoundedAllocationSize(sizeof(RawStackmap) + length_in_bytes); |
+ static intptr_t InstanceSize(intptr_t length) { |
+ ASSERT(length >= 0); |
+ // The stackmap payload is in an array of bytes. |
+ intptr_t payload_size = |
+ Utils::RoundUp(length, kBitsPerByte) / kBitsPerByte; |
+ return RoundedAllocationSize(sizeof(RawStackmap) + payload_size); |
} |
static RawStackmap* New(intptr_t pc_offset, |
- intptr_t length_in_bits, |
+ intptr_t length, |
BitmapBuilder* bmap); |
private: |
- inline intptr_t SizeInBits() const; |
- |
- void SetMinBitIndex(intptr_t value) const { |
- raw_ptr()->min_set_bit_index_ = value; |
- } |
- void SetMaxBitIndex(intptr_t value) const { |
- raw_ptr()->max_set_bit_index_ = value; |
- } |
+ void SetLength(intptr_t length) const { raw_ptr()->length_ = length; } |
- bool InRange(intptr_t index) const { return index < SizeInBits(); } |
+ bool InRange(intptr_t index) const { return index < Length(); } |
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; |
- |
HEAP_OBJECT_IMPLEMENTATION(Stackmap, Object); |
friend class BitmapBuilder; |
friend class Class; |
@@ -2536,12 +2526,6 @@ class Code : public Object { |
void set_is_optimized(bool value) const { |
raw_ptr()->is_optimized_ = value ? 1 : 0; |
} |
- intptr_t spill_slot_count() const { |
Kevin Millikin (Google)
2012/08/17 09:07:43
This is no longer used, and it's easy to add back
|
- return raw_ptr()->spill_slot_count_; |
- } |
- void set_spill_slot_count(intptr_t count) const { |
- raw_ptr()->spill_slot_count_ = count; |
- } |
uword EntryPoint() const { |
const Instructions& instr = Instructions::Handle(instructions()); |
@@ -5520,11 +5504,6 @@ void Context::SetAt(intptr_t index, const Instance& value) const { |
} |
-intptr_t Stackmap::SizeInBits() const { |
- return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); |
-} |
- |
- |
bool String::Equals(const String& str) const { |
if (raw() == str.raw()) { |
return true; // Both handles point to the same raw instance. |