/* -----------------------------------------------------------------------------
- * $Id: Assembler.h,v 1.13 2000/04/27 16:35:29 sewardj Exp $
+ * $Id: Assembler.h,v 1.14 2000/05/09 10:00:35 sewardj Exp $
*
* (c) The GHC Team 1994-1998.
*
extern void asmAddRefObject ( AsmObject obj, AsmObject p );
extern void asmAddRefNoOp ( AsmObject obj, StgPtr p );
+extern void asmAddRefHugs ( AsmObject obj,int /*Name*/ n );
extern AsmVar asmAllocCONSTR ( AsmBCO bco, AsmInfo info );
* Copyright (c) 1994-1998.
*
* $RCSfile: Assembler.c,v $
- * $Revision: 1.27 $
- * $Date: 2000/04/27 16:35:30 $
+ * $Revision: 1.28 $
+ * $Date: 2000/05/09 10:00:35 $
*
* This module provides functions to construct BCOs and other closures
* required by the bytecode compiler.
extern void* getNameOrTupleClosureCPtr ( int /*Cell*/ c );
+/* Defined in this file ... */
+AsmObject asmNewObject ( void );
+void asmAddEntity ( AsmObject, Asm_Kind, StgWord );
+int asmCalcHeapSizeW ( AsmObject );
+StgClosure* asmDerefEntity ( Asm_Entity );
+
/* --------------------------------------------------------------------------
* Initialising and managing objects and entities
* ------------------------------------------------------------------------*/
}
}
- ASSERT(k == bco->n_instrs);
+ ASSERT((unsigned int)k == bco->n_instrs);
break;
}
return con;
}
-void asmEndCon( AsmCon con )
+void asmEndCon( AsmCon con __attribute__ ((unused)) )
{
}
return caf;
}
-void asmEndCAF( AsmCAF caf )
+void asmEndCAF( AsmCAF caf __attribute__ ((unused)) )
{
}
return bco;
}
-void asmEndBCO( AsmBCO bco )
+void asmEndBCO( AsmBCO bco __attribute__ ((unused)) )
{
}
return bco->sp;
}
-void asmEndCase( AsmBCO bco )
+void asmEndCase( AsmBCO bco __attribute__ ((unused)) )
{
}
setSp(bco, start);
}
-void asmBeginUnpack( AsmBCO bco )
+void asmBeginUnpack( AsmBCO bco __attribute__ ((unused)) )
{
/* dummy to make it look prettier */
}
* Copyright (c) 1994-1998.
*
* $RCSfile: Evaluator.c,v $
- * $Revision: 1.50 $
- * $Date: 2000/04/27 16:35:30 $
+ * $Revision: 1.51 $
+ * $Date: 2000/05/09 10:00:36 $
* ---------------------------------------------------------------------------*/
#include "Rts.h"
StgClosure* o;
SSS; o = (StgClosure*)grabHpNonUpd(Stablezh_sizeW); LLL;
SET_HDR(o,StablePtr_con_info,??);
- payloadWord(o,0) = xPopTaggedStable();
+ payloadWord(o,0) = (W_)xPopTaggedStable();
IF_DEBUG(evaluator,
fprintf(stderr,"\tBuilt ");
SSS;
inline void PushTaggedDouble ( StgDouble x )
{ gSp -= sizeofW(StgDouble); ASSIGN_DBL(gSp,x); PushTag(DOUBLE_TAG); }
inline void PushTaggedStablePtr ( StgStablePtr x )
- { gSp -= sizeofW(StgStablePtr); *gSp = x; PushTag(STABLE_TAG); }
+ { gSp -= sizeofW(StgStablePtr); *gSp = (W_)x; PushTag(STABLE_TAG); }
static inline void PushTaggedBool ( int x )
{ PushTaggedInt(x); }
{ StgDouble r; PopTag(DOUBLE_TAG); r = PK_DBL(gSp);
gSp += sizeofW(StgDouble); return r;}
inline StgStablePtr PopTaggedStablePtr ( void )
- { StgInt r; PopTag(STABLE_TAG); r = *stgCast(StgStablePtr*, gSp);
+ { StgStablePtr r; PopTag(STABLE_TAG); r = *stgCast(StgStablePtr*, gSp);
gSp += sizeofW(StgStablePtr); return r;}
}
+__attribute__ ((unused))
static void myStackCheck ( Capability* cap )
{
/* fprintf(stderr, "myStackCheck\n"); */
case i_intToAddr: OP_I_A((StgAddr)x); break; /* ToDo */
case i_addrToInt: OP_A_I((StgInt)x); break; /* ToDo */
- case i_intToStable: OP_I_s(x); break;
- case i_stableToInt: OP_s_I(x); break;
+ case i_intToStable: OP_I_s((StgStablePtr)x); break;
+ case i_stableToInt: OP_s_I((W_)x); break;
case i_indexCharOffAddr: OP_AI_C(indexCharOffAddrzh(r,x,y)); break;
case i_readCharOffAddr: OP_AI_C(indexCharOffAddrzh(r,x,y)); break;
deleteThread(tso);
if (tso == cap->rCurrentTSO) { /* suicide */
*return2 = ThreadFinished;
- return (void*)(1+(NULL));
+ return (void*)(1+(char*)(NULL));
}
break;
}