diff options
author | simonm <unknown> | 1997-09-24 16:19:53 +0000 |
---|---|---|
committer | simonm <unknown> | 1997-09-24 16:19:53 +0000 |
commit | 2fa7ebd47c00b5716cb6904648637a65c97b09c7 (patch) | |
tree | ffe20560a367400a8247ece3ea5c46762d9d4ef5 /docs/rts | |
parent | 2bc355fa50e75e512ddd887bd5567aba184f3f0a (diff) | |
download | haskell-2fa7ebd47c00b5716cb6904648637a65c97b09c7.tar.gz |
[project @ 1997-09-24 16:19:53 by simonm]
finished today's changes.
Diffstat (limited to 'docs/rts')
-rw-r--r-- | docs/rts/rts.verb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/rts/rts.verb b/docs/rts/rts.verb index 01e3e34fb1..97a4fe0602 100644 --- a/docs/rts/rts.verb +++ b/docs/rts/rts.verb @@ -799,6 +799,36 @@ How do we do this? \subsection{A GHC thread returns to a Hugs-compiled return address} +When Hugs pushes return addresses on the stack, they look like this: + +@ + | | + |_______________| + | | -----> bytecode object + |_______________| + | | _____ + |_______________| |___ GHC-friendly return code + _____ + | | + | | Info Table + |____| + . . + . . Code + . . +@ + +If GHC is returning, it will return to the address at the top of the +stack. The code at this address + +\begin{itemize} +\item saves the thread state in the TSO +\item returns to the scheduler with a @whatNext@ field of @RunHugs@. +\end{itemize} + +If Hugs is returning to one of these addresses, it can spot the +special return address at the top and instead jump to the bytecodes +pointed to by the second word on the stack. + \subsection{A Hugs thread enters a GHC-compiled thunk} When Hugs is called on to enter a non-Hugs closure (these are |