[project @ 2000-12-19 12:34:00 by sewardj]
authorsewardj <unknown>
Tue, 19 Dec 2000 12:34:01 +0000 (12:34 +0000)
committersewardj <unknown>
Tue, 19 Dec 2000 12:34:01 +0000 (12:34 +0000)
tweaks to BCO infrastructure

ghc/includes/Closures.h
ghc/rts/PrimOps.hc

index dead7d2..497fc82 100644 (file)
@@ -1,5 +1,5 @@
 /* ----------------------------------------------------------------------------
 /* ----------------------------------------------------------------------------
- * $Id: Closures.h,v 1.22 2000/12/15 10:37:51 sewardj Exp $
+ * $Id: Closures.h,v 1.23 2000/12/19 12:34:00 sewardj Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -176,8 +176,8 @@ typedef struct {
 
 typedef struct {
     StgHeader   header;
 
 typedef struct {
     StgHeader   header;
-    StgClosure *literals;      /* a pointer to an ArrWords */
     StgClosure *instrs;                /* a pointer to an ArrWords */
     StgClosure *instrs;                /* a pointer to an ArrWords */
+    StgClosure *literals;      /* a pointer to an ArrWords */
     StgClosure *ptrs;          /* a pointer to a MutArrPtrs */
     StgClosure *itbls;         /* a pointer to an ArrWords */
 } StgBCO;
     StgClosure *ptrs;          /* a pointer to a MutArrPtrs */
     StgClosure *itbls;         /* a pointer to an ArrWords */
 } StgBCO;
index 58e95f1..2d27886 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
 /* -----------------------------------------------------------------------------
- * $Id: PrimOps.hc,v 1.63 2000/12/12 12:19:57 simonmar Exp $
+ * $Id: PrimOps.hc,v 1.64 2000/12/19 12:34:01 sewardj Exp $
  *
  * (c) The GHC Team, 1998-2000
  *
  *
  * (c) The GHC Team, 1998-2000
  *
@@ -1021,20 +1021,21 @@ FN_(newBCOzh_fast)
   /* R1.p = instrs
      R2.p = literals
      R3.p = ptrs
   /* R1.p = instrs
      R2.p = literals
      R3.p = ptrs
+     R4.p = itbls
   */
   StgBCO *bco;
   FB_
 
   */
   StgBCO *bco;
   FB_
 
-  HP_CHK_GEN_TICKY(sizeofW(StgBCO),R1_PTR|R2_PTR|R3_PTR, newBCOzh_fast,);
+  HP_CHK_GEN_TICKY(sizeofW(StgBCO),R1_PTR|R2_PTR|R3_PTR|R4_PTR, newBCOzh_fast,);
   TICK_ALLOC_PRIM(sizeofW(StgHeader), sizeofW(StgBCO)-sizeofW(StgHeader), 0);
   CCS_ALLOC(CCCS,sizeofW(StgBCO)); /* ccs prof */
   TICK_ALLOC_PRIM(sizeofW(StgHeader), sizeofW(StgBCO)-sizeofW(StgHeader), 0);
   CCS_ALLOC(CCCS,sizeofW(StgBCO)); /* ccs prof */
-
-  bco = (StgBCO *) (Hp + 1 - sizeof(StgBCO));
+  bco = (StgBCO *) (Hp + 1 - sizeofW(StgBCO));
   SET_HDR(bco, &stg_BCO_info, CCCS);
 
   bco->instrs     = R1.cl;
   bco->literals   = R2.cl;
   bco->ptrs       = R3.cl;
   SET_HDR(bco, &stg_BCO_info, CCCS);
 
   bco->instrs     = R1.cl;
   bco->literals   = R2.cl;
   bco->ptrs       = R3.cl;
+  bco->itbls      = R4.cl;
 
   TICK_RET_UNBOXED_TUP(1);
   RET_P(bco);
 
   TICK_RET_UNBOXED_TUP(1);
   RET_P(bco);