about summary refs log tree commit diff stats
path: root/apps/desugar.subx
Commit message (Collapse)AuthorAgeFilesLines
* 5594 - rename 'desugar' to 'sigils'Kartik Agaram2019-08-311-4438/+0
| | | | There's going to be multiple forms of syntax sugar going forward.
* 5592 - switch register names to lowercaseKartik Agaram2019-08-261-1555/+1555
|
* 5590Kartik Agaram2019-08-251-1/+1
|
* 5589Kartik Agaram2019-08-251-0/+3
|
* 5586 - bugfix: no desugar inside string literalsKartik Agaram2019-08-251-3/+147
|
* 5583Kartik Agaram2019-08-251-9/+181
| | | | Clean up some missing error messages.
* 5581Kartik Agaram2019-08-251-1/+3
|
* .Kartik Agaram2019-08-251-1/+183
|
* desugar: more integration testsKartik Agaram2019-08-251-1/+206
|
* desugar: code-generation seems completeKartik Agaram2019-08-251-5/+291
|
* desugar: parsing seems completeKartik Agaram2019-08-251-37/+420
|
* parsing *(reg-disp)Kartik Agaram2019-08-251-0/+66
|
* parsing *(reg+reg)Kartik Agaram2019-08-251-21/+150
| | | | | | | | | Turns out there's an ambiguity even in this simple one-line language: when you see 'base+' you don't know whether the next token is the index or displacement. (Whereas a '-' would be unambiguous but is still not handled.) Fixing this ambiguity adds 15 instructions worth of complexity.
* parsing *(reg+disp)Kartik Agaram2019-08-241-8/+548
|
* .Kartik Agaram2019-08-241-1/+1
|
* integration tests for desugaring indirect modeKartik Agaram2019-08-241-2/+211
| | | | They caught a logic error.
* integration tests for desugaring direct modeKartik Agaram2019-08-241-0/+212
|
* use the results of parsing in emit-indirect-modeKartik Agaram2019-08-241-60/+33
|
* parsing *(reg)Kartik Agaram2019-08-241-0/+121
|
* .Kartik Agaram2019-08-231-0/+68
| | | | This is pretty complex, but I may not need any more registers.
* .Kartik Agaram2019-08-231-4/+14
|
* .Kartik Agaram2019-08-231-4/+12
| | | | | Some reorg as I realize I may have painted myself into a corner in this function. I have no registers left for the actual parsing.
* parsing *regKartik Agaram2019-08-231-2/+102
| | | | Isn't used yet, but baby steps.
* another error messageKartik Agaram2019-08-231-1/+64
|
* .Kartik Agaram2019-08-231-3/+3
|
* lexing complex expressions inside '*(...)'Kartik Agaram2019-08-231-19/+440
|
* couple of helpers for parsing expressions in parensKartik Agaram2019-08-221-0/+330
|
* .Kartik Agaram2019-08-161-2/+2
|
* sketch of a plan to implement indirect modeKartik Agaram2019-08-161-2/+60
|
* desugar: code-generate *regKartik Agaram2019-08-161-1/+244
|
* plan for supporting indirect modeKartik Agaram2019-08-161-22/+28
| | | | | | | | | | | It may superficially seem like there's a simpler approach: - emit '3/mod' or '0/mod' depending on whether the character is '%' or '*' - increment the start of word-slice - look up the register and emit the appropriate /rm32 But that won't work for 1/mod or 2/mod. We're doing a little bit of upfront planning.
* .Kartik Agaram2019-08-161-4/+4
|
* get desugar working on the commandlineKartik Agaram2019-08-131-6/+54
|
* better error message when get abortsKartik Agaram2019-08-121-1/+2
|
* table-based register conversionKartik Agaram2019-08-011-148/+176
| | | | | | | Requires a change to the C++ translator: support string literals in all segments, not just the code segment. (The self-hosted translator already had this.)
* .Kartik Agaram2019-08-011-26/+28
| | | | | First step to cleaning up `desugar-register`: extract the common '%' to register literals.
* desugar: code-generate %regKartik Agaram2019-07-311-25/+25
| | | | | We're no longer just emitting the register code. We emit all arguments with appropriate metadata.
* .Kartik Agaram2019-07-311-1/+8
|
* desugar: clean up top-level `convert`Kartik Agaram2019-07-311-42/+82
| | | | | | | | | Model it on `dquotes` rather than `pack`, since it needs almost zero state across words. Manual testing: $ echo 'ab %eax' |subx run apps/desugar ab 0
* Merge branch 'master' into desugarKartik Agaram2019-07-281-0/+378