Chromium Code Reviews| Index: runtime/vm/assembler.cc |
| diff --git a/runtime/vm/assembler.cc b/runtime/vm/assembler.cc |
| index 5a8f846dc6832bfe7bda8bb80750001bec67b58b..ff08c9a2d76cd6bd9774c4da20fd10358529c488 100644 |
| --- a/runtime/vm/assembler.cc |
| +++ b/runtime/vm/assembler.cc |
| @@ -149,12 +149,25 @@ class PatchCodeWithHandle : public AssemblerFixup { |
| pointer_offsets_->Add(position); |
| } |
| + virtual bool IsPointerOffset() const { return true; } |
| + |
| private: |
| ZoneGrowableArray<intptr_t>* pointer_offsets_; |
| const Object& object_; |
| }; |
| +intptr_t AssemblerBuffer::CountPointerOffsets() const { |
|
srdjan
2014/01/16 17:38:12
IMO, PointerOffsetsCount or NumberOfPointerOffsets
|
| + intptr_t count = 0; |
| + AssemblerFixup* current = fixup_; |
| + while (current != NULL) { |
| + if (current->IsPointerOffset()) ++count; |
| + current = current->previous_; |
| + } |
| + return count; |
| +} |
| + |
| + |
| void AssemblerBuffer::EmitObject(const Object& object) { |
| // Since we are going to store the handle as part of the fixup information |
| // the handle needs to be a zone handle. |