Commit Graph

44 Commits

Author SHA1 Message Date
Kartik Agaram 476049a09d .
Be more consistent about names of ends of a slice.
(In the opposite direction compared to last night's 925fc490d2ce8b8d411de87bd0af5b3a8a704213.)
2019-07-08 17:02:09 -07:00
Kartik Agaram b5da792904 .
minor style tweaks
2019-07-08 16:43:35 -07:00
Kartik Agaram 01b45300ed colocate compute-offsets with its globals 2019-07-08 16:38:32 -07:00
Kartik Agaram 925fc490d2 .
Be more consistent about names of ends of a slice.
2019-07-08 01:05:23 -07:00
Kartik Agaram 597ce7a943 . 2019-07-08 00:17:42 -07:00
Kartik Agaram 195d62f167 build `num-bytes` 2019-07-07 23:56:23 -07:00
Kartik Agaram c38b36e260 move `is-label?` to `subx-common` 2019-07-07 22:49:04 -07:00
nc c0a904382b made first compute-offset test pass 2019-07-07 21:19:50 -04:00
nc c17643b7a8 remove segfaults in survey.subx 2019-07-07 19:41:26 -04:00
Kartik Agaram fb8474af88 new failing test: emit-segments
Now the only piece I plan to not write tests for is emit-headers.
2019-07-07 13:19:51 -07:00
Kartik Agaram 633c289f30 . 2019-07-07 13:13:38 -07:00
Kartik Agaram 764b5726df move phase 3 out of helpers 2019-07-07 13:13:38 -07:00
nc b95060262e cleanup in compute-offset and fix bug in compute-width 2019-07-07 15:39:35 -04:00
nc 9ac5834194 more progress in compute-offset 2019-07-04 22:59:15 -04:00
nc f80a025e52 implement segment section in compute-offsets 2019-07-04 12:21:41 -04:00
Kartik Agaram c015791e80 .
Fix a couple of syntax errors.

survey.subx still failing tests.
2019-07-04 00:02:53 -07:00
nc d818fdd7e5 add todo for section thats not quite complete 2019-07-03 23:04:24 -04:00
nc 98096ca81e add is-label block 2019-07-03 23:02:14 -04:00
nc 87ef858628 updates to survey - part of compute-offsets implemented 2019-07-03 22:39:47 -04:00
Kartik Agaram 34cf8a7034 subx/survey: now computing label addresses 2019-07-02 14:24:44 -07:00
Kartik Agaram 7895d0a480 .
subx/survey/compute-addresses: Now computing segment starting addresses
correctly.
2019-07-02 13:45:48 -07:00
Kartik Agaram 9d5ba2dfbf . 2019-07-02 00:16:23 -07:00
Kartik Agaram dc8484384e . 2019-07-02 00:14:03 -07:00
Kartik Agaram 1c576e99d7 error in pseudocode for compute-offsets 2019-07-02 00:00:58 -07:00
Kartik Agaram 13be43dff9 .
Now tracing segment names correctly.
2019-07-01 23:46:22 -07:00
Kartik Agaram 22cea315f5 . 2019-07-01 23:29:14 -07:00
Kartik Agaram 0e510776d3 . 2019-07-01 23:24:45 -07:00
Kartik Agaram 065b82af2e .
Make `compute-addresses` less clever. Stop striding from the middle of
one row to the next. This way we'll also obviate the need for indexing
backwards from a pointer in the next commit.
2019-07-01 23:09:58 -07:00
Kartik Agaram 120a740871 some primitives for emitting traces
Kinda hacky, but might scale enough for machine code.

This was really hard to debug. Single tests passed, but when I ran all
tests I got breakage because tests long before (from the 056trace layer)
were not cleaning up properly.

My instinct was to call clear-stream on Trace-stream, which was wrong
(the trace didn't have the wrong contents, it was literally a bad
object). It was also wrong in a counter-productive way: calling
clear-stream on a real Trace stream (which is the size of a page of
memory) takes a long time in emulated mode.
2019-07-01 23:09:58 -07:00
nc 676a80bf15 add test data 2019-06-29 18:03:56 -04:00
nc 0721fb5891 Implement is-label? 2019-06-29 17:59:14 -04:00
Kartik Agaram aa09f29419 . 2019-06-28 18:24:44 -07:00
Kartik Agaram 8e9fde4210 initial draft of solution for 'compute-addresses'
No trace statements yet, so we don't know if it works.
2019-06-28 18:20:21 -07:00
Kartik Agaram a7e21dbdf7 .
Flesh out final test some more. We also now have a new family of
primitives for writing non-strings to input streams in tests.
2019-06-28 16:54:41 -07:00
Kartik Agaram b5f80415d6 pseudocode skeletons for all functions 2019-06-13 14:20:35 -07:00
Kartik Agaram acdd7a7a68 . 2019-06-13 01:08:02 -07:00
Kartik Agaram 55ea211d87 flesh out survey tests 2019-06-12 10:18:51 -07:00
Kartik Agaram 66bce436b3 .
Now that we don't have to edit code to run a single test, delete that
commented out fragment everywhere.
2019-06-12 00:13:34 -07:00
Kartik Agaram 35272969cf Fix stale `initialize-trace-stream` 2019-06-08 12:38:53 -07:00
Kartik Agaram 965dd1bf56 .
'get-or-insert-stream' is now the more generic 'get-or-insert' that can
handle tables of any value type. But callers have to be careful to cast
values to the right type.
2019-05-27 11:11:36 -07:00
Kartik Agaram 7c575de40d . 2019-05-26 13:18:16 -07:00
Kartik Agaram bd31dbe854 .
hoist 'Heap' variable into the std library in anticipation of the parse-array-of-ints
primitive.
2019-05-25 00:45:31 -07:00
Kartik Agaram 90fd6a669a .
add lengths to data blobs
2019-05-19 12:47:21 -07:00
Kartik Agaram 2a72df4a57 initial skeleton for survey.subx
Start of the final phase needed to implement SubX in SubX:

  $ cat files.subx ... |dquotes |assort |pack |survey |hex > a.elf

survey.subx is responsible for assigning addresses to labels and segments.
2019-05-18 14:30:50 -07:00