Nathan Braswell
|
405ee70db8
|
Change ADTs to generate a copy_construct() that returns this, which should be our new default. Fix storing functions in vectors (lots of bugs here, with funciton types in templates, sizeof, returned by ref, etc. might have missed a few more, put in some warning comments
|
2018-06-12 23:29:39 -04:00 |
|
Nathan Braswell
|
eefa752d55
|
shortening of str and vec
|
2018-05-22 19:43:54 -04:00 |
|
Nathan Braswell
|
b8213dfc9f
|
Fix character value handling. String stuff appears to work correctly in bytecode now
|
2018-03-22 00:51:57 -04:00 |
|
Nathan Braswell
|
91768a042e
|
Fix/refactor value handling: value strings are now parsed in ast_transformation and re-escaped in c_generator, and used raw in bytecode_generator
|
2018-03-19 21:03:06 -04:00 |
|
Nathan Braswell
|
5b46089694
|
Stop declaring variable before assignment - i don't think necessary for recursive closure, def not in current code, and messes up globals with values
|
2018-03-06 23:30:00 -05:00 |
|
Nathan Braswell
|
adcebb3284
|
Move towards more legit stack setup api and registers as registers
|
2018-02-27 23:53:08 +00:00 |
|
Nathan Braswell
|
c0209118e5
|
Small cleanup
|
2018-01-02 23:22:46 -05:00 |
|
Nathan Braswell
|
241764f1f4
|
Clean up
|
2017-12-27 16:49:08 -05:00 |
|
Nathan Braswell
|
cb720e5cd6
|
working on moving rest of obj stuff into obj_lower
|
2017-11-03 00:39:58 -04:00 |
|
Nathan Braswell
|
5b8ef4ce2e
|
some cleanup
|
2017-10-29 17:53:30 -04:00 |
|
Nathan Braswell
|
0132ade7ed
|
10% or so speed up
|
2017-10-28 15:28:34 -04:00 |
|
Nathan Braswell
|
13f1e9df89
|
More clean up; need to add return type checking pass so that can clean up c_generator more.
|
2017-10-23 01:08:25 -04:00 |
|
Nathan Braswell
|
6964df5ac8
|
Remove code_triple entirely!
|
2017-10-23 00:06:25 -04:00 |
|
Nathan Braswell
|
e70d31a51c
|
Add in address_of_ensure_variable_lower.krak that makes sure & can always take a reference, even of a constant, etc, and start the cleanup of c_generator that this allows
|
2017-10-22 21:41:58 -04:00 |
|
Nathan Braswell
|
73faf50053
|
tiny cleanup
|
2017-09-02 09:12:25 -04:00 |
|
Nathan Braswell
|
00f29fe6a5
|
small clean up
|
2017-08-27 14:15:09 -04:00 |
|
Nathan Braswell
|
e4326233dc
|
a bit more cleanup
|
2017-08-23 10:12:00 -04:00 |
|
Nathan Braswell
|
36d7581cb0
|
further simplify the function call function
|
2017-08-22 20:52:27 -04:00 |
|
Nathan Braswell
|
4921371afe
|
Cleaned up generate_function_call. It's quite understandable now!
|
2017-08-18 10:05:12 -04:00 |
|
Nathan Braswell
|
9621ce85a6
|
Always error, remove some chaff
|
2017-08-15 19:53:17 -04:00 |
|
Nathan Braswell
|
0cf9beb057
|
Function value lower can self-host!
|
2017-08-15 01:55:44 -04:00 |
|
Nathan Braswell
|
bdb9e313b5
|
push forward. Current problem is double closed things
|
2017-06-21 02:12:00 -04:00 |
|
Nathan Braswell
|
8166db37ac
|
Closures working! (in the basic case, anyway)
|
2017-06-06 01:33:18 -04:00 |
|
Nathan Braswell
|
265a994858
|
Can call non-closure no parameter lambdas
|
2017-04-17 21:15:14 -04:00 |
|
Nathan Braswell
|
9662197c21
|
comment out the as value part
|
2017-03-16 19:05:45 -04:00 |
|
Nathan Braswell
|
754ff41226
|
C_generator can call raw function pointers now
|
2017-01-28 00:09:13 -05:00 |
|
Nathan Braswell
|
dad0f780bb
|
Groundwork for closure lowering, run raw function pointer type
|
2017-01-26 23:58:48 -05:00 |
|
Nathan Braswell
|
987e6eb9a5
|
Cleaning up to bring into main. Speed problem seems to have dissapeard, but we have fixes and the ^ operator in here
|
2017-01-24 22:11:33 -05:00 |
|
Nathan Braswell
|
f0a657e80f
|
Fix invalid malloc on slice
|
2017-01-23 23:00:26 -05:00 |
|
Nathan Braswell
|
3a7f73b711
|
sigh
|
2017-01-23 01:09:31 -05:00 |
|
Nathan Braswell
|
beb50b8e25
|
3 sec laptop speed improvement in hash_map
|
2017-01-22 16:36:04 -05:00 |
|
Nathan Braswell
|
e2639989c9
|
ref_lower now generates C, though a ton of syntax errors
|
2017-01-20 01:11:06 -05:00 |
|
Nathan Braswell
|
fb63eee9e8
|
Commit pre enabling CTCE pass (which is quite slow, but does work). Had to add walking through cast nodes for finding variables to close over. Also had to remove the static in front of functions to prevent gcc compiling it so that it segfaults (doesn't segfault if compiled with clang, but wanted to make sure.)
|
2016-07-09 15:08:57 -07:00 |
|
Nathan Braswell
|
dc5fe39083
|
Added static to non extern non main functions in c_generator giving a 12 second compilation speedup - added a nodes touched pass, commented out in main, and fixed the test_extern test to use the right printf arguments.
|
2016-07-06 22:46:57 -07:00 |
|
Nathan Braswell
|
0f2ac1421a
|
Basic CTCE working! In between commit because #link(a) syntax changed to #link(a)
|
2016-07-03 22:50:42 -07:00 |
|
Nathan Braswell
|
6fee942756
|
Refactored interpreter into just functions, added a REPL to the main kraken.
|
2016-07-03 15:32:45 -07:00 |
|
Nathan Braswell
|
87c2b1d2c1
|
Interpreter up to 71/73 tests passing, the only ones that don't yet are the future ones. Struct size is still wrong though
|
2016-07-03 01:55:32 -07:00 |
|
Nathan Braswell
|
284d8ac9c7
|
Fixed up interpreter, ADT is close to working but something's weird about what match statements are translated into
|
2016-06-27 01:21:24 -07:00 |
|
Nathan Braswell
|
15fe2aeba4
|
Moved copy_constructing into functions and destructing the results into obj_lower. Removed all defer_stack from c_generator. The last thing should be to move ref handling into obj_lower or maybe a pass after, then the rest of c_generator can be cleaned up and fixing interpreter (except for closures) should be easy.
|
2016-06-26 04:44:54 -07:00 |
|
Nathan Braswell
|
4cc0d26c4c
|
Now && and || short circuiting is done in obj_lower
|
2016-06-25 23:56:07 -07:00 |
|
Nathan Braswell
|
dd8fbc0489
|
moved munging while and for into obj_lower
|
2016-06-25 16:02:53 -07:00 |
|
Nathan Braswell
|
e3607beabe
|
Refactor parameter destruction into obj_lower
|
2016-06-24 01:42:48 -07:00 |
|
Nathan Braswell
|
29eff2a23e
|
Fix defer_lower to handle return statements, starting on obj_lower which has now taken over calling destruct for declared varaibles. Some of the code from the c_generator has been commented out or bypassed to use the new system - it should be removed when it's complete.
|
2016-06-22 01:41:57 -07:00 |
|
Nathan Braswell
|
26e7ee249a
|
Now using adt_lower, which also makes the backing deconstruct a reference, which makes sense
|
2016-06-20 01:52:28 -07:00 |
|
Nathan Braswell
|
4a33a94b15
|
Fixed, working unions. Had to move the is_union member to the end. I'm not sure if this is a C bug or an effect of me doing something weird somewhere
|
2016-06-16 23:06:38 -07:00 |
|
Nathan Braswell
|
3f89cb1e37
|
partial rollback, might still not work
|
2016-06-16 09:53:15 -07:00 |
|
Nathan Braswell
|
4de7dd1210
|
Added support for unions as a step towards lowering ADTs in the next pass to be written.
|
2016-06-15 22:26:03 -07:00 |
|
Nathan Braswell
|
d44293a48b
|
Defer is now lowered in its own pass as a first step towards refactoring other things into their own passes as well
|
2016-06-15 01:36:59 -07:00 |
|
Nathan Braswell
|
27fea0e90c
|
work on multithread, interpreter, and prototyped a #line-in-simple-passthrough ast changing pass turned on with -g
|
2016-06-14 02:14:25 -07:00 |
|
Nathan Braswell
|
2c8c3af48a
|
Some speed improvements
|
2016-06-11 00:45:18 -07:00 |
|