Minor cleanups to a few closure types: we don't use StgPtr in
Closures.h anymore.
/* ----------------------------------------------------------------------------
/* ----------------------------------------------------------------------------
- * $Id: Closures.h,v 1.17 2000/03/31 03:09:35 hwloidl Exp $
+ * $Id: Closures.h,v 1.18 2000/08/15 11:48:06 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
*
* (c) The GHC Team, 1998-1999
*
typedef struct StgMutClosure_ {
StgHeader header;
typedef struct StgMutClosure_ {
StgHeader header;
struct StgMutClosure_ *mut_link;
struct StgClosure_ *payload[0];
} StgMutClosure;
struct StgMutClosure_ *mut_link;
struct StgClosure_ *payload[0];
} StgMutClosure;
StgHeader header;
StgWord n_args;
StgClosure *fun;
StgHeader header;
StgWord n_args;
StgClosure *fun;
+ StgClosure *payload[0];
} StgPAP;
typedef struct {
StgHeader header;
StgWord n_args;
StgClosure *fun;
} StgPAP;
typedef struct {
StgHeader header;
StgWord n_args;
StgClosure *fun;
+ StgClosure *payload[0];
} StgAP_UPD;
typedef struct {
} StgAP_UPD;
typedef struct {
- StgHeader header;
- StgWord n_ptrs;
- StgWord n_words;
- StgWord n_instrs;
- StgWord stgexpr;
- StgPtr payload[0];
+ StgHeader header;
+ StgWord n_ptrs;
+ StgWord n_words;
+ StgWord n_instrs;
+ StgWord stgexpr;
+ StgClosure *payload[0];
} StgBCO;
typedef struct {
} StgBCO;
typedef struct {
/* this closure is hanging at the end of a blocking queue in (see RBH.c) */
typedef struct StgRBHSave_ {
StgHeader header;
/* this closure is hanging at the end of a blocking queue in (see RBH.c) */
typedef struct StgRBHSave_ {
StgHeader header;
- StgPtr payload[0]; /* 2 words ripped out of the guts of the */
+ StgClosure *payload[0]; /* 2 words ripped out of the guts of the */
} StgRBHSave; /* closure holding the blocking queue */
typedef struct StgRBH_ {
} StgRBHSave; /* closure holding the blocking queue */
typedef struct StgRBH_ {
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: Printer.c,v 1.27 2000/06/15 13:23:52 daan Exp $
+ * $Id: Printer.c,v 1.28 2000/08/15 11:48:06 simonmar Exp $
*
* (c) The GHC Team, 1994-2000.
*
*
* (c) The GHC Team, 1994-2000.
*
fprintf(stderr,"AP_UPD("); printPtr((StgPtr)ap->fun);
for (i = 0; i < ap->n_args; ++i) {
fprintf(stderr,", ");
fprintf(stderr,"AP_UPD("); printPtr((StgPtr)ap->fun);
for (i = 0; i < ap->n_args; ++i) {
fprintf(stderr,", ");
- printPtr(ap->payload[i]);
+ printPtr((P_)ap->payload[i]);
}
fprintf(stderr,")\n");
break;
}
fprintf(stderr,")\n");
break;
case TSO:
fprintf(stderr,"TSO(");
case TSO:
fprintf(stderr,"TSO(");
- fprintf(stderr,"%d (%x)",
- stgCast(StgTSO*,obj)->id, stgCast(StgTSO*,obj));
+ fprintf(stderr,"%d (%p)",((StgTSO*)obj)->id, (StgTSO*)obj);
fprintf(stderr,")\n");
break;
fprintf(stderr,")\n");
break;
+void findPtr(P_ p); /* keep gcc -Wall happy */
+
/* ----------------------------------------------------------------------------
/* ----------------------------------------------------------------------------
- * $Id: RtsAPI.c,v 1.18 2000/08/07 23:37:23 qrczak Exp $
+ * $Id: RtsAPI.c,v 1.19 2000/08/15 11:48:06 simonmar Exp $
*
* (c) The GHC Team, 1998-2000
*
*
* (c) The GHC Team, 1998-2000
*
SET_HDR(ap, &AP_UPD_info, CCS_SYSTEM);
ap->n_args = 1;
ap->fun = f;
SET_HDR(ap, &AP_UPD_info, CCS_SYSTEM);
ap->n_args = 1;
ap->fun = f;
- ap->payload[0] = (P_)arg;
return (StgClosure *)ap;
}
return (StgClosure *)ap;
}
/* ---------------------------------------------------------------------------
/* ---------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.74 2000/08/03 11:28:35 simonmar Exp $
+ * $Id: Schedule.c,v 1.75 2000/08/15 11:48:06 simonmar Exp $
*
* (c) The GHC Team, 1998-2000
*
*
* (c) The GHC Team, 1998-2000
*
ap->n_args = 2;
ap->fun = cf->handler; /* :: Exception -> IO a */
ap->n_args = 2;
ap->fun = cf->handler; /* :: Exception -> IO a */
- ap->payload[0] = (P_)exception;
+ ap->payload[0] = exception;
ap->payload[1] = ARG_TAG(0); /* realworld token */
/* throw away the stack from Sp up to and including the
ap->payload[1] = ARG_TAG(0); /* realworld token */
/* throw away the stack from Sp up to and including the
ap->fun = (StgClosure *)sp[0];
sp++;
for(i=0; i < (nat)words; ++i) {
ap->fun = (StgClosure *)sp[0];
sp++;
for(i=0; i < (nat)words; ++i) {
- ap->payload[i] = (P_)*sp++;
+ ap->payload[i] = (StgClosure *)*sp++;
}
switch (get_itbl(su)->type) {
}
switch (get_itbl(su)->type) {