Commit 30f641cd by Richard Sandiford Committed by Richard Sandiford

vec.h (vec_prefix, vec): Prefix member names with "m_".

gcc/
	* vec.h (vec_prefix, vec): Prefix member names with "m_".
	* vec.c (vec_prefix::calculate_allocation): Update accordingly.

From-SVN: r203047
parent 65d3284b
2013-09-30 Richard Sandiford <rdsandiford@googlemail.com> 2013-09-30 Richard Sandiford <rdsandiford@googlemail.com>
* vec.h (vec_prefix, vec): Prefix member names with "m_".
* vec.c (vec_prefix::calculate_allocation): Update accordingly.
2013-09-30 Richard Sandiford <rdsandiford@googlemail.com>
* basic-block.h (edge_list): Prefix member names with "m_". * basic-block.h (edge_list): Prefix member names with "m_".
* context.h (context): Likewise. * context.h (context): Likewise.
* domwalk.h (dom_walker): Likewise. * domwalk.h (dom_walker): Likewise.
......
...@@ -183,8 +183,8 @@ vec_prefix::calculate_allocation (vec_prefix *pfx, unsigned reserve, ...@@ -183,8 +183,8 @@ vec_prefix::calculate_allocation (vec_prefix *pfx, unsigned reserve,
if (pfx) if (pfx)
{ {
alloc = pfx->alloc_; alloc = pfx->m_alloc;
num = pfx->num_; num = pfx->m_num;
} }
else if (!reserve) else if (!reserve)
/* If there's no vector, and we've not requested anything, then we /* If there's no vector, and we've not requested anything, then we
......
...@@ -235,8 +235,8 @@ struct vec_prefix ...@@ -235,8 +235,8 @@ struct vec_prefix
friend struct va_heap; friend struct va_heap;
friend struct va_stack; friend struct va_stack;
unsigned alloc_; unsigned m_alloc;
unsigned num_; unsigned m_num;
}; };
template<typename, typename, typename> struct vec; template<typename, typename, typename> struct vec;
...@@ -285,7 +285,7 @@ va_heap::reserve (vec<T, va_heap, vl_embed> *&v, unsigned reserve, bool exact ...@@ -285,7 +285,7 @@ va_heap::reserve (vec<T, va_heap, vl_embed> *&v, unsigned reserve, bool exact
MEM_STAT_DECL) MEM_STAT_DECL)
{ {
unsigned alloc unsigned alloc
= vec_prefix::calculate_allocation (v ? &v->vecpfx_ : 0, reserve, exact); = vec_prefix::calculate_allocation (v ? &v->m_vecpfx : 0, reserve, exact);
if (!alloc) if (!alloc)
{ {
release (v); release (v);
...@@ -293,7 +293,7 @@ va_heap::reserve (vec<T, va_heap, vl_embed> *&v, unsigned reserve, bool exact ...@@ -293,7 +293,7 @@ va_heap::reserve (vec<T, va_heap, vl_embed> *&v, unsigned reserve, bool exact
} }
if (GATHER_STATISTICS && v) if (GATHER_STATISTICS && v)
v->vecpfx_.release_overhead (); v->m_vecpfx.release_overhead ();
size_t size = vec<T, va_heap, vl_embed>::embedded_size (alloc); size_t size = vec<T, va_heap, vl_embed>::embedded_size (alloc);
unsigned nelem = v ? v->length () : 0; unsigned nelem = v ? v->length () : 0;
...@@ -301,7 +301,7 @@ va_heap::reserve (vec<T, va_heap, vl_embed> *&v, unsigned reserve, bool exact ...@@ -301,7 +301,7 @@ va_heap::reserve (vec<T, va_heap, vl_embed> *&v, unsigned reserve, bool exact
v->embedded_init (alloc, nelem); v->embedded_init (alloc, nelem);
if (GATHER_STATISTICS) if (GATHER_STATISTICS)
v->vecpfx_.register_overhead (size FINAL_PASS_MEM_STAT); v->m_vecpfx.register_overhead (size FINAL_PASS_MEM_STAT);
} }
...@@ -315,7 +315,7 @@ va_heap::release (vec<T, va_heap, vl_embed> *&v) ...@@ -315,7 +315,7 @@ va_heap::release (vec<T, va_heap, vl_embed> *&v)
return; return;
if (GATHER_STATISTICS) if (GATHER_STATISTICS)
v->vecpfx_.release_overhead (); v->m_vecpfx.release_overhead ();
::free (v); ::free (v);
v = NULL; v = NULL;
} }
...@@ -364,7 +364,7 @@ va_gc::reserve (vec<T, A, vl_embed> *&v, unsigned reserve, bool exact ...@@ -364,7 +364,7 @@ va_gc::reserve (vec<T, A, vl_embed> *&v, unsigned reserve, bool exact
MEM_STAT_DECL) MEM_STAT_DECL)
{ {
unsigned alloc unsigned alloc
= vec_prefix::calculate_allocation (v ? &v->vecpfx_ : 0, reserve, exact); = vec_prefix::calculate_allocation (v ? &v->m_vecpfx : 0, reserve, exact);
if (!alloc) if (!alloc)
{ {
::ggc_free (v); ::ggc_free (v);
...@@ -433,9 +433,9 @@ void ...@@ -433,9 +433,9 @@ void
va_stack::alloc (vec<T, va_stack, vl_ptr> &v, unsigned nelems, va_stack::alloc (vec<T, va_stack, vl_ptr> &v, unsigned nelems,
vec<T, va_stack, vl_embed> *space) vec<T, va_stack, vl_embed> *space)
{ {
v.vec_ = space; v.m_vec = space;
register_stack_vec (static_cast<void *> (v.vec_)); register_stack_vec (static_cast<void *> (v.m_vec));
v.vec_->embedded_init (nelems, 0); v.m_vec->embedded_init (nelems, 0);
} }
...@@ -462,16 +462,16 @@ va_stack::reserve (vec<T, va_stack, vl_embed> *&v, unsigned nelems, bool exact ...@@ -462,16 +462,16 @@ va_stack::reserve (vec<T, va_stack, vl_embed> *&v, unsigned nelems, bool exact
} }
/* Move VEC_ to the heap. */ /* Move VEC_ to the heap. */
nelems += v->vecpfx_.num_; nelems += v->m_vecpfx.m_num;
vec<T, va_stack, vl_embed> *oldvec = v; vec<T, va_stack, vl_embed> *oldvec = v;
v = NULL; v = NULL;
va_heap::reserve (reinterpret_cast<vec<T, va_heap, vl_embed> *&>(v), nelems, va_heap::reserve (reinterpret_cast<vec<T, va_heap, vl_embed> *&>(v), nelems,
exact PASS_MEM_STAT); exact PASS_MEM_STAT);
if (v && oldvec) if (v && oldvec)
{ {
v->vecpfx_.num_ = oldvec->length (); v->m_vecpfx.m_num = oldvec->length ();
memcpy (v->vecdata_, memcpy (v->m_vecdata,
oldvec->vecdata_, oldvec->m_vecdata,
oldvec->length () * sizeof (T)); oldvec->length () * sizeof (T));
} }
} }
...@@ -562,11 +562,11 @@ template<typename T, typename A> ...@@ -562,11 +562,11 @@ template<typename T, typename A>
struct GTY((user)) vec<T, A, vl_embed> struct GTY((user)) vec<T, A, vl_embed>
{ {
public: public:
unsigned allocated (void) const { return vecpfx_.alloc_; } unsigned allocated (void) const { return m_vecpfx.m_alloc; }
unsigned length (void) const { return vecpfx_.num_; } unsigned length (void) const { return m_vecpfx.m_num; }
bool is_empty (void) const { return vecpfx_.num_ == 0; } bool is_empty (void) const { return m_vecpfx.m_num == 0; }
T *address (void) { return vecdata_; } T *address (void) { return m_vecdata; }
const T *address (void) const { return vecdata_; } const T *address (void) const { return m_vecdata; }
const T &operator[] (unsigned) const; const T &operator[] (unsigned) const;
T &operator[] (unsigned); T &operator[] (unsigned);
T &last (void); T &last (void);
...@@ -601,8 +601,8 @@ public: ...@@ -601,8 +601,8 @@ public:
/* FIXME - These fields should be private, but we need to cater to /* FIXME - These fields should be private, but we need to cater to
compilers that have stricter notions of PODness for types. */ compilers that have stricter notions of PODness for types. */
vec_prefix vecpfx_; vec_prefix m_vecpfx;
T vecdata_[1]; T m_vecdata[1];
}; };
...@@ -816,16 +816,16 @@ template<typename T, typename A> ...@@ -816,16 +816,16 @@ template<typename T, typename A>
inline const T & inline const T &
vec<T, A, vl_embed>::operator[] (unsigned ix) const vec<T, A, vl_embed>::operator[] (unsigned ix) const
{ {
gcc_checking_assert (ix < vecpfx_.num_); gcc_checking_assert (ix < m_vecpfx.m_num);
return vecdata_[ix]; return m_vecdata[ix];
} }
template<typename T, typename A> template<typename T, typename A>
inline T & inline T &
vec<T, A, vl_embed>::operator[] (unsigned ix) vec<T, A, vl_embed>::operator[] (unsigned ix)
{ {
gcc_checking_assert (ix < vecpfx_.num_); gcc_checking_assert (ix < m_vecpfx.m_num);
return vecdata_[ix]; return m_vecdata[ix];
} }
...@@ -835,8 +835,8 @@ template<typename T, typename A> ...@@ -835,8 +835,8 @@ template<typename T, typename A>
inline T & inline T &
vec<T, A, vl_embed>::last (void) vec<T, A, vl_embed>::last (void)
{ {
gcc_checking_assert (vecpfx_.num_ > 0); gcc_checking_assert (m_vecpfx.m_num > 0);
return (*this)[vecpfx_.num_ - 1]; return (*this)[m_vecpfx.m_num - 1];
} }
...@@ -850,7 +850,7 @@ template<typename T, typename A> ...@@ -850,7 +850,7 @@ template<typename T, typename A>
inline bool inline bool
vec<T, A, vl_embed>::space (unsigned nelems) const vec<T, A, vl_embed>::space (unsigned nelems) const
{ {
return vecpfx_.alloc_ - vecpfx_.num_ >= nelems; return m_vecpfx.m_alloc - m_vecpfx.m_num >= nelems;
} }
...@@ -865,9 +865,9 @@ template<typename T, typename A> ...@@ -865,9 +865,9 @@ template<typename T, typename A>
inline bool inline bool
vec<T, A, vl_embed>::iterate (unsigned ix, T *ptr) const vec<T, A, vl_embed>::iterate (unsigned ix, T *ptr) const
{ {
if (ix < vecpfx_.num_) if (ix < m_vecpfx.m_num)
{ {
*ptr = vecdata_[ix]; *ptr = m_vecdata[ix];
return true; return true;
} }
else else
...@@ -891,9 +891,9 @@ template<typename T, typename A> ...@@ -891,9 +891,9 @@ template<typename T, typename A>
inline bool inline bool
vec<T, A, vl_embed>::iterate (unsigned ix, T **ptr) const vec<T, A, vl_embed>::iterate (unsigned ix, T **ptr) const
{ {
if (ix < vecpfx_.num_) if (ix < m_vecpfx.m_num)
{ {
*ptr = CONST_CAST (T *, &vecdata_[ix]); *ptr = CONST_CAST (T *, &m_vecdata[ix]);
return true; return true;
} }
else else
...@@ -916,7 +916,7 @@ vec<T, A, vl_embed>::copy (ALONE_MEM_STAT_DECL) const ...@@ -916,7 +916,7 @@ vec<T, A, vl_embed>::copy (ALONE_MEM_STAT_DECL) const
{ {
vec_alloc (new_vec, len PASS_MEM_STAT); vec_alloc (new_vec, len PASS_MEM_STAT);
new_vec->embedded_init (len, len); new_vec->embedded_init (len, len);
memcpy (new_vec->address (), vecdata_, sizeof (T) * len); memcpy (new_vec->address (), m_vecdata, sizeof (T) * len);
} }
return new_vec; return new_vec;
} }
...@@ -934,7 +934,7 @@ vec<T, A, vl_embed>::splice (vec<T, A, vl_embed> &src) ...@@ -934,7 +934,7 @@ vec<T, A, vl_embed>::splice (vec<T, A, vl_embed> &src)
{ {
gcc_checking_assert (space (len)); gcc_checking_assert (space (len));
memcpy (address () + length (), src.address (), len * sizeof (T)); memcpy (address () + length (), src.address (), len * sizeof (T));
vecpfx_.num_ += len; m_vecpfx.m_num += len;
} }
} }
...@@ -956,7 +956,7 @@ inline T * ...@@ -956,7 +956,7 @@ inline T *
vec<T, A, vl_embed>::quick_push (const T &obj) vec<T, A, vl_embed>::quick_push (const T &obj)
{ {
gcc_checking_assert (space (1)); gcc_checking_assert (space (1));
T *slot = &vecdata_[vecpfx_.num_++]; T *slot = &m_vecdata[m_vecpfx.m_num++];
*slot = obj; *slot = obj;
return slot; return slot;
} }
...@@ -969,7 +969,7 @@ inline T & ...@@ -969,7 +969,7 @@ inline T &
vec<T, A, vl_embed>::pop (void) vec<T, A, vl_embed>::pop (void)
{ {
gcc_checking_assert (length () > 0); gcc_checking_assert (length () > 0);
return vecdata_[--vecpfx_.num_]; return m_vecdata[--m_vecpfx.m_num];
} }
...@@ -981,7 +981,7 @@ inline void ...@@ -981,7 +981,7 @@ inline void
vec<T, A, vl_embed>::truncate (unsigned size) vec<T, A, vl_embed>::truncate (unsigned size)
{ {
gcc_checking_assert (length () >= size); gcc_checking_assert (length () >= size);
vecpfx_.num_ = size; m_vecpfx.m_num = size;
} }
...@@ -994,8 +994,8 @@ vec<T, A, vl_embed>::quick_insert (unsigned ix, const T &obj) ...@@ -994,8 +994,8 @@ vec<T, A, vl_embed>::quick_insert (unsigned ix, const T &obj)
{ {
gcc_checking_assert (length () < allocated ()); gcc_checking_assert (length () < allocated ());
gcc_checking_assert (ix <= length ()); gcc_checking_assert (ix <= length ());
T *slot = &vecdata_[ix]; T *slot = &m_vecdata[ix];
memmove (slot + 1, slot, (vecpfx_.num_++ - ix) * sizeof (T)); memmove (slot + 1, slot, (m_vecpfx.m_num++ - ix) * sizeof (T));
*slot = obj; *slot = obj;
} }
...@@ -1009,8 +1009,8 @@ inline void ...@@ -1009,8 +1009,8 @@ inline void
vec<T, A, vl_embed>::ordered_remove (unsigned ix) vec<T, A, vl_embed>::ordered_remove (unsigned ix)
{ {
gcc_checking_assert (ix < length ()); gcc_checking_assert (ix < length ());
T *slot = &vecdata_[ix]; T *slot = &m_vecdata[ix];
memmove (slot, slot + 1, (--vecpfx_.num_ - ix) * sizeof (T)); memmove (slot, slot + 1, (--m_vecpfx.m_num - ix) * sizeof (T));
} }
...@@ -1022,7 +1022,7 @@ inline void ...@@ -1022,7 +1022,7 @@ inline void
vec<T, A, vl_embed>::unordered_remove (unsigned ix) vec<T, A, vl_embed>::unordered_remove (unsigned ix)
{ {
gcc_checking_assert (ix < length ()); gcc_checking_assert (ix < length ());
vecdata_[ix] = vecdata_[--vecpfx_.num_]; m_vecdata[ix] = m_vecdata[--m_vecpfx.m_num];
} }
...@@ -1034,9 +1034,9 @@ inline void ...@@ -1034,9 +1034,9 @@ inline void
vec<T, A, vl_embed>::block_remove (unsigned ix, unsigned len) vec<T, A, vl_embed>::block_remove (unsigned ix, unsigned len)
{ {
gcc_checking_assert (ix + len <= length ()); gcc_checking_assert (ix + len <= length ());
T *slot = &vecdata_[ix]; T *slot = &m_vecdata[ix];
vecpfx_.num_ -= len; m_vecpfx.m_num -= len;
memmove (slot, slot + len, (vecpfx_.num_ - ix) * sizeof (T)); memmove (slot, slot + len, (m_vecpfx.m_num - ix) * sizeof (T));
} }
...@@ -1100,7 +1100,7 @@ inline size_t ...@@ -1100,7 +1100,7 @@ inline size_t
vec<T, A, vl_embed>::embedded_size (unsigned alloc) vec<T, A, vl_embed>::embedded_size (unsigned alloc)
{ {
typedef vec<T, A, vl_embed> vec_embedded; typedef vec<T, A, vl_embed> vec_embedded;
return offsetof (vec_embedded, vecdata_) + alloc * sizeof (T); return offsetof (vec_embedded, m_vecdata) + alloc * sizeof (T);
} }
...@@ -1111,8 +1111,8 @@ template<typename T, typename A> ...@@ -1111,8 +1111,8 @@ template<typename T, typename A>
inline void inline void
vec<T, A, vl_embed>::embedded_init (unsigned alloc, unsigned num) vec<T, A, vl_embed>::embedded_init (unsigned alloc, unsigned num)
{ {
vecpfx_.alloc_ = alloc; m_vecpfx.m_alloc = alloc;
vecpfx_.num_ = num; m_vecpfx.m_num = num;
} }
...@@ -1123,8 +1123,8 @@ template<typename T, typename A> ...@@ -1123,8 +1123,8 @@ template<typename T, typename A>
inline void inline void
vec<T, A, vl_embed>::quick_grow (unsigned len) vec<T, A, vl_embed>::quick_grow (unsigned len)
{ {
gcc_checking_assert (length () <= len && len <= vecpfx_.alloc_); gcc_checking_assert (length () <= len && len <= m_vecpfx.m_alloc);
vecpfx_.num_ = len; m_vecpfx.m_num = len;
} }
...@@ -1229,22 +1229,22 @@ public: ...@@ -1229,22 +1229,22 @@ public:
/* Vector operations. */ /* Vector operations. */
bool exists (void) const bool exists (void) const
{ return vec_ != NULL; } { return m_vec != NULL; }
bool is_empty (void) const bool is_empty (void) const
{ return vec_ ? vec_->is_empty () : true; } { return m_vec ? m_vec->is_empty () : true; }
unsigned length (void) const unsigned length (void) const
{ return vec_ ? vec_->length () : 0; } { return m_vec ? m_vec->length () : 0; }
T *address (void) T *address (void)
{ return vec_ ? vec_->vecdata_ : NULL; } { return m_vec ? m_vec->m_vecdata : NULL; }
const T *address (void) const const T *address (void) const
{ return vec_ ? vec_->vecdata_ : NULL; } { return m_vec ? m_vec->m_vecdata : NULL; }
const T &operator[] (unsigned ix) const const T &operator[] (unsigned ix) const
{ return (*vec_)[ix]; } { return (*m_vec)[ix]; }
bool operator!=(const vec &other) const bool operator!=(const vec &other) const
{ return !(*this == other); } { return !(*this == other); }
...@@ -1253,13 +1253,13 @@ public: ...@@ -1253,13 +1253,13 @@ public:
{ return address () == other.address (); } { return address () == other.address (); }
T &operator[] (unsigned ix) T &operator[] (unsigned ix)
{ return (*vec_)[ix]; } { return (*m_vec)[ix]; }
T &last (void) T &last (void)
{ return vec_->last (); } { return m_vec->last (); }
bool space (int nelems) const bool space (int nelems) const
{ return vec_ ? vec_->space (nelems) : nelems == 0; } { return m_vec ? m_vec->space (nelems) : nelems == 0; }
bool iterate (unsigned ix, T *p) const; bool iterate (unsigned ix, T *p) const;
bool iterate (unsigned ix, T **p) const; bool iterate (unsigned ix, T **p) const;
...@@ -1290,7 +1290,7 @@ public: ...@@ -1290,7 +1290,7 @@ public:
/* FIXME - This field should be private, but we need to cater to /* FIXME - This field should be private, but we need to cater to
compilers that have stricter notions of PODness for types. */ compilers that have stricter notions of PODness for types. */
vec<T, A, vl_embed> *vec_; vec<T, A, vl_embed> *m_vec;
}; };
...@@ -1393,8 +1393,8 @@ template<typename T, typename A> ...@@ -1393,8 +1393,8 @@ template<typename T, typename A>
inline bool inline bool
vec<T, A, vl_ptr>::iterate (unsigned ix, T *ptr) const vec<T, A, vl_ptr>::iterate (unsigned ix, T *ptr) const
{ {
if (vec_) if (m_vec)
return vec_->iterate (ix, ptr); return m_vec->iterate (ix, ptr);
else else
{ {
*ptr = 0; *ptr = 0;
...@@ -1416,8 +1416,8 @@ template<typename T, typename A> ...@@ -1416,8 +1416,8 @@ template<typename T, typename A>
inline bool inline bool
vec<T, A, vl_ptr>::iterate (unsigned ix, T **ptr) const vec<T, A, vl_ptr>::iterate (unsigned ix, T **ptr) const
{ {
if (vec_) if (m_vec)
return vec_->iterate (ix, ptr); return m_vec->iterate (ix, ptr);
else else
{ {
*ptr = 0; *ptr = 0;
...@@ -1457,7 +1457,7 @@ vec<T, A, vl_ptr>::copy (ALONE_MEM_STAT_DECL) const ...@@ -1457,7 +1457,7 @@ vec<T, A, vl_ptr>::copy (ALONE_MEM_STAT_DECL) const
{ {
vec<T, A, vl_ptr> new_vec = vNULL; vec<T, A, vl_ptr> new_vec = vNULL;
if (length ()) if (length ())
new_vec.vec_ = vec_->copy (); new_vec.m_vec = m_vec->copy ();
return new_vec; return new_vec;
} }
...@@ -1477,7 +1477,7 @@ vec<T, A, vl_ptr>::reserve (unsigned nelems, bool exact MEM_STAT_DECL) ...@@ -1477,7 +1477,7 @@ vec<T, A, vl_ptr>::reserve (unsigned nelems, bool exact MEM_STAT_DECL)
{ {
bool extend = nelems ? !space (nelems) : false; bool extend = nelems ? !space (nelems) : false;
if (extend) if (extend)
A::reserve (vec_, nelems, exact PASS_MEM_STAT); A::reserve (m_vec, nelems, exact PASS_MEM_STAT);
return extend; return extend;
} }
...@@ -1504,7 +1504,7 @@ template<typename T, typename A> ...@@ -1504,7 +1504,7 @@ template<typename T, typename A>
inline void inline void
vec<T, A, vl_ptr>::create (unsigned nelems MEM_STAT_DECL) vec<T, A, vl_ptr>::create (unsigned nelems MEM_STAT_DECL)
{ {
vec_ = NULL; m_vec = NULL;
if (nelems > 0) if (nelems > 0)
reserve_exact (nelems PASS_MEM_STAT); reserve_exact (nelems PASS_MEM_STAT);
} }
...@@ -1516,8 +1516,8 @@ template<typename T, typename A> ...@@ -1516,8 +1516,8 @@ template<typename T, typename A>
inline void inline void
vec<T, A, vl_ptr>::release (void) vec<T, A, vl_ptr>::release (void)
{ {
if (vec_) if (m_vec)
A::release (vec_); A::release (m_vec);
} }
...@@ -1530,8 +1530,8 @@ template<typename T, typename A> ...@@ -1530,8 +1530,8 @@ template<typename T, typename A>
inline void inline void
vec<T, A, vl_ptr>::splice (vec<T, A, vl_ptr> &src) vec<T, A, vl_ptr>::splice (vec<T, A, vl_ptr> &src)
{ {
if (src.vec_) if (src.m_vec)
vec_->splice (*(src.vec_)); m_vec->splice (*(src.m_vec));
} }
...@@ -1560,7 +1560,7 @@ template<typename T, typename A> ...@@ -1560,7 +1560,7 @@ template<typename T, typename A>
inline T * inline T *
vec<T, A, vl_ptr>::quick_push (const T &obj) vec<T, A, vl_ptr>::quick_push (const T &obj)
{ {
return vec_->quick_push (obj); return m_vec->quick_push (obj);
} }
...@@ -1583,7 +1583,7 @@ template<typename T, typename A> ...@@ -1583,7 +1583,7 @@ template<typename T, typename A>
inline T & inline T &
vec<T, A, vl_ptr>::pop (void) vec<T, A, vl_ptr>::pop (void)
{ {
return vec_->pop (); return m_vec->pop ();
} }
...@@ -1594,8 +1594,8 @@ template<typename T, typename A> ...@@ -1594,8 +1594,8 @@ template<typename T, typename A>
inline void inline void
vec<T, A, vl_ptr>::truncate (unsigned size) vec<T, A, vl_ptr>::truncate (unsigned size)
{ {
if (vec_) if (m_vec)
vec_->truncate (size); m_vec->truncate (size);
else else
gcc_checking_assert (size == 0); gcc_checking_assert (size == 0);
} }
...@@ -1612,7 +1612,7 @@ vec<T, A, vl_ptr>::safe_grow (unsigned len MEM_STAT_DECL) ...@@ -1612,7 +1612,7 @@ vec<T, A, vl_ptr>::safe_grow (unsigned len MEM_STAT_DECL)
unsigned oldlen = length (); unsigned oldlen = length ();
gcc_checking_assert (oldlen <= len); gcc_checking_assert (oldlen <= len);
reserve_exact (len - oldlen PASS_MEM_STAT); reserve_exact (len - oldlen PASS_MEM_STAT);
vec_->quick_grow (len); m_vec->quick_grow (len);
} }
...@@ -1637,8 +1637,8 @@ template<typename T, typename A> ...@@ -1637,8 +1637,8 @@ template<typename T, typename A>
inline void inline void
vec<T, A, vl_ptr>::quick_grow (unsigned len) vec<T, A, vl_ptr>::quick_grow (unsigned len)
{ {
gcc_checking_assert (vec_); gcc_checking_assert (m_vec);
vec_->quick_grow (len); m_vec->quick_grow (len);
} }
...@@ -1650,8 +1650,8 @@ template<typename T, typename A> ...@@ -1650,8 +1650,8 @@ template<typename T, typename A>
inline void inline void
vec<T, A, vl_ptr>::quick_grow_cleared (unsigned len) vec<T, A, vl_ptr>::quick_grow_cleared (unsigned len)
{ {
gcc_checking_assert (vec_); gcc_checking_assert (m_vec);
vec_->quick_grow_cleared (len); m_vec->quick_grow_cleared (len);
} }
...@@ -1662,7 +1662,7 @@ template<typename T, typename A> ...@@ -1662,7 +1662,7 @@ template<typename T, typename A>
inline void inline void
vec<T, A, vl_ptr>::quick_insert (unsigned ix, const T &obj) vec<T, A, vl_ptr>::quick_insert (unsigned ix, const T &obj)
{ {
vec_->quick_insert (ix, obj); m_vec->quick_insert (ix, obj);
} }
...@@ -1686,7 +1686,7 @@ template<typename T, typename A> ...@@ -1686,7 +1686,7 @@ template<typename T, typename A>
inline void inline void
vec<T, A, vl_ptr>::ordered_remove (unsigned ix) vec<T, A, vl_ptr>::ordered_remove (unsigned ix)
{ {
vec_->ordered_remove (ix); m_vec->ordered_remove (ix);
} }
...@@ -1697,7 +1697,7 @@ template<typename T, typename A> ...@@ -1697,7 +1697,7 @@ template<typename T, typename A>
inline void inline void
vec<T, A, vl_ptr>::unordered_remove (unsigned ix) vec<T, A, vl_ptr>::unordered_remove (unsigned ix)
{ {
vec_->unordered_remove (ix); m_vec->unordered_remove (ix);
} }
...@@ -1708,7 +1708,7 @@ template<typename T, typename A> ...@@ -1708,7 +1708,7 @@ template<typename T, typename A>
inline void inline void
vec<T, A, vl_ptr>::block_remove (unsigned ix, unsigned len) vec<T, A, vl_ptr>::block_remove (unsigned ix, unsigned len)
{ {
vec_->block_remove (ix, len); m_vec->block_remove (ix, len);
} }
...@@ -1719,8 +1719,8 @@ template<typename T, typename A> ...@@ -1719,8 +1719,8 @@ template<typename T, typename A>
inline void inline void
vec<T, A, vl_ptr>::qsort (int (*cmp) (const void *, const void *)) vec<T, A, vl_ptr>::qsort (int (*cmp) (const void *, const void *))
{ {
if (vec_) if (m_vec)
vec_->qsort (cmp); m_vec->qsort (cmp);
} }
...@@ -1734,11 +1734,11 @@ inline unsigned ...@@ -1734,11 +1734,11 @@ inline unsigned
vec<T, A, vl_ptr>::lower_bound (T obj, bool (*lessthan)(const T &, const T &)) vec<T, A, vl_ptr>::lower_bound (T obj, bool (*lessthan)(const T &, const T &))
const const
{ {
return vec_ ? vec_->lower_bound (obj, lessthan) : 0; return m_vec ? m_vec->lower_bound (obj, lessthan) : 0;
} }
#if (GCC_VERSION >= 3000) #if (GCC_VERSION >= 3000)
# pragma GCC poison vec_ vecpfx_ vecdata_ # pragma GCC poison m_vec m_vecpfx m_vecdata
#endif #endif
#endif // GCC_VEC_H #endif // GCC_VEC_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment