1 /******************************** -*- C -*- ****************************
2  *
3  *	GNU Smalltalk generic inclusions.
4  *
5  *
6  ***********************************************************************/
7 
8 /***********************************************************************
9  *
10  * Copyright 1988,89,90,91,92,94,95,99,2000,2001,2002,2006,2008,2009
11  * Free Software Foundation, Inc.
12  * Written by Steve Byrne.
13  *
14  * This file is part of GNU Smalltalk.
15  *
16  * GNU Smalltalk is free software; you can redistribute it and/or modify it
17  * under the terms of the GNU General Public License as published by the Free
18  * Software Foundation; either version 2, or (at your option) any later
19  * version.
20  *
21  * Linking GNU Smalltalk statically or dynamically with other modules is
22  * making a combined work based on GNU Smalltalk.  Thus, the terms and
23  * conditions of the GNU General Public License cover the whole
24  * combination.
25  *
26  * In addition, as a special exception, the Free Software Foundation
27  * give you permission to combine GNU Smalltalk with free software
28  * programs or libraries that are released under the GNU LGPL and with
29  * independent programs running under the GNU Smalltalk virtual machine.
30  *
31  * You may copy and distribute such a system following the terms of the
32  * GNU GPL for GNU Smalltalk and the licenses of the other code
33  * concerned, provided that you include the source code of that other
34  * code when and as the GNU GPL requires distribution of source code.
35  *
36  * Note that people who make modified versions of GNU Smalltalk are not
37  * obligated to grant this special exception for their modified
38  * versions; it is their choice whether to do so.  The GNU General
39  * Public License gives permission to release a modified version without
40  * this exception; this exception also makes it possible to release a
41  * modified version which carries forward this exception.
42  *
43  * GNU Smalltalk is distributed in the hope that it will be useful, but WITHOUT
44  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
45  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
46  * more details.
47  *
48  * You should have received a copy of the GNU General Public License along with
49  * GNU Smalltalk; see the file COPYING.  If not, write to the Free Software
50  * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
51  *
52  ***********************************************************************/
53 
54 #ifndef GST_GSTPRIV_H
55 #define GST_GSTPRIV_H
56 
57 #include "config.h"
58 
59 #include <sys/types.h>
60 #include <stdio.h>
61 #include <stddef.h>
62 #include <setjmp.h>
63 #include <assert.h>
64 #include <stdlib.h>
65 #include <string.h>
66 #include <obstack.h>
67 #include <fcntl.h>
68 #include <stdarg.h>
69 #include <math.h>
70 #include <float.h>
71 #include <errno.h>
72 #include <signal.h>
73 #include <sys/stat.h>
74 #include <limits.h>
75 #include <ctype.h>
76 #include <wchar.h>
77 #include <dirent.h>
78 #include <sys/time.h>
79 #include <time.h>
80 
81 #ifdef HAVE_CRT_EXTERNS_H
82 #include <crt_externs.h>
83 #endif
84 
85 #ifdef HAVE_SYS_RESOURCE_H
86 #include <sys/resource.h>
87 #endif
88 
89 #ifdef HAVE_EXECINFO_H
90 #include <execinfo.h>
91 #endif
92 
93 #ifdef HAVE_SYS_FILE_H
94 #include <sys/file.h>
95 #endif
96 
97 #ifdef HAVE_UNISTD_H
98 #include <unistd.h>
99 #endif
100 
101 #ifdef HAVE_SYS_MMAN_H
102 #include <sys/mman.h>
103 #endif
104 
105 #ifdef HAVE_STDINT_H
106 #include <stdint.h>
107 #endif
108 
109 #ifdef HAVE_INTTYPES_H
110 #include <inttypes.h>
111 #endif
112 
113 #ifdef HAVE_SIGSEGV_H
114 #include "sigsegv.h"
115 #endif
116 
117 #include "gst.h"
118 
119 /* Convenience macros to test the versions of GCC.  Note - they won't
120    work for GCC1, since the _MINOR macros were not defined then, but
121    we don't have anything interesting to test for that. :-) */
122 #if defined __GNUC__ && defined __GNUC_MINOR__
123 # define GNUC_PREREQ(maj, min) \
124 	((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
125 #else
126 # define GNUC_PREREQ(maj, min) 0
127 #endif
128 
129 /* For internal functions, we can use the ELF hidden attribute to
130    improve code generation.  Unluckily, this is only in GCC 3.2 and
131    later */
132 #ifdef HAVE_VISIBILITY_HIDDEN
133 #define ATTRIBUTE_HIDDEN __attribute__ ((visibility ("hidden")))
134 #else
135 #define ATTRIBUTE_HIDDEN
136 #endif
137 
138 /* At some point during the GCC 2.96 development the `pure' attribute
139    for functions was introduced.  We don't want to use it
140    unconditionally (although this would be possible) since it
141    generates warnings.
142 
143    GCC 2.96 also introduced branch prediction hints for basic block
144    reordering.  We use a shorter syntax than the wordy one that GCC
145    wants.  */
146 #if GNUC_PREREQ (2, 96)
147 #define UNCOMMON(x) (__builtin_expect ((x) != 0, 0))
148 #define COMMON(x)   (__builtin_expect ((x) != 0, 1))
149 #else
150 #define UNCOMMON(x) (x)
151 #define COMMON(x)   (x)
152 #endif
153 
154 /* Prefetching macros.  The NTA version is for a read that has no
155    temporal locality.  The second argument is the kind of prefetch
156    we want, using the flags that follow (T0, T1, T2, NTA follow
157    the names of the instructions in the SSE instruction set).  The
158    flags are hints, there is no guarantee that the instruction set
159    has the combination that you ask for -- just trust the compiler.
160 
161    There are three macros.  PREFETCH_ADDR is for isolated prefetches,
162    for example it is used in the garbage collector's marking loop
163    to be reasonably sure that OOPs are in the cache before they're
164    marked.  PREFETCH_START and PREFETCH_LOOP usually go together, one
165    in the header of the loop and one in the middle.  However, you may
166    use PREFETCH_START only for small loops, and PREFETCH_LOOP only if
167    you know that the loop is invoked often (this is done for alloc_oop,
168    for example, to keep the next allocated OOPs in the cache).
169    PREF_BACKWARDS is for use with PREFETCH_START/PREFETCH_LOOP.  */
170 #define PREF_READ 0
171 #define PREF_WRITE 1
172 #define PREF_BACKWARDS 2
173 #define PREF_T0 0
174 #define PREF_T1 4
175 #define PREF_T2 8
176 #define PREF_NTA 12
177 
178 #if GNUC_PREREQ (3, 1)
179 #define DO_PREFETCH(x, distance, k) \
180   __builtin_prefetch (((char *) (x)) \
181 		      + (((k) & PREF_BACKWARDS ? -(distance) : (distance)) \
182 			 << L1_CACHE_SHIFT), \
183 		      (k) & PREF_WRITE, \
184 		      3 - (k) / (PREF_NTA / 3))
185 #else
186 #define DO_PREFETCH(x, distance, kind) ((void)(x))
187 #endif
188 
189 #define PREFETCH_START(x, k) do { \
190   const char *__addr = (const char *) (x); \
191   DO_PREFETCH (__addr, 0, (k)); \
192   if (L1_CACHE_SHIFT >= 7) break; \
193   DO_PREFETCH (__addr, 1, (k)); \
194   if (L1_CACHE_SHIFT == 6) break; \
195   DO_PREFETCH (__addr, 2, (k)); \
196   DO_PREFETCH (__addr, 3, (k)); \
197 } while (0)
198 
199 #define PREFETCH_LOOP(x, k) \
200   DO_PREFETCH ((x), (L1_CACHE_SHIFT >= 7 ? 1 : 128 >> L1_CACHE_SHIFT), (k));
201 
202 #define PREFETCH_ADDR(x, k) \
203   DO_PREFETCH ((x), 0, (k));
204 
205 /* Synchronization primitives.  */
206 #define __sync_swap(ptr, val) \
207   ({ __typeof__ (*(ptr)) _x; \
208    do _x = *(ptr); while (!__sync_bool_compare_and_swap ((ptr), (_x), (val))); \
209    _x; })
210 
211 /* Kill a warning when using GNU C.  Note that this allows using
212    break or continue inside a macro, unlike do...while(0) */
213 #ifdef __GNUC__
214 #define BEGIN_MACRO ((void) (
215 #define END_MACRO ))
216 #else
217 #define BEGIN_MACRO if (1)
218 #define END_MACRO else (void)0
219 #endif
220 
221 
222 /* ENABLE_SECURITY enables security checks in the primitives as well as
223    special marking of untrusted objects.  Note that the code in the
224    class library to perform the security checks will be present
225    notwithstanding the setting of this flag, but they will be disabled
226    because the corresponding primitives will be made non-working.  We
227    define it here with no configure-time options because it causes
228    testsuite failures.  */
229 #define ENABLE_SECURITY
230 
231 /* OPTIMIZE disables many checks, including consistency checks at GC
232    time and bounds checking on instance variable accesses (not on #at:
233    and #at:put: which would violate language semantics).  It can a)
234    greatly speed up code by simplifying the interpreter's code b) make
235    debugging painful because you know of a bug only when it's too
236    late.  It is undefined because the Makefiles take care of defining
237    it for optimized builds.  Bounds-checking and other errors will
238    call abort().  */
239 /* #define OPTIMIZE */
240 
241 typedef unsigned char gst_uchar;
242 
243 #ifdef NO_INLINES
244 #define inline
245 #else
246 #  if defined (__GNUC__)
247 #    undef inline
248 #    define inline __inline__	/* let's not lose when --ansi is
249 				   specified */
250 #  endif
251 #endif
252 
253 /* If they have no const, they're likely to have no volatile, either.  */
254 #ifdef const
255 #define volatile
256 #endif
257 
258 #ifndef HAVE_STRDUP
259 extern char *strdup ();
260 /* else it is in string.h */
261 #endif
262 
263 
264 /* Run-time flags are allocated from the top, while those
265    that live across image saves/restores are allocated
266    from the bottom.
267 
268    bit 0-3: reserved for distinguishing byte objects and saving their size.
269    bit 4-11: non-volatile bits (special kinds of objects).
270    bit 12-23: volatile bits (GC/JIT-related).
271    bit 24-30: reserved for counting things.
272    bit 31: unused to avoid signedness mess. */
273 enum {
274   /* Place to save various OOP counts (how many fields we have marked
275      in the object, how many pointer instance variables there are,
276      etc.).  Here is a distribution of frequencies in a standard image:
277        2 to   31 words      24798 objects (96.10%)
278       32 to   63 words        816 objects ( 3.16%)
279       64 to   95 words         82 objects ( 0.32%)
280       96 to  127 words         54 objects ( 0.21%)
281      128 or more words         54 objects ( 0.21%)
282 
283     which I hope justifies the choice :-) */
284   F_COUNT = (int) 0x7F000000U,
285   F_COUNT_SHIFT = 24,
286 
287   /* Set if the object is reachable, during the mark phases of oldspace
288      garbage collection.  */
289   F_REACHABLE = 0x800000U,
290 
291   /* Set if a translation to native code is available, when running
292      with the JIT compiler enabled.  */
293   F_XLAT = 0x400000U,
294 
295   /* Set if a translation to native code is used by the currently
296      reachable contexts.  */
297   F_XLAT_REACHABLE = 0x200000U,
298 
299   /* Set if a translation to native code is available but not used by
300      the reachable contexts at the time of the last GC.  We give
301      another chance to the object, but if the translation is not used
302      for two consecutive GCs we discard it.  */
303   F_XLAT_2NDCHANCE = 0x100000U,
304 
305   /* Set if a translation to native code was discarded for this
306      object (either because the programmer asked for this, or because
307      the method conflicted with a newly-installed method).  */
308   F_XLAT_DISCARDED = 0x80000U,
309 
310   /* One of this is set for objects that live in newspace.  */
311   F_SPACES = 0x60000U,
312   F_EVEN = 0x40000U,
313   F_ODD = 0x20000U,
314 
315   /* Set if the OOP is allocated by the pools of contexts maintained
316      in interp.c (maybe it belongs above...) */
317   F_POOLED = 0x10000U,
318 
319   /* Set if the bytecodes in the method have been verified. */
320   F_VERIFIED = 0x8000U,
321 
322   /* The grouping of all the flags which are not valid across image
323      saves and loads.  */
324   F_RUNTIME = 0xFF8000U,
325 
326   /* Set if the references to the instance variables of the object
327      are weak.  */
328   F_WEAK = 0x10U,
329 
330   /* Set if the object is read-only.  */
331   F_READONLY = 0x20U,
332 
333   /* Set if the object is a context and hence its instance variables
334      are only valid up to the stack pointer.  */
335   F_CONTEXT = 0x40U,
336 
337   /* Answer whether we want to mark the key based on references found
338      outside the object.  */
339   F_EPHEMERON = 0x80U,
340 
341   /* Set for objects that live in oldspace.  */
342   F_OLD = 0x100U,
343 
344   /* Set together with F_OLD for objects that live in fixedspace.  */
345   F_FIXED = 0x200U,
346 
347   /* Set for untrusted classes, instances of untrusted classes,
348      and contexts whose receiver is untrusted.  */
349   F_UNTRUSTED = 0x400U,
350 
351   /* Set for objects that were loaded from the image.  We never
352      garbage collect their contents, only the OOPs.  */
353   F_LOADED = 0x800U,
354 
355   /* Set to the number of bytes unused in an object with byte-sized
356      instance variables.  Note that this field and the following one
357      should be initialized only by INIT_UNALIGNED_OBJECT (not really
358      aesthetic but...) */
359   EMPTY_BYTES = (sizeof (PTR) - 1),
360 
361   /* A bit more than what is identified by EMPTY_BYTES.  Selects some
362      bits that are never zero if and only if this OOP identifies an
363      object with byte instance variables.  */
364   F_BYTE = 15
365 };
366 
367 /* Answer whether a method, OOP, has already been verified. */
368 #define IS_OOP_VERIFIED(oop) \
369   (((oop)->flags & F_VERIFIED) != 0)
370 
371 /* Answer whether an object, OOP, is weak.  */
372 #define IS_OOP_WEAK(oop) \
373   (((oop)->flags & F_WEAK) != 0)
374 
375 /* Answer whether an object, OOP, is readonly.  */
376 #define IS_OOP_READONLY(oop) \
377   (IS_INT ((oop)) || ((oop)->flags & F_READONLY))
378 
379 /* Set whether an object, OOP, is readonly or readwrite.  */
380 #define MAKE_OOP_READONLY(oop, ro) \
381   (((oop)->flags &= ~F_READONLY), \
382    ((oop)->flags |= (ro) ? F_READONLY : 0))
383 
384 #ifdef ENABLE_SECURITY
385 
386 /* Answer whether an object, OOP, is untrusted.  */
387 #define IS_OOP_UNTRUSTED(oop) \
388   (!IS_INT ((oop)) && ((oop)->flags & F_UNTRUSTED))
389 
390 /* Set whether an object, OOP, is trusted or untrusted.  */
391 #define MAKE_OOP_UNTRUSTED(oop, untr) \
392   (((oop)->flags &= ~F_UNTRUSTED), \
393    ((oop)->flags |= (untr) ? F_UNTRUSTED : 0))
394 
395 #else
396 #define IS_OOP_UNTRUSTED(oop) (false)
397 #define MAKE_OOP_UNTRUSTED(oop, untr) ((void)0)
398 #endif
399 
400 /* Set whether an object, OOP, has ephemeron semantics.  */
401 #define MAKE_OOP_EPHEMERON(oop) \
402   (oop)->flags |= F_EPHEMERON;
403 
404 
405 /* the current execution stack pointer */
406 #ifndef ENABLE_JIT_TRANSLATION
407 # define sp		_gst_sp
408 #endif
409 
410 /* The VM's stack pointer */
411 extern OOP *sp
412   ATTRIBUTE_HIDDEN;
413 
414 /* Some useful constants */
415 extern OOP _gst_nil_oop
416   ATTRIBUTE_HIDDEN, _gst_true_oop
417   ATTRIBUTE_HIDDEN, _gst_false_oop
418   ATTRIBUTE_HIDDEN;
419 
420 /* Some stack operations */
421 #define UNCHECKED_PUSH_OOP(oop) \
422   (*++sp = (oop))
423 
424 #define UNCHECKED_SET_TOP(oop) \
425   (*sp = (oop))
426 
427 #ifndef OPTIMIZE
428 #define PUSH_OOP(oop) \
429   do { \
430     OOP __pushOOP = (oop); \
431     if (IS_OOP (__pushOOP) && !IS_OOP_VALID (__pushOOP)) \
432       abort (); \
433     UNCHECKED_PUSH_OOP (__pushOOP); \
434   } while (0)
435 #else
436 #define PUSH_OOP(oop) \
437   do { \
438     OOP __pushOOP = (oop); \
439     UNCHECKED_PUSH_OOP (__pushOOP); \
440   } while (0)
441 #endif
442 
443 #define POP_OOP() \
444   (*sp--)
445 
446 #define POP_N_OOPS(n) \
447   (sp -= (n))
448 
449 #define UNPOP(n) \
450   (sp += (n))
451 
452 #define STACKTOP() \
453   (*sp)
454 
455 #ifndef OPTIMIZE
456 #define SET_STACKTOP(oop) \
457   do { \
458     OOP __pushOOP = (oop); \
459     if (IS_OOP (__pushOOP) && !IS_OOP_VALID (__pushOOP)) \
460       abort (); \
461     UNCHECKED_SET_TOP(__pushOOP); \
462   } while (0)
463 #else
464 #define SET_STACKTOP(oop) \
465   do { \
466     OOP __pushOOP = (oop); \
467     UNCHECKED_SET_TOP(__pushOOP); \
468   } while (0)
469 #endif
470 
471 #define SET_STACKTOP_INT(i) \
472   UNCHECKED_SET_TOP(FROM_INT(i))
473 
474 #define SET_STACKTOP_BOOLEAN(exp) \
475   UNCHECKED_SET_TOP((exp) ? _gst_true_oop : _gst_false_oop)
476 
477 #define STACK_AT(i) \
478   (sp[-(i)])
479 
480 #define PUSH_INT(i) \
481   UNCHECKED_PUSH_OOP(FROM_INT(i))
482 
483 #define POP_INT() \
484   TO_INT(POP_OOP())
485 
486 #define PUSH_BOOLEAN(exp) \
487   PUSH_OOP((exp) ? _gst_true_oop : _gst_false_oop)
488 
489 
490 /* Answer whether CLASS is the class that the object pointed to by OOP
491    belongs to.  OOP can also be a SmallInteger.  */
492 #define IS_CLASS(oop, class) \
493   (OOP_INT_CLASS(oop) == class)
494 
495 /* Answer the CLASS that the object pointed to by OOP belongs to.  OOP
496    can also be a SmallInteger. */
497 #define OOP_INT_CLASS(oop) \
498   (IS_INT(oop) ? _gst_small_integer_class : OOP_CLASS(oop))
499 
500 
501 /* Answer whether OOP is nil.  */
502 #define IS_NIL(oop) \
503   ((OOP)(oop) == _gst_nil_oop)
504 
505 
506 /* This macro should only be used right after an alloc_oop, when the
507    emptyBytes field is guaranteed to be zero.
508 
509    Note that F_BYTE is a bit more than EMPTY_BYTES, so that if value
510    is a multiple of sizeof (PTR) the flags identified by F_BYTE are
511    not zero.  */
512 #define INIT_UNALIGNED_OBJECT(oop, value) \
513     ((oop)->flags |= sizeof (PTR) | (value))
514 
515 
516 /* Generally useful conversion functions */
517 #define SIZE_TO_BYTES(size) \
518   ((size) * sizeof (PTR))
519 
520 #define BYTES_TO_SIZE(bytes) \
521   ((bytes) / sizeof (PTR))
522 
523 #ifdef __GNUC__
524 #define no_opt(x)	({ __typeof__ ((x)) _result; \
525 			 asm ("" : "=r" (_result) : "0" ((x))); _result; })
526 #define barrier()       asm ("")
527 #else
528 #define no_opt(x)	(x)
529 #define barrier()
530 #endif
531 
532 /* integer conversions and some information on SmallIntegers.  */
533 
534 #define TO_INT(oop) \
535   ((intptr_t)(oop) >> 1)
536 
537 #define FROM_INT(i) \
538   (OOP)( ((intptr_t)(i) << 1) + 1)
539 
540 #define ST_INT_SIZE        ((sizeof (PTR) * 8) - 2)
541 #define MAX_ST_INT         ((1L << ST_INT_SIZE) - 1)
542 #define MIN_ST_INT         ( ~MAX_ST_INT)
543 #define INT_OVERFLOW(i)    (((i) ^ ((i) << 1)) < 0)
544 #define OVERFLOWING_INT    (MAX_ST_INT + 1)
545 
546 #define INCR_INT(i)         ((OOP) (((intptr_t)i) + 2))	/* 1 << 1 */
547 #define DECR_INT(i)         ((OOP) (((intptr_t)i) - 2))	/* 1 << 1 */
548 
549 /* Endian conversions, using networking functions if they do
550    the correct job (that is, on 32-bit little-endian systems)
551    because they are likely to be optimized.  */
552 
553 #if SIZEOF_OOP == 4
554 # if !defined(WORDS_BIGENDIAN) && defined (HAVE_SOCKETS)
555 #  define BYTE_INVERT(x) htonl((x))
556 # elif defined _OS_OSBYTEORDERPPC_H
557 #  define BYTE_INVERT(x) OSReadSwapInt32(&(x), 0)
558 # else
559 #  define BYTE_INVERT(x) \
560         ((uintptr_t)((((uintptr_t)(x) & 0x000000ffU) << 24) | \
561                      (((uintptr_t)(x) & 0x0000ff00U) <<  8) | \
562                      (((uintptr_t)(x) & 0x00ff0000U) >>  8) | \
563                      (((uintptr_t)(x) & 0xff000000U) >> 24)))
564 # endif
565 
566 #else /* SIZEOF_OOP == 8 */
567 # if defined _OS_OSBYTEORDERPPC_H
568 #  define BYTE_INVERT(x) OSReadSwapInt64(&(x), 0)
569 # else
570 #  define BYTE_INVERT(x) \
571         ((uintptr_t)((((uintptr_t)(x) & 0x00000000000000ffU) << 56) | \
572                      (((uintptr_t)(x) & 0x000000000000ff00U) << 40) | \
573                      (((uintptr_t)(x) & 0x0000000000ff0000U) << 24) | \
574                      (((uintptr_t)(x) & 0x00000000ff000000U) <<  8) | \
575                      (((uintptr_t)(x) & 0x000000ff00000000U) >>  8) | \
576                      (((uintptr_t)(x) & 0x0000ff0000000000U) >> 24) | \
577                      (((uintptr_t)(x) & 0x00ff000000000000U) >> 40) | \
578                      (((uintptr_t)(x) & 0xff00000000000000U) >> 56)))
579 # endif
580 #endif /* SIZEOF_OOP == 8 */
581 
582 /* The standard min/max macros...  */
583 
584 #ifndef ABS
585 #define ABS(x) (x >= 0 ? x : -x)
586 #endif
587 #ifndef MAX
588 #define MAX(x, y) 		( ((x) > (y)) ? (x) : (y) )
589 #endif
590 #ifndef MIN
591 #define MIN(x, y) 		( ((x) > (y)) ? (y) : (x) )
592 #endif
593 
594 #include "ansidecl.h"
595 #include "mathl.h"
596 #include "socketx.h"
597 #include "strspell.h"
598 #include "alloc.h"
599 #include "md-config.h"
600 #include "avltrees.h"
601 #include "rbtrees.h"
602 
603 #include "tree.h"
604 #include "files.h"
605 #include "input.h"
606 #include "callin.h"
607 #include "cint.h"
608 #include "dict.h"
609 #include "heap.h"
610 #include "lex.h"
611 #include "gst-parse.h"
612 #include "oop.h"
613 #include "byte.h"
614 #include "sym.h"
615 #include "comp.h"
616 #include "interp.h"
617 #include "events.h"
618 #include "opt.h"
619 #include "save.h"
620 #include "str.h"
621 #include "sysdep.h"
622 #include "xlat.h"
623 #include "mpz.h"
624 #include "print.h"
625 #include "security.h"
626 #include "real.h"
627 #include "sockets.h"
628 
629 /* Include this last, it has the bad habit of #defining printf
630    and this fools gcc's __attribute__ (format) */
631 #include "snprintfv/printf.h"
632 
633 #undef obstack_init
634 #define obstack_init(h)                                         \
635   _obstack_begin ((h), 0, ALIGNOF_LONG_DOUBLE,                \
636                   (void *(*) (long)) obstack_chunk_alloc,       \
637                   (void (*) (void *)) obstack_chunk_free)
638 
639 #undef obstack_begin
640 #define obstack_begin(h, size)                                  \
641   _obstack_begin ((h), (size), ALIGNOF_LONG_DOUBLE,           \
642                   (void *(*) (long)) obstack_chunk_alloc,       \
643                   (void (*) (void *)) obstack_chunk_free)
644 
645 #include "oop.inl"
646 #include "dict.inl"
647 #include "interp.inl"
648 #include "comp.inl"
649 
650 #endif /* GST_GSTPRIV_H */
651