1 %---------------------------------------------------------------*
3 \section{Executable code for random primitives}
5 %---------------------------------------------------------------*
10 I_ __GenSymCounter = 0;
11 I_ __SeqWorldCounter = 0;
16 return(__GenSymCounter++);
19 resetGenSymZh(STG_NO_ARGS) /* it's your funeral */
22 return(__GenSymCounter);
26 byteArrayHasNUL__ (ba, len)
32 for (i = 0; i < len; i++) {
33 if (*(ba + i) == '\0') {
38 return(0); /* false */
42 stg_exit (n) /* can't call regular "exit" from Haskell
43 because it has no return value */
46 /* Storage manager shutdown */
49 return(0); /* GCC warning food */
53 This may not be the right place for this: (ToDo?)
57 _stgAssert (filename, linenum)
62 fprintf(stderr, "ASSERTION FAILED: file %s, line %u\n", filename, linenum);
68 A little helper for the native code generator (it can't stomach
72 newArrZh_init(result, n, init)
79 SET_MUTUPLE_HDR(result,ArrayOfPtrs_info,CCC,MUTUPLE_VHS+n,0)
80 for (p = result+MUTUPLE_HS; p < (result+MUTUPLE_HS+n); p++) {
87 Phantom info table vectors for multiple constructor primitive types that
88 might have to perform a DynamicReturn (just Bool at the moment).
91 ED_RO_(PrelBase_False_inregs_info);
92 ED_RO_(PrelBase_True_inregs_info);
94 #ifndef aix_TARGET_OS /* AIX gives link errors with this as a const (RO assembler section) */
97 W_ PrelBase_Bool_itblvtbl[] = {
98 (W_) PrelBase_False_inregs_info,
99 (W_) PrelBase_True_inregs_info