about summary refs log tree commit diff stats
path: root/subx
Commit message (Collapse)AuthorAgeFilesLines
* 5475 - disallow programs using uppercase hexKartik Agaram2019-07-252-1/+31
| | | | | This makes the C++ translator more consistent with the self-hosted translator.
* 5474Kartik Agaram2019-07-252-31/+31
|
* 5473Kartik Agaram2019-07-251-3/+3
|
* 5472 - disallow programs without `Entry` labelsKartik Agaram2019-07-253-18/+59
| | | | | | | | | This makes the C++ translator more consistent with the self-hosted translator. We go through some contortions to continue supporting unit tests without 'Entry' labels. But we still want to throw good errors when translating .subx files at the commandline.
* 5471Kartik Agaram2019-07-252-15/+0
| | | | | Purge all traces of the old assumption that segment 0 is code and segment 1 is data.
* 5470Kartik Agaram2019-07-251-4/+0
|
* 5469Kartik Agaram2019-07-252-2/+2
|
* 5467Kartik Agaram2019-07-241-31/+14
| | | | Fix CI by disabling non-native runs that run out of memory.
* 5466 - demo self-hosting in ReadmeKartik Agaram2019-07-241-0/+23
|
* 5465Kartik Agaram2019-07-241-4/+16
| | | | Include phases of self-hosted SubX translator in CI.
* 5464Kartik Agaram2019-07-241-23/+23
| | | | Include simple apps in CI.
* 5463Kartik Agaram2019-07-242-1/+1
|
* 5462 - What's next for Mu? Look here.Kartik Agaram2019-07-241-28/+13
|
* 5461 - SubX is now self-hosting!Kartik Agaram2019-07-246-1/+1
| | | | | All extant SubX programs generate identical binaries using either the C++ or the self-hosted SubX translators.
* 5460Kartik Agaram2019-07-2414-12/+24
| | | | | | | | | | | A little more resizing of buffers. apps/hex.subx is now building an identical binary. I'm now aborting on allocation failures. That requires disabling a couple of tests. (I'm not quite confident enough of this decision to delete them outright.) I want to treat all segfaults as bugs, and machine code is no place to add boilerplate checks for return values of standard library functions.
* 5459Kartik Agaram2019-07-231-4/+6
|
* 5458Kartik Agaram2019-07-222-29/+30
| | | | | | Ensure we don't create overly long lines. Now this works: $ ./diff_ntranslate 0*.subx apps/subx-common.subx
* 5457Kartik Agaram2019-07-222-0/+2
|
* 5456Kartik Agaram2019-07-221-0/+0
| | | | Fix CI.
* 5455Kartik Agaram2019-07-226-247/+130
| | | | | Clean up. All apps now translating correctly except for the phases of the self-hosted translator. Next step: SubX-in-SubX in SubX-in-SubX.
* 5454Kartik Agaram2019-07-228-1/+1
| | | | Bugfix fifteen -- on the C++ side.
* 5453Kartik Agaram2019-07-222-13/+107
| | | | All that debugging and it turns out the bug is on the C++ side!
* 5452Kartik Agaram2019-07-222-120/+161
| | | | | | | | | | | | | | Snapshot while debugging survey.subx by print. I can see the error in 1 minute with this command: subx run apps/survey < a.pack (where a.pack is obtained from `ntranslate 049*.subx 05[0-8]*.subx`) By contrast, using the trace requires 4.5 minutes: subx --trace run apps/survey < a.pack It generates a trace of 4.4GB with almost 83M lines. The trace takes 2 minutes to load.. oops, I forgot to load labels with `--debug`.
* 5451Kartik Agaram2019-07-222-1/+99
| | | | | | | | | | | | | | Even though the standard library is building and passing tests, the binaries it generates aren't exactly bit for bit identical with the originals. Comparing using `diff_ntranslate`, it looks like the data segment starting address isn't computed right in survey.subx (`compute-addresses`) when I start translating layer 058. Deleting some tests brings the code segment to a p_offset where bits 8-11 (the lowest 4 bits excluding the lowermost byte) are cleared and everything works. However, if bits 8-11 are set, then they don't make it to p_vaddr and p_paddr. Tried reproducing with a unit test, but the unit test passes fine.
* 5450Kartik Agaram2019-07-222-0/+12
| | | | A couple of scripts that help debug discrepancies in the self-hosted translator.
* 5449Kartik Agaram2019-07-221-1/+4
| | | | Stop rebuilding example programs just because subx_bin got recreated.
* 5448Kartik Agaram2019-07-222-6/+14
| | | | Make the output of the `pack` phase a little easier to read.
* 5447Kartik Agaram2019-07-221-4/+8
| | | | Fix a timeout in CI.
* 5446Kartik Agaram2019-07-221-4/+4
| | | | Really fix CI.
* 5445Kartik Agaram2019-07-221-23/+28
| | | | Fix CI.
* 5444Kartik Agaram2019-07-221-0/+0
|
* 5443 - standard library is now self-hostedKartik Agaram2019-07-228-5/+17
| | | | | | | Translates 5k lines of input in 26 seconds. I'm not sure why I need to grow the label table. It was already 512 entries long, and I'm only using 373 so far.
* 5442Kartik Agaram2019-07-228-2/+74
| | | | | | | | | We can now translate layers 49-72 using the self-hosted translator. The translator has now demonstrated translation over 4k lines. Most verbose phase output is 325KB, even if the final binary is 15KB. Emulation is too slow now, so I'm back to debug by print on a Linux machine.
* 5441Kartik Agaram2019-07-221-0/+24
| | | | | Now our debug cycle passes through `translate` or `ntranslate`. Make sure we rebuild phases whenever we need to.
* 5440Kartik Agaram2019-07-222-18/+18
| | | | Fix CI.
* 5439Kartik Agaram2019-07-211-9/+0
|
* 5438 - raise error on uppercase hexKartik Agaram2019-07-2112-7/+72
| | | | | | | | | | | | | | | | | | We can now translate layers 49-56 using the self-hosted translator (`translate` and `ntranslate`). As a follow-up to commit 5404, the self-hosted translator is a little more strict than the C++ translator in 3 places: a) All .subx files must define a data segment. b) All .subx files must define an `Entry` label. c) All numbers must be in *lowercase* hex. In all cases, where programs work with the C++ translator but violate the self-hosted translator's assumptions, we must make sure we raise errors rather than silently emit bad code.
* 5437Kartik Agaram2019-07-2113-13/+13
| | | | Break a dependency from `print-int32` to `from-hex-char`.
* 5436 - support newlines in dquotesKartik Agaram2019-07-214-8/+85
|
* 5435 - redo 5426Kartik Agaram2019-07-214-6/+99
| | | | | We can now translate layers 49-55 using translate and ntranslate. Next step is to support '\n' in dquotes.subx.
* 5434Kartik Agaram2019-07-216-2/+18
|
* 5433Kartik Agaram2019-07-216-2/+2
|
* 5432Kartik Agaram2019-07-211-0/+0
|
* 5431 - starting to translate std libKartik Agaram2019-07-201-0/+33
| | | | | | | | | | Currently failing at layer 54: ``` $ time ./translate 049memory_layout.subx 05[0-4]*.subx; ./subx run a.elf test leaky-get-or-insert-slice: too many segments ``` Emulation is also damn slow. But running in native mode is fast.
* 5430 - all examples passingKartik Agaram2019-07-206-41/+333
| | | | | We now have a new pass called 'tests' which code-generates a new function called 'run-tests', just like the C++ layer `tests.cc`.
* 5429Kartik Agaram2019-07-209-0/+0
| | | | Fix CI.
* 5428Kartik Agaram2019-07-201-10/+22
|
* 5427Kartik Agaram2019-07-202-18/+1
|
* 5426Kartik Agaram2019-07-208-19/+23
|
* 5425Kartik Agaram2019-07-202-0/+14
|