Skip to content

Chapter 11

Latest

Choose a tag to compare

@Fare9 Fare9 released this 21 Mar 22:02
· 3 commits to main since this release
2296513

Chapter 11 - Long Types & Extended Type System

Finished Chapter 11 of the compiler series.

What's new

  • Long type support: Added long as a first-class type throughout the compiler, including lexing of the L/l suffix on integer literals.
  • Type system: Extended the type system to represent long alongside int, with proper size and signedness semantics.
  • SimpleIR backend: Propagated long types into the intermediate representation and the x64 code generation backend, with correct sizing and instruction selection.
  • LLVM IR code generation: Added full long type support to the LLVM IR codegen, local and global variables, function parameters and return types, static locals, and implicit casts between int and long (sext/trunc).