Lines Matching refs:h
120 # define CALL_CHUNKFUN(h, size) \ argument
121 (((h) -> use_extra_arg) \
122 ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
123 : (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
125 # define CALL_FREEFUN(h, old_chunk) \ argument
127 if ((h) -> use_extra_arg) \
128 (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
130 (*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
143 _obstack_begin (struct obstack *h, in _obstack_begin() argument
169 h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun; in _obstack_begin()
170 h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun; in _obstack_begin()
171 h->chunk_size = size; in _obstack_begin()
172 h->alignment_mask = alignment - 1; in _obstack_begin()
173 h->use_extra_arg = 0; in _obstack_begin()
175 chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size); in _obstack_begin()
178 h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents, in _obstack_begin()
180 h->chunk_limit = chunk->limit in _obstack_begin()
181 = (char *) chunk + h->chunk_size; in _obstack_begin()
184 h->maybe_empty_object = 0; in _obstack_begin()
185 h->alloc_failed = 0; in _obstack_begin()
190 _obstack_begin_1 (struct obstack *h, int size, int alignment, in _obstack_begin_1() argument
216 h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun; in _obstack_begin_1()
217 h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun; in _obstack_begin_1()
218 h->chunk_size = size; in _obstack_begin_1()
219 h->alignment_mask = alignment - 1; in _obstack_begin_1()
220 h->extra_arg = arg; in _obstack_begin_1()
221 h->use_extra_arg = 1; in _obstack_begin_1()
223 chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size); in _obstack_begin_1()
226 h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents, in _obstack_begin_1()
228 h->chunk_limit = chunk->limit in _obstack_begin_1()
229 = (char *) chunk + h->chunk_size; in _obstack_begin_1()
232 h->maybe_empty_object = 0; in _obstack_begin_1()
233 h->alloc_failed = 0; in _obstack_begin_1()
244 _obstack_newchunk (struct obstack *h, int length) in _obstack_newchunk() argument
246 register struct _obstack_chunk *old_chunk = h->chunk; in _obstack_newchunk()
249 register long obj_size = h->next_free - h->object_base; in _obstack_newchunk()
255 new_size = (obj_size + length) + (obj_size >> 3) + h->alignment_mask + 100; in _obstack_newchunk()
256 if (new_size < h->chunk_size) in _obstack_newchunk()
257 new_size = h->chunk_size; in _obstack_newchunk()
260 new_chunk = CALL_CHUNKFUN (h, new_size); in _obstack_newchunk()
263 h->chunk = new_chunk; in _obstack_newchunk()
265 new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size; in _obstack_newchunk()
269 __PTR_ALIGN ((char *) new_chunk, new_chunk->contents, h->alignment_mask); in _obstack_newchunk()
274 if (h->alignment_mask + 1 >= DEFAULT_ALIGNMENT) in _obstack_newchunk()
279 = ((COPYING_UNIT *)h->object_base)[i]; in _obstack_newchunk()
289 object_base[i] = h->object_base[i]; in _obstack_newchunk()
294 if (! h->maybe_empty_object in _obstack_newchunk()
295 && (h->object_base in _obstack_newchunk()
297 h->alignment_mask))) in _obstack_newchunk()
300 CALL_FREEFUN (h, old_chunk); in _obstack_newchunk()
303 h->object_base = object_base; in _obstack_newchunk()
304 h->next_free = h->object_base + obj_size; in _obstack_newchunk()
306 h->maybe_empty_object = 0; in _obstack_newchunk()
318 int _obstack_allocated_p (struct obstack *h, void *obj);
321 _obstack_allocated_p (struct obstack *h, void *obj) in _obstack_allocated_p() argument
326 lp = (h)->chunk; in _obstack_allocated_p()
344 __obstack_free (struct obstack *h, void *obj) in __obstack_free() argument
349 lp = h->chunk; in __obstack_free()
356 CALL_FREEFUN (h, lp); in __obstack_free()
360 h->maybe_empty_object = 1; in __obstack_free()
364 h->object_base = h->next_free = (char *) (obj); in __obstack_free()
365 h->chunk_limit = lp->limit; in __obstack_free()
366 h->chunk = lp; in __obstack_free()
380 _obstack_memory_used (struct obstack *h) in strong_alias()
385 for (lp = h->chunk; lp != 0; lp = lp->prev) in strong_alias()