All projects

May 2026

P: Custom Compiler & Runtime Toolchain

A dependency-free x86-64 compiler pipeline written in C++17 featuring a freestanding custom standard library runtime.

P is a statically-typed, general-purpose programming language featuring a strongly validation-driven C-like syntax model. To map high-level constructs smoothly down to bare hardware targets without heavy structural toolkits like LLVM, I architected a completely standalone compilation engineering pipeline from scratch. The system transforms source definitions by executing sequentially through a custom Tokenizer stream, a structured Abstract Syntax Tree (AST) Parser layout, a rigorous type-validating Semantic Analyzer (Sema), a low-level platform-independent Intermediate Representation (IR) layer, and a target Code Generator that emits native x86-64 assembly in standard AT&T syntax formats.

To complement the compiler execution, I developed a minimal, freestanding custom standard runtime library (libp) written in pure C and Assembly. This sub-architecture handles core environment lifecycle requirements directly above the Linux boundary layer—including manual low-level memory block allocators (malloc/free), low-latency I/O operations, structural signal handling, and raw OS system call wrappers. Crucially, the runtime incorporates full multi-threaded concurrency abstractions (spawn_thread, mutex_lock) and dynamic dispatch mechanisms, allowing the language to handle advanced parallel workloads natively. The codebase is supported by automated regression diagnostics engines and isolated compilation benchmarking tools to prevent logic drift.

  • C++17
  • Assembly x86-64
  • Compiler Design
  • Linux Kernel
  • Concurrency
  • CMake