Skip to content

Commit

Permalink
vec.h (class vec_prefix): Change into struct.
Browse files Browse the repository at this point in the history
	* vec.h (class vec_prefix): Change into struct.
	Rename field alloc_PRIVATE_ back to alloc_.
	Rename field num_PRIVATE_ to num_.
	Update all users.
	(class vec<T, A, vl_embed>): Rename field pfx_PRIVATE_ to vecpfx_.
	Rename field data_PRIVATE_ to vecdata_.
	Update all users.
	(class vec<T, A, vl_ptr>): Make every field public.
	Rename field vec_PRIVATE_ back to vec_.
	Update all users.

From-SVN: r193675
  • Loading branch information
jakubjelinek committed Nov 20, 2012
1 parent e98fc6d commit 26da79f
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 101 deletions.
13 changes: 13 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
2012-11-20 Jakub Jelinek <[email protected]>

* vec.h (class vec_prefix): Change into struct.
Rename field alloc_PRIVATE_ back to alloc_.
Rename field num_PRIVATE_ to num_.
Update all users.
(class vec<T, A, vl_embed>): Rename field pfx_PRIVATE_ to vecpfx_.
Rename field data_PRIVATE_ to vecdata_.
Update all users.
(class vec<T, A, vl_ptr>): Make every field public.
Rename field vec_PRIVATE_ back to vec_.
Update all users.

2012-11-20 Richard Sandiford <[email protected]>

PR middle-end/55403
Expand Down
14 changes: 7 additions & 7 deletions gcc/vec.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ vec_descriptor (const char *name, int line, const char *function)
/* Account the overhead. */

void
vec_prefix::register_overhead_PRIVATE_ (size_t size, const char *name, int line,
const char *function)
vec_prefix::register_overhead (size_t size, const char *name, int line,
const char *function)
{
struct vec_descriptor *loc = vec_descriptor (name, line, function);
struct ptr_hash_entry *p = XNEW (struct ptr_hash_entry);
Expand All @@ -148,7 +148,7 @@ vec_prefix::register_overhead_PRIVATE_ (size_t size, const char *name, int line,
/* Notice that the memory allocated for the vector has been freed. */

void
vec_prefix::release_overhead_PRIVATE_ (void)
vec_prefix::release_overhead (void)
{
PTR *slot = htab_find_slot_with_hash (ptr_hash, this,
htab_hash_pointer (this),
Expand All @@ -165,16 +165,16 @@ vec_prefix::release_overhead_PRIVATE_ (void)
exponentially. PFX is the control data for the vector. */

unsigned
vec_prefix::calculate_allocation_PRIVATE_ (vec_prefix *pfx, unsigned reserve,
bool exact)
vec_prefix::calculate_allocation (vec_prefix *pfx, unsigned reserve,
bool exact)
{
unsigned alloc = 0;
unsigned num = 0;

if (pfx)
{
alloc = pfx->alloc_PRIVATE_;
num = pfx->num_PRIVATE_;
alloc = pfx->alloc_;
num = pfx->num_;
}
else if (!reserve)
/* If there's no vector, and we've not requested anything, then we
Expand Down
Loading

0 comments on commit 26da79f

Please sign in to comment.