Chromium Code Reviews| Index: runtime/vm/object.h |
| diff --git a/runtime/vm/object.h b/runtime/vm/object.h |
| index a39ab30f6495388bce131c5af9d4595d42efa1f7..d71acd6670b74e6c1058a214f74c0b8d0afe18b9 100644 |
| --- a/runtime/vm/object.h |
| +++ b/runtime/vm/object.h |
| @@ -2340,19 +2340,20 @@ class Stackmap : public Object { |
| // Return the index of the lowest stack slot that has an object. |
| intptr_t MinimumBitIndex() const { return raw_ptr()->min_set_bit_index_; } |
| - static const intptr_t kBytesPerElement = kWordSize; |
| - static const intptr_t kMaxElements = kSmiMax / kBytesPerElement; |
| + static const intptr_t kMaxLengthInBytes = kSmiMax; |
| static intptr_t InstanceSize() { |
| ASSERT(sizeof(RawStackmap) == OFFSET_OF(RawStackmap, data_)); |
| return 0; |
| } |
| - static intptr_t InstanceSize(intptr_t len) { |
|
Kevin Millikin (Google)
2012/08/14 13:02:32
This was already a length in bytes, no need to mul
|
| - ASSERT(0 <= len && len <= kMaxElements); |
| - return RoundedAllocationSize( |
| - sizeof(RawStackmap) + (len * kBytesPerElement)); |
| + static intptr_t InstanceSize(intptr_t length_in_bytes) { |
|
Vyacheslav Egorov (Google)
2012/08/15 14:17:37
I wonder if we can pass a real length here to alig
Kevin Millikin (Google)
2012/08/15 14:41:31
Yes. Will do with the next change.
|
| + ASSERT(length_in_bytes >= 0); |
| + ASSERT(length_in_bytes <= kMaxLengthInBytes); |
| + return RoundedAllocationSize(sizeof(RawStackmap) + length_in_bytes); |
| } |
| - static RawStackmap* New(uword pc, BitmapBuilder* bmap); |
| + static RawStackmap* New(intptr_t pc_offset, |
| + intptr_t length_in_bits, |
| + BitmapBuilder* bmap); |
| private: |
| inline intptr_t SizeInBits() const; |