Website Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit9d8e17488decc9b383ee73dff3e054cfc428e9d5 (patch)
Author
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-10-05 22:10:48 +0300
Committer
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2020-10-06 11:42:39 +0300
Filesfbdbab03e4db5dd8c496ec92f16c677d2216f782
IPL-9d8e17488decc9b383ee73dff3e054cfc428e9d5.tar
IPL-9d8e17488decc9b383ee73dff3e054cfc428e9d5.tar.gz
IPL-9d8e17488decc9b383ee73dff3e054cfc428e9d5.zip
Parent8a88c9cec6ce15a0fc156ce5d13236f9665077db (diff)
Add more IR samples
1 files changed, 31 insertions, 0 deletions
-rw-r--r--website/content/slides/01_dragons/_index.md31
diff --git a/website/content/slides/01_dragons/_index.md b/website/content/slides/01_dragons/_index.md
index 7892a65..916c25a 100644
--- a/website/content/slides/01_dragons/_index.md
+++ b/website/content/slides/01_dragons/_index.md
@@ -252,6 +252,37 @@ that is convenient for:
}
---
+### WebAssembly
+
+WebAssembly is actually an IR.
+
+ (module
+ (func (export "add") (param $n1 i32) (param $n2 i32) (result i32)
+ get_local $n1
+ get_local $n2
+ i32.add
+ )
+ )
+
+---
+### .NET CIL
+
+- C#, F#, Basic (some versions), etc target the .NET virtual machine
+- Common Intermediate Language
+
+ .class public Foo
+ {
+ .method public static int32 Add(int32, int32) cil managed
+ {
+ .maxstack 2
+ ldarg.0 // load the first argument;
+ ldarg.1 // load the second argument;
+ add // add them;
+ ret // return the result;
+ }
+ }
+
+---
### Back end
> Takes the IR and produces native code for a particular machine