NB: args @a@ and @b@ are pre-direction-ified!
\begin{code}
-extern I_ SqueezeUpdateFrames PROTO((P_, P_, P_));
+I_ SqueezeUpdateFrames PROTO((P_, P_, P_));
int sanityChk_StkO (P_ stko); /* ToDo: move to a sane place */
#if ! defined(CONCURRENT)
#else /* threaded */
-extern I_ StackOverflow PROTO((W_, W_));
+I_ StackOverflow PROTO((W_, W_));
/*
* On a uniprocessor, we do *NOT* context switch on a stack overflow
%************************************************************************
%* *
-\subsubsection[StgMacros-arity-chks]{Arity checks (for debugging)}
-%* *
-%************************************************************************
-
-This is a debugging feature. Each call to fast-entry-point code sets
-@ExpectedArity@ to some value, and the callee then checks that the
-value is as expected.
-
-\begin{code}
-#if defined(__DO_ARITY_CHKS__)
-
-extern I_ ExpectedArity;
-extern void ArityError PROTO((I_)) STG_NORETURN;
-
-#define SET_ARITY(n) do { ExpectedArity = (n); } while(0)
-#define CHK_ARITY(n) \
- do { \
- if (ExpectedArity != (n)) { \
- ULTRASAFESTGCALL1(void,(void *, I_),ArityError,n); \
- }}while(0)
-
-#else /* ! __DO_ARITY_CHKS__: normal case */
-
-#define SET_ARITY(n) /* nothing */
-#define CHK_ARITY(n) /* nothing */
-
-#endif /* ! __DO_ARITY_CHKS__ */
-\end{code}
-
-%************************************************************************
-%* *
\subsubsection[StgMacros-heap-chks]{Heap-overflow checks}
%* *
%************************************************************************
happens in a GC,'' in \tr{SMinterface.lh}.
\begin{code}
-extern void PerformGC PROTO((W_));
+void PerformGC PROTO((W_));
void RealPerformGC PROTO((W_ liveness, W_ reqsize, W_ always_reenter_node, rtsBool do_full_collection));
void checkInCCallGC(STG_NO_ARGS);
#else /* CONCURRENT */
-extern void ReallyPerformThreadGC PROTO((W_, rtsBool));
+void ReallyPerformThreadGC PROTO((W_, rtsBool));
#define HEAP_OVERFLOW(liveness,n,reenter) \
do { \
these pretty magical support functions, essentially stolen from Lennart:
\begin{code}
StgFloat __encodeFloat PROTO((MP_INT *, I_));
-void __decodeFloat PROTO((MP_INT * /*result1*/,
+void __decodeFloat PROTO((MP_INT * /*result1*/,
I_ * /*result2*/,
StgFloat));
StgDouble __encodeDouble PROTO((MP_INT *, I_));
-void __decodeDouble PROTO((MP_INT * /*result1*/,
+void __decodeDouble PROTO((MP_INT * /*result1*/,
I_ * /*result2*/,
StgDouble));
\end{code}
extern I_ resetGenSymZh(STG_NO_ARGS);
extern I_ incSeqWorldZh(STG_NO_ARGS);
-/* sigh again: without these some (notably "float") willnae work */
-extern I_ long2bytes__ PROTO((long, unsigned char *));
-extern I_ int2bytes__ PROTO((int, unsigned char *));
-extern I_ short2bytes__ PROTO((short, unsigned char *));
-extern I_ float2bytes__ PROTO((float, unsigned char *));
-extern I_ double2bytes__ PROTO((double, unsigned char *));
-
-/* these may not be necessary; and they create warnings (WDP) */
-extern I_ bytes2long__ PROTO((P_, I_ *));
-extern I_ bytes2int__ PROTO((P_, I_ *));
-extern I_ bytes2short__ PROTO((P_, I_ *));
-extern I_ bytes2float__ PROTO((P_, StgFloat *));
-extern I_ bytes2double__ PROTO((P_, StgDouble *));
-
extern I_ byteArrayHasNUL__ PROTO((const char *, I_));
\end{code}
\begin{code}
#ifdef CONCURRENT
-extern void Yield PROTO((W_));
+void Yield PROTO((W_));
#define takeMVarZh(r, liveness, node) \
{ \
StgInt getErrorHandler(STG_NO_ARGS);
#ifndef PAR
-void raiseError PROTO((StgStablePtr handler));
+void raiseError PROTO((StgStablePtr handler));
StgInt catchError PROTO((StgStablePtr newErrorHandler));
#endif
void decrementErrorCount(STG_NO_ARGS);
-#define stg_catchError(sp) SAFESTGCALL1(I_,(void *, StgStablePtr),catchError,sp)
+#define stg_catchError(sp) SAFESTGCALL1(I_,(void *, StgStablePtr),catchError,sp)
#define stg_decrementErrorCount() SAFESTGCALL0(void,(void *),decrementErrorCount)
\end{code}
#define deRefStablePtrZh(ri,sp) \
ri = SAFESTGCALL2(I_,(void *, I_, P_),_deRefStablePointer,sp,StorageMgrInfo.StablePointerTable);
-
\end{code}
Declarations for other stable pointer operations.
any strictly increasing expression will do here */
#define CalcNewNoSPtrs( i ) ((i)*2 + 100)
-extern void enlargeSPTable PROTO((P_, P_));
+void enlargeSPTable PROTO((P_, P_));
#define makeStablePtrZh(stablePtr,liveness,unstablePtr) \
do { \