about summary refs log tree commit diff stats
path: root/subx/apps/assort
Commit message (Collapse)AuthorAgeFilesLines
...
* 5180Kartik Agaram2019-05-161-0/+0
| | | | | | | Clean up some old TODOs related to our pre-mmap limitations. Also caught another case of using the wrong comparison. When comparing addresses, one must always use unsigned rather than signed jump instructions.
* complete the skeleton of dquotes.subxKartik Agaram2019-05-151-0/+0
| | | | | | | | | | | | | | | | Still some failing tests: - emit-string-literal-data doesn't ignore metadata when computing the length of literal strings - emit-string-literal-data doesn't handle escape sequences One issue doesn't have a failing test: - emit-metadata doesn't handle string literals containing '/' All these open issues involve a common design question: how to parse a 'word' that includes a string literal that may include spaces. For everything else I know words can't contain spaces and datums can't contain slashes. But for string literals things are tougher.
* Merge branch 'dquotes' into dquotes-1Kartik Agaram2019-05-131-0/+0
|\ | | | | | | | | dquotes.subx is now segfaulting after this merge. Seems to be trying to use addresses from the old stack.
| * start using the new carry flagKartik Agaram2019-05-131-0/+0
| | | | | | | | | | Skimping on tests; the code changes seem pretty trivial. Will this fix CI?!
| * 5156 - error-checking on writes to fileKartik Agaram2019-05-111-0/+0
| | | | | | | | | | | | | | Pretty blunt for now; just abort the entire program on any failure to write. I'm encountering it because I'm somehow treating a stream address as a file descriptor. Maybe mmap is returning addresses below 0x08000000?
| * 5154Kartik Agaram2019-05-111-0/+0
| | | | | | | | | | Bugfix: I'd neglected to update the input stream's state when natively writing a stream to file.
| * 5153Kartik Agaram2019-05-111-0/+0
| |
* | Merge branch 'master' into dquotes-1Kartik Agaram2019-05-101-0/+0
|\| | | | | | | Segfault in this branch is now fixed.
| * 5151 - use mmap everywhere we need a heapKartik Agaram2019-05-101-0/+0
| | | | | | | | | | All tests passing now. Things are very explicit; before a program can `allocate` memory, it has to first obtain a segment from the OS using `new-segment`.
| * 5145Kartik Agaram2019-05-041-0/+0
| |
| * 5135Kartik Agaram2019-05-041-0/+0
| |
* | new primitives: append-byte, append-byte-hexKartik Agaram2019-05-021-0/+0
| | | | | | | | | | | | | | These are variants of write-byte-buffered and print-byte-buffered respectively that operate on in-memory `stream`s rather than `buffered-file`s. They don't operate on files, so we'll avoid using the prefix 'write-'.
* | standardize function namesKartik Agaram2019-05-021-0/+0
|/ | | | | Operations on buffered-file now always include the word 'buffered'. More verbose, but hopefully this highlights holes in the library.
* 5118 - convert int to stringKartik Agaram2019-04-231-0/+0
|
* 5115Kartik Agaram2019-04-221-0/+0
|
* 5105Kartik Agaram2019-04-161-0/+0
| | | | | Pull in a _different_ function than `next-word` (commit 5092) into a shared file between phases. Let's see how this goes.
* 5092Kartik Agaram2019-04-151-0/+0
| | | | | | | Realization: 'next-word' can't be reused in converting string literals, because it has to understand string literals. Let's just keep each phase self-contained.
* 5090Kartik Agaram2019-04-131-0/+0
| | | | | | | Start using the new newline escape in string literals everywhere. I could use it more aggressively, but it makes tests harder to read. So only one line of text per string for now.
* 5087Kartik Agaram2019-04-121-0/+0
| | | | | | | | Fix CI. For some reason allocating 4KB natively on Linux triggers a segfault. Temporarily reducing segment size to 256 bytes; that's large enough for the test. But it's not a long-term solution. Maybe I need to grow the heap with sbrk()?
* 5085 - 'assort' phase done!Kartik Agaram2019-04-121-0/+0
| | | | | | | | | | | | | | | | | Current plan for SubX translator: $ cat files.subx ... |assort |pack |survey |hex > a.out Higher-level notations will be inserted at the start of the pipeline. The first (and needed for bootstrapping) is for string literals. $ cat files.subx ... |string-literals |assort |pack |survey |hex > a.out Alternatively, we should check how often we use string literals and just convert them by hand. They're used all over in tests, and converting them would make tests hard (even harder) to read.
* 5080Kartik Agaram2019-04-111-0/+0
|
* 5076Kartik Agaram2019-04-101-0/+0
|
* 5075Kartik Agaram2019-04-101-0/+0
|
* 5062Kartik Agaram2019-04-061-0/+0
|
* 5060Kartik Agaram2019-04-061-0/+0