Commit 418a70da authored by simonmar's avatar simonmar
Browse files

[project @ 2000-08-15 11:48:06 by simonmar]

Minor cleanups to a few closure types: we don't use StgPtr in
Closures.h anymore.
parent f0daa9ce
/* ----------------------------------------------------------------------------
* $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
*
......@@ -150,7 +150,7 @@ typedef struct StgClosure_ {
typedef struct StgMutClosure_ {
StgHeader header;
StgPtr *padding;
StgWord padding;
struct StgMutClosure_ *mut_link;
struct StgClosure_ *payload[0];
} StgMutClosure;
......@@ -164,23 +164,23 @@ typedef struct {
StgHeader header;
StgWord n_args;
StgClosure *fun;
StgPtr payload[0];
StgClosure *payload[0];
} StgPAP;
typedef struct {
StgHeader header;
StgWord n_args;
StgClosure *fun;
StgPtr payload[0];
StgClosure *payload[0];
} 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 {
......@@ -347,7 +347,7 @@ typedef struct StgBlockingQueue_ {
/* 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_ {
......
/* -----------------------------------------------------------------------------
* $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.
*
......@@ -107,7 +107,7 @@ void printClosure( StgClosure *obj )
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;
......@@ -196,8 +196,7 @@ void printClosure( StgClosure *obj )
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;
......@@ -938,6 +937,8 @@ extern void DEBUG_LoadSymbols( char *name STG_UNUSED )
#include "StoragePriv.h"
void findPtr(P_ p); /* keep gcc -Wall happy */
void
findPtr(P_ p)
{
......
/* ----------------------------------------------------------------------------
* $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
*
......@@ -199,7 +199,7 @@ rts_apply (HaskellObj f, HaskellObj arg)
SET_HDR(ap, &AP_UPD_info, CCS_SYSTEM);
ap->n_args = 1;
ap->fun = f;
ap->payload[0] = (P_)arg;
ap->payload[0] = arg;
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
*
......@@ -2724,7 +2724,7 @@ raiseAsync(StgTSO *tso, StgClosure *exception)
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
......@@ -2772,7 +2772,7 @@ raiseAsync(StgTSO *tso, StgClosure *exception)
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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment