Commit Graph

57 Commits

Author SHA1 Message Date
greg
eb6354e55a Only print errors if the programs failed 2017-09-19 22:11:00 -07:00
greg
751c6f65bd Deleted some code in compilation 2017-09-19 22:11:00 -07:00
greg
3e231b4715 Use native rust to write source file 2017-09-19 22:11:00 -07:00
greg
e103ba221c Conditionals work! 2017-09-19 22:11:00 -07:00
greg
d5f01a7b1f Continuing work on phi nodes 2017-09-19 22:11:00 -07:00
greg
bdd6f75cf6 Show/hide LLVM IR in REPL 2017-09-19 22:11:00 -07:00
greg
9454fc6194 Add return statements to generated functions 2017-09-19 22:11:00 -07:00
greg
c8feaa9b57 Add logging of supplimental commands 2017-09-19 22:11:00 -07:00
greg
06a5de6e32 Trying to debug this segfault 2017-09-19 22:11:00 -07:00
greg
748a85db02 Compiling functions half-works 2017-09-19 22:11:00 -07:00
greg
8f2d9b900b Function codegen sorta works 2017-09-19 22:11:00 -07:00
greg
b9d1140264 Refactored op compilation code
+ moved to separate function
2017-09-19 22:11:00 -07:00
greg
7188a7d33e Clarified that we hardcode a "main" function
in compiler data structure
2017-09-19 22:10:59 -07:00
greg
0c7099771f Comparison operator working 2017-09-19 22:10:59 -07:00
greg
afec7e829c There's some segfault happening in LLVMBuildUIToFP 2017-09-19 22:10:59 -07:00
greg
a6773d59bd Refactoring in compiling binops 2017-09-19 22:10:59 -07:00
greg
d804efdc5e Use BinOp type instead of strings 2017-09-19 22:10:59 -07:00
greg
d93b5c0a2e Still cranking away at conditional compilation 2017-09-19 22:10:59 -07:00
greg
0b9dc113d1 CLoser to working now 2017-09-19 22:10:59 -07:00
greg
d6fc13f08d Fix a couple of problems 2017-09-19 22:10:59 -07:00
greg
825c271b17 More work on codegen for conditionals
Still doesn't compile
2017-09-19 22:10:59 -07:00
greg
8c4f7e141a Compiling if statements like half done 2017-09-19 22:10:59 -07:00
greg
12fbc51da1 Compile multi-expression source programs 2017-09-19 22:10:59 -07:00
greg
328ec4ba87 Convertd like half the Strings to RC
-still need to eliminate some clones in eval, parse
+ fix all the tests
2017-09-19 22:10:58 -07:00
greg
7eb48fb4ef Working on compilation again 2017-09-19 22:10:58 -07:00
greg
905431b33c Change name: ASTNode -> Statement 2017-09-19 22:10:58 -07:00
greg
84fbe73cf6 Add Lambda type
And change name FuncNode -> FuncDefNode

Now function definition nodes reduce to a Lambda, which is not
reducible.
2017-09-19 22:10:58 -07:00
greg
2d21de7cc3 Added support for conditionals to parser
Not to eval yet
2017-09-19 22:10:57 -07:00
greg
e84550f3ec Kill two compilation warnings 2017-09-19 22:10:57 -07:00
greg
af45004afa Run rustfmt on some files 2017-09-19 22:10:57 -07:00
greg
fe8418edbe Kill some extraneous spaces 2017-09-19 22:10:57 -07:00
greg
c389b44bf8 Compile statements with variables 2017-09-19 22:10:57 -07:00
greg
db52f9b716 Package compilation context into one struct 2017-09-19 22:10:57 -07:00
greg
e46d840d96 Move more code to llvm_wrap
And silence a few compiler warnings
2017-09-19 22:10:57 -07:00
greg
3d406f1dd2 Move llmv wrapper into separate file 2017-09-19 22:10:57 -07:00
greg
fca307d3ab Package more functions in LLVMWrapper 2017-09-19 22:10:57 -07:00
greg
a65544356c Fix bug in delete routine 2017-09-19 22:10:57 -07:00
greg
10d51cc29c Compile binexps 2017-09-19 22:10:57 -07:00
greg
95b773de7f Compilation sequence
-move all steps of the llvm IR compilation process into the binary
2017-09-19 22:10:57 -07:00
greg
c032da712f Successfully compiling a main function 2017-09-19 22:10:57 -07:00
greg
cfb93d9dea Compilation that returns an output code works 2017-09-19 22:10:57 -07:00
greg
08798fb690 Move all LLVM functions into LLVMWrap
so I can kill the global unsafe
2017-09-19 22:10:57 -07:00
greg
e0eef5e58f More moving functions around 2017-09-19 22:10:57 -07:00
greg
2107e6344e More function wrapping 2017-09-19 22:10:57 -07:00
greg
2ad65a1c5d Some in-progress work 2017-09-19 22:10:57 -07:00
greg
96c51a9b88 Move some more unsafe code into block 2017-09-19 22:10:57 -07:00
greg
47f4c25020 Doing some wrapping 2017-09-19 22:10:56 -07:00
greg
c18c1a639a compilation does something usefl
Following along with:
http://blog.ulysse.io/2016/07/03/llvm-getting-started.html
2017-09-19 22:10:56 -07:00
greg
d3f6bbabaa Starting to add actual LLVM generating code 2017-09-19 22:10:56 -07:00
greg
6a0b50f278 Kill hashmap import for now 2017-09-19 22:10:56 -07:00