Commit c18bbfc8 authored by simonmar's avatar simonmar
Browse files

[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.
parent 94107bc3
/* -----------------------------------------------------------------------------
* $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); \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment