From 08fc512d296aeed5508416e0241d42ab4a95ed96 Mon Sep 17 00:00:00 2001 From: sof Date: Wed, 3 Sep 1997 23:39:14 +0000 Subject: [PATCH] [project @ 1997-09-03 23:39:12 by sof] Moved seq vtbl from StgThreads to StgUpdate --- ghc/runtime/main/StgThreads.lhc | 33 --------------------------------- ghc/runtime/main/StgUpdate.lhc | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 33 deletions(-) diff --git a/ghc/runtime/main/StgThreads.lhc b/ghc/runtime/main/StgThreads.lhc index 0bff4de..0f9c606 100644 --- a/ghc/runtime/main/StgThreads.lhc +++ b/ghc/runtime/main/StgThreads.lhc @@ -505,38 +505,5 @@ vtbl_Underflow[] = { (W_) UnderflowVect7 }; -\end{code} - -\begin{code} - -IFN_(seqDirectReturn) { - void *cont; - - FB_ - RetReg = (StgRetAddr) SpB[BREL(0)]; - cont = (void *) SpB[BREL(1)]; - /* SpB += BREL(2); */ - JMP_(cont); - FE_ -} - -/* - NB: For direct returns to work properly, the name of the routine must be - the same as the name of the vector table with vtbl_ removed and DirectReturn - appended. This is all the mangler understands. - */ - -const W_ -vtbl_seq[] = { - (W_) seqDirectReturn, - (W_) seqDirectReturn, - (W_) seqDirectReturn, - (W_) seqDirectReturn, - (W_) seqDirectReturn, - (W_) seqDirectReturn, - (W_) seqDirectReturn, - (W_) seqDirectReturn -}; - #endif /* CONCURRENT */ \end{code} diff --git a/ghc/runtime/main/StgUpdate.lhc b/ghc/runtime/main/StgUpdate.lhc index 7d89844..e5c6690 100644 --- a/ghc/runtime/main/StgUpdate.lhc +++ b/ghc/runtime/main/StgUpdate.lhc @@ -293,6 +293,45 @@ vtbl_StdUpdFrame[] = { %************************************************************************ %* * +\subsection[seq-update-code]{Update code for seq} +%* * +%************************************************************************ + + +\begin{code} + +IFN_(seqDirectReturn) { + void *cont; + + FB_ + RetReg = (StgRetAddr) SpB[BREL(0)]; + cont = (void *) SpB[BREL(1)]; + /* SpB += BREL(2); */ + JMP_(cont); + FE_ +} + +/* + NB: For direct returns to work properly, the name of the routine must be + the same as the name of the vector table with vtbl_ removed and DirectReturn + appended. This is all the mangler understands. + */ + +const W_ +vtbl_seq[] = { + (W_) seqDirectReturn, + (W_) seqDirectReturn, + (W_) seqDirectReturn, + (W_) seqDirectReturn, + (W_) seqDirectReturn, + (W_) seqDirectReturn, + (W_) seqDirectReturn, + (W_) seqDirectReturn +}; +\end{code} + +%************************************************************************ +%* * \subsection[existing-con-update-code]{Update code for existing constructors} %* * %************************************************************************ -- 1.7.10.4