Let's make a Teeny Tiny compiler

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • compiler

    an incomplete toy barebones compiler backend for amd64 x86_64 in Python and an incomplete JIT compiler written in C (by samsquire)

  • I used this page to work out the Mod/RM format for opcodes.

    https://www.cs.uaf.edu/2016/fall/cs301/lecture/09_28_machine...

    I have a barebones toy compiler here that compiles a simple mathematical expression to assembly:

    https://replit.com/@Chronological/Compiler3

    I have the beginnings of a toy JIT compiler here which generates some machine code for MOVs and function calls but I haven't implemented much else...

    http://github.com/samsquire/compiler

    For code how I generate an "add" instruction:

    https://github.com/samsquire/compiler/blob/main/jitcompiler....

    I use a case statement to match on the registers and literally insert opcode bytes into a malloced array.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts