Skip to content

Instantly share code, notes, and snippets.

@aziis98
Last active January 5, 2018 23:50
Show Gist options
  • Select an option

  • Save aziis98/7ab4a57945d62db4db6b9d27c4edad6d to your computer and use it in GitHub Desktop.

Select an option

Save aziis98/7ab4a57945d62db4db6b9d27c4edad6d to your computer and use it in GitHub Desktop.

Async Compiler Concept

Abstract

Compilers generally follow a linear process to compile code. In this article I will try to come up with a way of leveraging async computations to optimize the compilation process.

The Model

The general way compilers work is the following:

Source Code ===[ Tokenizer ]===[ Parser ]===> Abstract Syntax Tree ===>
===[ Semantic Analysis ]===[ Translation to IR ]===> IR Form ===>
===[ Various Optimizations ]===[ Final Transformation ]===> Machine Code 

The first step of parallelizzation is to tokenize every file separately.

TODO: Finish the article

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment