Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 5990 | Kartik Agaram | 2020-02-06 | 1 | -1/+1 |
| | |||||
* | 5989 | Kartik Agaram | 2020-02-06 | 2 | -17/+28 |
| | | | | | | Start pushing dummy vars for labels on the stack as we encounter them. This won't affect cleanup code, but will make it easy to ensure that jumps are well-structured. | ||||
* | 5988 | Kartik Agaram | 2020-02-06 | 2 | -41/+17 |
| | | | | | | | Clean up data structures and eliminate the notion of named blocks. Named blocks still exist in the Mu language. But they get parsed into a uniform block data structure, same as unamed blocks. | ||||
* | 5987 | Kartik Agaram | 2020-02-06 | 2 | -7/+7 |
| | |||||
* | 5986 | Kartik Agaram | 2020-02-06 | 2 | -43/+1 |
| | |||||
* | 5985 | Kartik Agaram | 2020-02-06 | 2 | -40/+30 |
| | | | | | Standardize on a single block name. This simplifies some code and will also help in the next couple of steps. | ||||
* | 5984 - start labeling all blocks | Kartik Agaram | 2020-02-05 | 2 | -165/+289 |
| | | | | | | | | This will come in handy for the remaining cases where we need to clean up locals on the stack: loop after var non-local break with vars in intervening blocks non-local loop with vars in intervening blocks | ||||
* | 5982 - start putting block labels on the var stack | Kartik Agaram | 2020-02-05 | 2 | -26/+41 |
| | | | | | | | | | | | | | | | | | | | | | Before: we detected labels using a '$' at the start of an arg, and turned them into literals. After: we put labels on the var stack and let the regular lookup of the var stack handle labels. This adds complexity in one place and removes it from another. The crucial benefit is that it allows us to store a block depth for each label. That will come in handy later. All this works only because of a salubrious coincidence: Mu labels are always at the start of a block, and jumps always refer to the name at the start of a block, even when the jump is in the forwards direction. So we never see label uses before definitions. Note on CI: this currently only works natively, not emulated. | ||||
* | 5981 - decompose block cleanup into two traversals | Kartik Agaram | 2020-02-02 | 2 | -35/+113 |
| | | | | | Momentarily less efficient, but we will soon need the ability to emit cleanup code without losing all our state. | ||||
* | 5980 | Kartik Agaram | 2020-02-02 | 1 | -3/+3 |
| | |||||
* | 5979 | Kartik Agaram | 2020-02-02 | 1 | -2/+3 |
| | | | | | | | Continuing to think about how to translate vars in a block when they're followed by early exits. To clean up everything between a statement and a target label, we need to know somehow the depth the target is defined at. | ||||
* | 5978 | Kartik Agaram | 2020-02-02 | 1 | -1/+4 |
| | |||||
* | 5977 | Kartik Agaram | 2020-02-02 | 2 | -4/+5 |
| | |||||
* | 5974 - support for simple early exits | Kartik Agaram | 2020-02-02 | 2 | -1/+84 |
| | | | | | | | | | | | | | | | So far we only handle unlabeled break instructions correctly. That part is elegance itself. But the rest will need more work: a) For labeled breaks we need to insert code to unwind all intervening blocks. b) For unlabeled loops we need to insert code to unwind the current block and then loop. c) For labeled loops we need to insert code to unwind all intervening blocks and then loop. Is this even worth doing? I think so. It's pretty common for a conditional block inside a loop to 'continue'. That requires looping to somewhere non-local. | ||||
* | 5973 | Kartik Agaram | 2020-02-02 | 1 | -369/+1 |
| | |||||
* | 5971 - emit code with indentation | Kartik Agaram | 2020-02-01 | 2 | -256/+309 |
| | | | | This is easy now that we're tracking block depths everywhere. | ||||
* | 5970 - support block-scoped variables | Kartik Agaram | 2020-02-01 | 2 | -6/+186 |
| | |||||
* | 5966 - document all supported Mu instructions | Kartik Agaram | 2020-01-31 | 2 | -9/+9 |
| | |||||
* | 5962 - string literals | Kartik Agaram | 2020-01-30 | 2 | -6/+43 |
| | |||||
* | 5961 | Kartik Agaram | 2020-01-30 | 2 | -3/+2 |
| | |||||
* | 5954 - 'factorial' working! | Kartik Agaram | 2020-01-29 | 1 | -0/+19 |
| | |||||
* | 5953 - 'multiply' instruction | Kartik Agaram | 2020-01-29 | 2 | -0/+13 |
| | |||||
* | 5951 - 'compare' instructions | Kartik Agaram | 2020-01-29 | 2 | -9/+376 |
| | |||||
* | 5948 - branching to named blocks | Kartik Agaram | 2020-01-29 | 15 | -13/+415 |
| | |||||
* | 5947 - add a new field to primitives | Kartik Agaram | 2020-01-29 | 2 | -4/+92 |
| | | | | For supporting branches with a target. | ||||
* | 5946 | Kartik Agaram | 2020-01-29 | 2 | -6/+6 |
| | |||||
* | 5945 - branches | Kartik Agaram | 2020-01-28 | 2 | -0/+285 |
| | |||||
* | 5943 - initial support for named blocks | Kartik Agaram | 2020-01-28 | 2 | -132/+245 |
| | |||||
* | 5942 - initial support for blocks | Kartik Agaram | 2020-01-28 | 2 | -8/+77 |
| | | | | This was too easy. But there are dragons ahead. | ||||
* | 5940 - local vars in registers starting to work | Kartik Agaram | 2020-01-27 | 2 | -31/+151 |
| | |||||
* | 5939 | Kartik Agaram | 2020-01-27 | 1 | -3/+0 |
| | |||||
* | 5938 | Kartik Agaram | 2020-01-27 | 1 | -0/+1 |
| | |||||
* | 5936 - permit commas everywhere | Kartik Agaram | 2020-01-27 | 3 | -12/+52 |
| | |||||
* | 5933 | Kartik Agaram | 2020-01-27 | 10 | -2/+2 |
| | | | | Expand some buffer sizes to continue building mu.subx natively. | ||||
* | 5932 | Kartik Agaram | 2020-01-27 | 1 | -0/+10 |
| | |||||
* | 5931 | Kartik Agaram | 2020-01-27 | 1 | -1/+1 |
| | |||||
* | 5929 - local variables kinda working | Kartik Agaram | 2020-01-27 | 2 | -6/+171 |
| | |||||
* | 5928 | Kartik Agaram | 2020-01-27 | 2 | -4/+2 |
| | |||||
* | 5927 | Kartik Agaram | 2020-01-27 | 1 | -15/+15 |
| | |||||
* | 5926 | Kartik Agaram | 2020-01-27 | 1 | -12/+12 |
| | |||||
* | 5924 | Kartik Agaram | 2020-01-27 | 23 | -518/+518 |
| | |||||
* | 5923 - start work on code-generation for 'var' | Kartik Agaram | 2020-01-27 | 2 | -3/+45 |
| | |||||
* | 5921 | Kartik Agaram | 2020-01-26 | 2 | -5/+130 |
| | |||||
* | 5920 | Kartik Agaram | 2020-01-26 | 2 | -29/+57 |
| | |||||
* | 5919 | Kartik Agaram | 2020-01-26 | 2 | -24/+0 |
| | |||||
* | 5918 | Kartik Agaram | 2020-01-26 | 2 | -22/+11 |
| | |||||
* | 5916 | Kartik Agaram | 2020-01-22 | 2 | -3/+3 |
| | |||||
* | 5913 | Kartik Agaram | 2020-01-20 | 1 | -6/+0 |
| | |||||
* | 5911 - support for compound types | Kartik Agaram | 2020-01-20 | 2 | -15/+13 |
| | |||||
* | 5909 | Kartik Agaram | 2020-01-20 | 1 | -18/+62 |
| | | | | Draft 5. |