The src/llvmgc Directory

Namespace llvmgc, delivered for TC-EXTS. Translate the AST to LLVM-IR and links the garbage collector runtime.

File: local.am (src/llvmgc/)

This Makefile configuration is in charge of integrating everything exported by the llvmgc module in the libtc library.

Directory: runtime (src/llvmgc/)

This directory holds the garbage collector runtime. It is compiled twice to LLVM-IR in $(build_dir)/src/llvmgc/runtime/runtime-gc.ll and $(build_dir)/src/llvmgc/runtime/runtime-gc-debug.ll with the GCDEBUG directive enabled. Two functions llvmgc::runtime_gc_string() and llvmgc::runtime_gc_debug_string are generated in $(build_dir)/src/llvmgc/runtime-gc.cc and $(build_dir)/src/llvmgc/runtime-gc-debug.cc.

File: runtime/local.am (src/llvmgc/runtime/)

The configuration used to build the garbage collector runtime.

File: runtime/tiger-gc.* (src/llvmgc/runtime/)

The core of the collector runtime.

File: libllvmgc.* (src/llvmgc/)

The interface of the llvmgc module. It exports the translate, runtime_get, runtime_debug_gc_string and runtime_gc_string procedures.

File: tasks.* (src/llvmgc/)

The tasks relative to the llvmgc module (see: The src/task Directory).


File: generate-gc.sh (src/llvmgc/)

Generate the Tiger adapted garbage collector runtime.

File: translator.* (src/llvmgc/)

Implement the class GCTranslator which performs LLVM IR generation specialized for garbage collection.

It is particularly used to translate ast::StringExp in a format carrying metadatas parsable by the collector runtime.