Implement an imperative language compiler in Haskell using LLVM
โ Scribed by Stephen Diehl
- Publisher
- web draft
- Year
- 2017
- Tongue
- English
- Leaves
- 67
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Table of Contents
Chapter 1 ( Introduction )......Page 3
Building with Stack (Recommended)......Page 4
The Basic Language......Page 5
LLVM Introduction......Page 6
The Lexer......Page 9
The Parser......Page 11
The REPL......Page 14
Chapter 3 ( Code Generation )......Page 15
Code Generation Setup......Page 16
Blocks......Page 18
Instructions......Page 19
From AST to IR......Page 22
Full Source......Page 25
ASTs and Modules......Page 26
Constant Folding......Page 27
Optimization Passes......Page 28
Adding a JIT Compiler......Page 30
External Functions......Page 31
Full Source......Page 33
if Expressions......Page 34
for Loop Expressions......Page 40
User-defined Operators......Page 45
Binary Operators......Page 46
Unary Operators......Page 48
Kicking the Tires......Page 49
Chapter 7 ( Mutable Variables )......Page 54
Why is this a hard problem?......Page 55
Memory in LLVM......Page 57
Mutable Variables......Page 60
Assignment......Page 62
Tutorial Conclusion......Page 64
Command Line Tools......Page 66
๐ SIMILAR VOLUMES
Annotation<span class='showMoreLessContentElement' style='display: none;'><p>Become familiar with the LLVM infrastructure and start using LLVM libraries to design a compiler About This Book Learn to use the LLVM libraries to emit intermediate representation (IR) from high-level language Build you
Implementing a programming language means bridging the gap from the programmer's high-level thinking to the machine's zeros and ones. If this is done in an efficient and reliable way, programmers can concentrate on the actual problems they have to solve, rather than on the details of machines. But u
Annotation<span class='showMoreLessContentElement' style='display: none;'><p>Become familiar with the LLVM infrastructure and start using LLVM libraries to design a compilerAbout This Book Learn to use the LLVM libraries to emit intermediate representation (IR) from high-level language Build your
<p>Compiler technology is fundamental to computer science since it provides the means to implement many other tools. It is interesting that, in fact, many tools have a compiler framework - they accept input in a particular format, perform some processing and present output in another format. Such to