HaskellWiki

Haskell | Wiki community | Recent changes
Random page | Special pages

 

Not logged in
Log in | Help

Yhc/RTS/Modules

< Yhc | RTS

Part of Yhc

(Download)

In YHC modules are loaded at runtime by yhi from .hbc bytecode files. For a precise specification of the bytecode format see Yhc/RTS/hbc.

This file details how the loading process works, to see what structures are loaded into memory by the module system see Yhc/RTS/Heap.

Loading by demand

The program starts by loading the module with the 'main' function in it. Statically main will have a list of functions that it might call at runtime, these functions are loaded and their dependencies chased similarly. This is all handled by the code in "module.c" in src/runtime/BCKernel.

Yhi is careful to only load functions from the bytecode that could potentially be used, so as to minimize runtime memory use. Resolution then proceeds as follows:

Retrieved from "http://haskell.org/haskellwiki/Yhc/RTS/Modules"

This page has been accessed 1,718 times. This page was last modified 21:19, 8 April 2008. Recent content is available under a simple permissive license.