Skip to content

Commit

Permalink
EOD save. Added most of the operations, though still missing PrimOp a…
Browse files Browse the repository at this point in the history
…nd GlobalValueOp
  • Loading branch information
jjcnn committed Oct 16, 2023
1 parent ab6c33f commit 60be948
Show file tree
Hide file tree
Showing 5 changed files with 997 additions and 132 deletions.
7 changes: 5 additions & 2 deletions hir-parser/TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ Decisions:
* visit.rs

* expression.rs CONTAINS IDENTIFIER - MAYBE MOVE
* instruction.rs ADDED

* types.rs DONE
* mod.rs DONE
* module.rs MERGED WITH mod.rs
* globals.rs ADDED
* functions.rs ADDED
* block.rs ADDED
* instruction.rs ADDED

- transforms/*: May not be needed, though it might be necessary to have a pass that transforms from AST to HIR. Need total rewrite

Expand All @@ -54,8 +54,11 @@ Decisions:
Next:
Operation groups (binary, unary, etc)
Operations AST

Change call+syscall to CallOp

Immediate
Destination
SwitchBranches
Value
ConstantExpr

3 changes: 1 addition & 2 deletions hir-parser/grammar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ binaryop ::= add overflow
| shr overflow
| rotl overflow
| rotr overflow
| neg
| eq
| neq
| gt
Expand Down Expand Up @@ -102,7 +101,6 @@ binaryop_imm ::= add_imm overflow
| shr_imm overflow
| rotl_imm overflow
| rotr_imm overflow
| neg_imm

unaryop ::= inv
| incr
Expand All @@ -117,6 +115,7 @@ unaryop ::= inv
| truncw
| zext
| sext
| neg

unaryop_imm ::= const.i1
| const.i8
Expand Down
Loading

0 comments on commit 60be948

Please sign in to comment.