* Copyright (c) 1994-1998.
*
* $RCSfile: Assembler.c,v $
- * $Revision: 1.21 $
- * $Date: 1999/12/07 11:22:56 $
+ * $Revision: 1.22 $
+ * $Date: 1999/12/07 11:49:09 $
*
* This module provides functions to construct BCOs and other closures
* required by the bytecode compiler.
emiti_16(bco,i_RETADDR_big,arg1);
}
+static void emit_i_ALLOC_CONSTR ( AsmBCO bco, int arg1 )
+{
+ ASSERT(arg1 >= 0);
+ if (arg1 < 256)
+ emiti_8 (bco,i_ALLOC_CONSTR, arg1); else
+ emiti_16(bco,i_ALLOC_CONSTR_big,arg1);
+}
+
/* --------------------------------------------------------------------------
* Arg checks.
i = asmFindInNonPtrs ( bco, (StgWord)info );
if (i == -1) {
- emiti_8(bco,i_ALLOC_CONSTR,bco->nps.len);
+ emit_i_ALLOC_CONSTR(bco,bco->nps.len);
asmWords(bco,AsmInfo,info);
} else {
- emiti_8(bco,i_ALLOC_CONSTR,i);
+ emit_i_ALLOC_CONSTR(bco,i);
}
incSp(bco, sizeofW(StgClosurePtr));
/* -----------------------------------------------------------------------------
- * $Id: Bytecodes.h,v 1.12 1999/11/18 12:10:25 sewardj Exp $
+ * $Id: Bytecodes.h,v 1.13 1999/12/07 11:49:10 sewardj Exp $
*
* (c) The GHC Team, 1998-1999
*
Ins(i_ALLOC_AP), \
Ins(i_ALLOC_PAP), \
Ins(i_ALLOC_CONSTR), \
+ Ins(i_ALLOC_CONSTR_big), \
Ins(i_MKAP), \
Ins(i_MKAP_big), \
Ins(i_MKPAP), \
* Copyright (c) 1994-1998.
*
* $RCSfile: Disassembler.c,v $
- * $Revision: 1.11 $
- * $Date: 1999/11/16 17:39:10 $
+ * $Revision: 1.12 $
+ * $Date: 1999/12/07 11:49:11 $
* ---------------------------------------------------------------------------*/
#include "Rts.h"
return pc;
}
+static InstrPtr disInfo16 ( StgBCO *bco, InstrPtr pc, char* i )
+{
+ StgWord x = bcoInstr16(bco,pc);
+ StgInfoTable* info = bcoConstInfoPtr(bco,x);
+ pc+=2;
+ /* ToDo: print contents of infotable */
+ fprintf(stderr,"%s ",i);
+ printPtr(stgCast(StgPtr,info));
+ return pc;
+}
+
static InstrPtr disConstPtr ( StgBCO *bco, InstrPtr pc, char* i )
{
StgInt o = bcoInstr(bco,pc++);
return disInt(bco,pc,"ALLOC_PAP");
case i_ALLOC_CONSTR:
return disInfo(bco,pc,"ALLOC_CONSTR");
+ case i_ALLOC_CONSTR_big:
+ return disInfo16(bco,pc,"ALLOC_CONSTR_big");
case i_MKAP:
return disIntInt(bco,pc,"MKAP");
case i_MKAP_big:
* Copyright (c) 1994-1998.
*
* $RCSfile: Evaluator.c,v $
- * $Revision: 1.30 $
- * $Date: 1999/11/29 18:59:42 $
+ * $Revision: 1.31 $
+ * $Date: 1999/12/07 11:49:11 $
* ---------------------------------------------------------------------------*/
#include "Rts.h"
xPushPtr(p);
Continue;
}
+ Case(i_ALLOC_CONSTR_big):
+ {
+ StgPtr p;
+ int x = BCO_INSTR_16;
+ StgInfoTable* info = bcoConstAddr(bco,x);
+ SSS; p = grabHpNonUpd(sizeW_fromITBL(info)); LLL;
+ SET_HDR((StgClosure*)p,info,??);
+ xPushPtr(p);
+ Continue;
+ }
Case(i_MKAP):
{
int x = BCO_INSTR_8; /* ToDo: Word not Int! */