Website Summary Files Commits Branches @commit @diff @stats
path: root / website / content / slides / 01_dragons / _index.md
diff options
context:
space:
mode:
Commit154b7cd30f21af1554ca26986ff1643e28857727 (patch)
Author
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2020-10-11 20:07:45 +0300
Committer
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2020-10-11 20:07:45 +0300
Files01ed0f3b9f02130b86be57f2b1740e6e5c0e76df /website/content/slides/01_dragons/_index.md
IPL-154b7cd30f21af1554ca26986ff1643e28857727.tar
IPL-154b7cd30f21af1554ca26986ff1643e28857727.tar.gz
IPL-154b7cd30f21af1554ca26986ff1643e28857727.zip
Parent1d7dc2c166de587581766f701ad071e5da7c3eec (diff)
Parent8068eca1b665e6d15d79fdee96263ce85aa4db56 (diff)
Merge branch '2020/intro'
1 files changed, 66 insertions, 1 deletions
-rw-r--r--website/content/slides/01_dragons/_index.md67
diff --git a/website/content/slides/01_dragons/_index.md b/website/content/slides/01_dragons/_index.md
index 52ecf91..756066b 100644
--- a/website/content/slides/01_dragons/_index.md
+++ b/website/content/slides/01_dragons/_index.md
@@ -197,7 +197,26 @@ LR(n) and LALR(n) are family of parsing algorithms for CFG
---
###### AST
-# TODO: use JavaScript AST dumper
+https://esprima.org/demo/parse.html?code=function%20answer()%20%7B%0A%20%20%20%20return%206%20*%207%3B%0A%7D
+
+ {
+ "type": "FunctionDeclaration",
+ "id": { "type": "Identifier", "name": "answer" },
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "BinaryExpression",
+ "operator": "*",
+ "left": { "type": "Literal", "value": 6 },
+ "right": { "type": "Literal", "value": 7 }
+ }
+ }
+ ]
+ },
+ }
---
### Middle
@@ -233,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
@@ -336,5 +386,20 @@ expressions.
- antlr
---
+### Crash course in JSImpl
+
+- repository organization
+- continous integration
+- pull requests
+
+---
+### Crash course in JSImpl
+
+- projects
+- allocators
+- tests
+
+
+---
# ?
---