[project @ 2000-12-15 10:37:50 by sewardj]
authorsewardj <unknown>
Fri, 15 Dec 2000 10:37:51 +0000 (10:37 +0000)
committersewardj <unknown>
Fri, 15 Dec 2000 10:37:51 +0000 (10:37 +0000)
Change from 3-component to 4-component representation for BCOs

ghc/compiler/prelude/primops.txt
ghc/includes/Closures.h
ghc/rts/StgMiscClosures.hc

index 77f1a19..36f8438 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------
--- $Id: primops.txt,v 1.9 2000/12/12 12:19:57 simonmar Exp $
+-- $Id: primops.txt,v 1.10 2000/12/15 10:37:50 sewardj Exp $
 --
 -- Primitive Operations
 --
@@ -1111,7 +1111,7 @@ primop TouchOp "touch#" GenPrimOp
 ------------------------------------------------------------------------
 
 primop  NewBCOOp "newBCO#" GenPrimOp
-   ByteArr# -> ByteArr# -> MutArr# s a -> State# s -> (# State# s, BCO# #)
+   ByteArr# -> ByteArr# -> MutArr# s a -> MutArr# s a -> State# s -> (# State# s, BCO# #)
    with
    has_side_effects = True
    out_of_line      = True
@@ -1119,11 +1119,14 @@ primop  NewBCOOp "newBCO#" GenPrimOp
 primop  GetBCOPtrsOp "getBCOPtrs#" GenPrimOp
    BCO# -> State# s -> (# State# s, MutArr# s a #)
 
+primop  GetBCOItblsOp "getBCOItbls#" GenPrimOp
+   BCO# -> State# s -> (# State# s, MutArr# s a #)
+
 ------------------------------------------------------------------------
 --- Weak pointers                                                    ---
 ------------------------------------------------------------------------
 
--- note that tyvar "o" denoted openAlphaTyVar
+-- note that tyvar "o" denotes openAlphaTyVar
 
 primop  MkWeakOp "mkWeak#" GenPrimOp
    o -> b -> c -> State# RealWorld -> (# State# RealWorld, Weak# b #)
index 136a083..dead7d2 100644 (file)
@@ -1,5 +1,5 @@
 /* ----------------------------------------------------------------------------
- * $Id: Closures.h,v 1.21 2000/12/11 12:59:25 simonmar Exp $
+ * $Id: Closures.h,v 1.22 2000/12/15 10:37:51 sewardj Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -179,6 +179,7 @@ typedef struct {
     StgClosure *literals;      /* a pointer to an ArrWords */
     StgClosure *instrs;                /* a pointer to an ArrWords */
     StgClosure *ptrs;          /* a pointer to a MutArrPtrs */
+    StgClosure *itbls;         /* a pointer to an ArrWords */
 } StgBCO;
 
 typedef struct {
index ed17edf..e78f633 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: StgMiscClosures.hc,v 1.55 2000/12/14 16:32:40 sewardj Exp $
+ * $Id: StgMiscClosures.hc,v 1.56 2000/12/15 10:37:51 sewardj Exp $
  *
  * (c) The GHC Team, 1998-2000
  *
@@ -160,7 +160,7 @@ VEC_POLY_INFO_TABLE(stg_ctoi_ret_R1,0, NULL/*srt*/, 0/*srt_off*/, 0/*srt_len*/,
 
 /* Entering a BCO.  Heave it on the stack and defer to the
    scheduler. */
-INFO_TABLE(stg_BCO_info,stg_BCO_entry,3,0,BCO,,EF_,"BCO","BCO");
+INFO_TABLE(stg_BCO_info,stg_BCO_entry,4,0,BCO,,EF_,"BCO","BCO");
 STGFUN(stg_BCO_entry) {
   FB_
     Sp -= 1;