static ptrdiff_t EncodeOffset(BufferOffset cur, BufferOffset next) { MOZ_ASSERT(next.assigned() && cur.assigned()); ptrdiff_t offset = next.getOffset() - cur.getOffset(); MOZ_ASSERT(offset % kInstructionSize == 0); return offset / kInstructionSize; }