From: sewardj Date: Fri, 15 Dec 2000 10:37:51 +0000 (+0000) Subject: [project @ 2000-12-15 10:37:50 by sewardj] X-Git-Tag: Approximately_9120_patches~3094 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8cf4a0fb1cd3c3583d51b80387240d0fb2bfc5d1;p=ghc-hetmet.git [project @ 2000-12-15 10:37:50 by sewardj] Change from 3-component to 4-component representation for BCOs --- diff --git a/ghc/compiler/prelude/primops.txt b/ghc/compiler/prelude/primops.txt index 77f1a19..36f8438 100644 --- a/ghc/compiler/prelude/primops.txt +++ b/ghc/compiler/prelude/primops.txt @@ -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 #) diff --git a/ghc/includes/Closures.h b/ghc/includes/Closures.h index 136a083..dead7d2 100644 --- a/ghc/includes/Closures.h +++ b/ghc/includes/Closures.h @@ -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 { diff --git a/ghc/rts/StgMiscClosures.hc b/ghc/rts/StgMiscClosures.hc index ed17edf..e78f633 100644 --- a/ghc/rts/StgMiscClosures.hc +++ b/ghc/rts/StgMiscClosures.hc @@ -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;