The T3X Language Family
T 1
(just an idea...)
|
|
T 2
(C version, 386, 8086)
|
|
T 3 --------- T3r0
| (386, 8086, symbolic)
| |
| T3r2 ---------------+---- T3M
| (386, 8086, symbolic) | (6502)
| | |
| T3r3 |
| (386, 8086, symbolic) +---- T3X
| (Tcode, 386, 8086,
| synthesizing CG,
| Tcode machine)
| |
| T3Xr2
| (Bootstrapping
| via Tcode)
T 4 ---- T4r0 |
(386, 8086, T3Xr4
synthesizing CG, (Tcode, 386, 8086,
modules, serapate TXCG, TXOPT, include
compilation) files via TXPP)
|
T3Xr5
(Tcode5, 386, 8086,
TXCG, TXOPT, TXPP,
debugger support)
|
T3Xr6
(Tcode5, 386, new
RT system, object
system)
|
T3Xr7
(Tcode7, 386, 8086,
Alpha, interface
classes)
|
+------------------------------+
| |
T3Xr7.3 T3Xr8
(Tcode7, 386, 8086, (Tcode8, 386, 8086,
Alpha, C backend, Alpha, C backend,
TIDE classes + IDE) 32-bit VM)
T3X9
|
(FreeBSD/386
simplified)
|
T3X9r2 -------+------- XT3X
(FreeBSD/386 | (bitmap graphics
Tcode9, | sound, Tcode only)
32-bit) |
| +------- T3X/Z
| | (CP/M, Z80)
| |
| +------- T3X/86
| (DOS, 8086)
|
|
T3X9r4 --------------- T3X/0
(FreeBSD/386 (New module system,
Tcode9, Tcode/0, CP/M-Z80,
32-bit) DOS-8086, Unix-386,
cross-compilers)
|
T3X/0 Version 19
(Tcode/0, CP/M-Z80,
DOS-8086, Unix-386,
Unix-ARMv6, Unix-ARMv7,
formal semantics)
T 1 (1995)
- different syntax
- multiple modules per file
- no classes
- default argument values
- record type
- procedure pointers instead of forward declarations
- main program between modules
- never fully implemented
T 2 (1995)
- T3X syntax
- no modules, no classes
- main program in compound statement at end of file
- record/struct type dropped
- default argument values dropped
- unsigned integer arithmetic
- compiled to 386 machine code via GAS, used system LIBC
- compiled to DOS/EXE via TASM
- boostrapping compiler in C
- compiler driven by shell script or batch file
T 3 (1997)
- same language as T2
- Tcode and DOS/COM backends
- Tcode only used as a glue language for the SYMCOM backend
- TASM no longer needed on DOS
T 4 (1997)
- modules (MODULE), multiple modules per file
- public procedures and data objects
- record type (STRUCT)
- byte access operator (::)
- constant expressions
- signed integer arithmetic
- main program can depend on modules
- compiler written in T3
- synthesizing code generators for 386 and 8086
- did not self-compile
T3r2 (1997)
- supported for BSS segments in order to generate smaller executables
T3X (1997)
- pretty much the language that T3X is today
- runtime procedures still intrinsic
- INTERFACE statements link to routines not written in T3X
- signed and unsigned integer arithmetic
- hexa-decimal numeric literals
- 386/a.out, DOS/EXE, and Tcode backends
- Tcode interpreter (although not used for bootstrapping)
- T3X->C source-to-source compiler used for bootstrapping
- synthesizing backend adopted from T4
- Ports: DOS, FreeBSD, Plan 9
T3M (1997)
- experimental port of T3R2 to 6502
- generated absolute binaries
- unfinished
T3r3 (1998)
- signed integer arithmetic adopted from T3X
T3Xr2 (1999)
- Tcode used for bootstrapping the compiler
T3Xr4 (1999)
- vector graphics extension
- portable text mode/terminal I/O extension (would later become TTYCtl class)
- TXPP preprocessor
- retargetable code generator (TXCG)
- runtime support via INTERFACE statements, imported by TXPP
T3Xr5 (1999)
- S86 assembler for writing extension procedures for DOS
- Ports: C/GAS, Turbo C/TASM, S86
- A.out and ELF backends for FreeBSD
- SD viewer for online documentation (would later become TXHELP)
- SD documentation file format
T3Xr6 (1999-2002)
- T3X object system (CLASS, OBJECT statements)
- formal (operational) semantics
- modules adopted from T4 (MODULE statement)
- one module per file
- runtime procedures imported via classes (EXTERN DECL)
- INTERFACE statements deprecated
- separate compilation of modules
- dead procedure filter (TXDPF)
- new classes: char, IOstream, memory, string, system, TTYCtl
- compiler driver in T3X
- Linux/386 and Coherent/386 ports
- stand-alone DOS/EXE backend
- Plan 9 support dropped
T3Xr7 (2002-2003)
- interface classes (ICLASS, IDECL declarations)
- runtime procedures imported from ICLASSes
- new retargetable code generator (TXNCG)
- AXP 21064 (Alpha) backend
- NetBSD/386 and Alpha ports
- C backend removed
- Graphics extension removed
- T3Xtools added (classes for writing TTY applications)
- TIDE (T3X IDE)
Lightweight Compiler Techniques (2002)
A revised and extended edition of the original T3X book.
Describing the T3X language and the techniques used to implement the
synthesizing code generator (TXCG).
T3Xr8 (2004)
- 32-bit Tcode support
- new C backend based on TXNCG
- Plan 9 support (again)
- Coherent port broken
- bytecode ports for machines without native code support
Bytecode ports kept T3X (somewhat) alive in the subsequent hiatus.
T3X9 (2017)
- even more minimal T3X subset
- written from scratch
- documented in the book Write Your Own Compiler
- no modules, classes, or objects
- all runtime procedures intrinsic
- no unsigned arithmetic operators
- single-pass, in-memory compiler
- more than 30,000 lines per second on a 750MHz processor
- compiles directly from T3X9 to ELF (FreeBSD/386)
T3X9r2 (2017)
- hexa-decimal integer literals
- additional runtime procedures
- Tcode9 backend and virtual machine
XT3X (2018)
- intrinsic procedures for 16-color 320x200-pixel graphics
- intrinsic procedures for sound output via OSS or ALSA
- Tcode backend only
- intended for writing simple video games
T3X 7.3 and later (2019)
-
ports: Coherent, DOS, FreeBSD, NetBSD, OpenBSD, Linux, Generic Unix, Bytecode
- targets: 8086/EXE, 386/ELF/a.out/COFF, Alpha/ELF, Tcode machine
- C backend imported from T3Xr8
- TIDE and TIDE classes (formerly T3Xtools) integrated
- improved class management and separate compilation
- The "ultimate" 16-bit T3X release
T3X/Z (2019)
- another T3X subset
- more compatible to T3X than T3X9
- generates COM files for CP/M (and CP/NC)
- single-stage, two-pass compiler (processes source code twice)
- fits in 44KB of memory
- self-compiles in six minutes under CP/NC
- runtime procedures intrinsic
- no external runtime library
T3X/86 (2021)
- another T3X subset
- more compatible to T3X than T3X9
- generates COM files for {PC,MS,DR,etc}-DOS
- includes an 8086 assembler (in T3X)
- single-stage, two-pass compiler (processes source code twice)
- single DOS COM file
- runtime procedures intrinsic
- no external runtime library
T3X9r4 (2022)
- Minor bug fixes and cosmetics
- Basis for T3X/0
T3X/0 (2022)
- T3X9 plus modules and unsigned operators
- Flat module hierarchy (modules cannot use modules)
- Improved packed vector syntax
- inline procedures (coded as raw machine code)
- external procedures, so library can be extended with C, etc
- Formal semantics (work in progress)
- Many T3Xr7 libraries included (strings, chars, dynamic memory, etc)
- Ports: Tcode Machine, Unix-386, DOS-8086 (COM), CP/M-Z80
- 14 cross-compilers for almost all combinations of supported platforms
- Sweet spot between T3Xr7 and T3X9
T3X/0 Version 19+ (2024)
- ARMv6 and ARMv7 code generators
- x86_64 (64-bit) code generator
- CONSOLE module (similar to T3Xr7 TTYCtl class)
- SYSTEM module for access to some DOS/Unix system calls
- Formal semantics