Index: runtime/vm/assembler.cc |
=================================================================== |
--- runtime/vm/assembler.cc (revision 32487) |
+++ runtime/vm/assembler.cc (working copy) |
@@ -149,12 +149,25 @@ |
pointer_offsets_->Add(position); |
} |
+ virtual bool IsPointerOffset() const { return true; } |
+ |
private: |
ZoneGrowableArray<intptr_t>* pointer_offsets_; |
const Object& object_; |
}; |
+intptr_t AssemblerBuffer::CountPointerOffsets() const { |
+ 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. |