* included in the distribution.
*
* $RCSfile: stg.c,v $
- * $Revision: 1.15 $
- * $Date: 2000/03/23 14:54:21 $
+ * $Revision: 1.16 $
+ * $Date: 2000/04/27 16:35:29 $
* ------------------------------------------------------------------------*/
#include "hugsbasictypes.h"
#include "connect.h"
#include "errors.h"
+#include "Rts.h" /* to make StgPtr visible in Assembler.h */
#include "Assembler.h" /* for AsmRep and primops */
/* --------------------------------------------------------------------------
case BIGCELL:
case FLOATCELL:
case STRCELL:
- case PTRCELL:
+ case ADDRCELL:
return TRUE;
default:
return FALSE;
static Void local putStgVar(StgVar v)
{
+ if (isTuple(v)) {
+ putStr("Tuple");
+ putInt(tupleOf(v));
+ } else
if (isName(v)) {
unlexVar(name(v).text);
} else {
case STRCELL:
unlexStrConst(textOf(a));
break;
- case PTRCELL:
- putPtr(ptrOf(a));
+ case ADDRCELL:
+ putPtr(addrOf(a));
putChr('#');
break;
case LETREC: case LAMBDA: case CASE: case PRIMCASE:
Void putStgExpr( StgExpr e ) /* pretty print expr */
{
- if (isNull(e)) putStr("(putStgExpr:NIL)");else
+ if (isNull(e)) {
+ putStr("(putStgExpr:NIL)");
+ return;
+ }
switch (whatIs(e)) {
case LETREC:
break;
case STGVAR:
case NAME:
+ case TUPLE:
putStgVar(e);
break;
case CHARCELL:
case BIGCELL:
case FLOATCELL:
case STRCELL:
- case PTRCELL:
+ case ADDRCELL:
putStgAtom(e);
break;
case AP:
{
Name n;
beginStgPP(fp);
- n = nameFromStgVar(b);
+ n = NIL; /* nameFromStgVar(b); */
if (nonNull(n)) {
putStr(textToStr(name(n).text));
} else {