From: simonmar Date: Wed, 20 Oct 1999 10:14:47 +0000 (+0000) Subject: [project @ 1999-10-20 10:14:47 by simonmar] X-Git-Tag: Approximately_9120_patches~5679 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c18bbfc8939b2c612e40eaac738c8eb0befd714d;p=ghc-hetmet.git [project @ 1999-10-20 10:14:47 by simonmar] Micro-optimisation: don't need to test for an empty queue in a BLACKHOLE_BQ, now that we're distinguishing BLACKHOLE and BLACKHOLE_BQ. Shortens the update code by a couple of instructions. --- diff --git a/ghc/includes/Updates.h b/ghc/includes/Updates.h index e142cd0..e33b4b3 100644 --- a/ghc/includes/Updates.h +++ b/ghc/includes/Updates.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Updates.h,v 1.12 1999/08/25 16:11:44 simonmar Exp $ + * $Id: Updates.h,v 1.13 1999/10/20 10:14:47 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -53,12 +53,10 @@ extern void awakenBlockedQueue(StgTSO *q); -#define AWAKEN_BQ(closure) \ - if (closure->header.info == &BLACKHOLE_BQ_info) { \ - StgTSO *bq = ((StgBlockingQueue *)closure)->blocking_queue;\ - if (bq != (StgTSO *)&END_TSO_QUEUE_closure) { \ - STGCALL1(awakenBlockedQueue, bq); \ - } \ +#define AWAKEN_BQ(closure) \ + if (closure->header.info == &BLACKHOLE_BQ_info) { \ + STGCALL1(awakenBlockedQueue, \ + ((StgBlockingQueue *)closure)->blocking_queue); \ } @@ -78,8 +76,8 @@ extern DLL_IMPORT_DATA const StgPolyInfoTable Upd_frame_info; { \ StgUpdateFrame *__frame; \ TICK_UPDF_PUSHED(target, GET_INFO((StgClosure*)target)); \ - __frame = stgCast(StgUpdateFrame*,Sp + (Sp_offset)) - 1; \ - SET_INFO(__frame,stgCast(StgInfoTable*,&Upd_frame_info)); \ + __frame = (StgUpdateFrame *)(Sp + (Sp_offset)) - 1; \ + SET_INFO(__frame, (StgInfoTable *)&Upd_frame_info); \ __frame->link = Su; \ __frame->updatee = (StgClosure *)(target); \ PUSH_STD_CCCS(__frame); \