Commit Graph

4916 Commits

Author SHA1 Message Date
Kartik Agaram 03c6f1d385 4949 2019-02-02 22:05:11 -08:00
Kartik Agaram cb82bd2364 4948
This seems like the final helper we need for Phase 2. Now to build the
business logic itself.
2019-02-02 15:21:48 -08:00
Kartik Agaram 4cb7d1fb77 4947
Bugfix: has-metadata? was corrupting registers

Seems uneconomic to write tests for stuff like this. Assembly is just not
the right layer to try to come up with a general solution or process. Keep
running your code and wait to find signs of breakage.
2019-02-01 23:52:36 -08:00
Kartik Agaram 77aa333c3c 4946 2019-02-01 23:51:58 -08:00
Kartik Agaram 0ad068dd1d 4945 2019-02-01 23:49:41 -08:00
Kartik Agaram 070659f917 4944
Improve syntax highlighting in the Readme.
2019-01-30 10:16:33 -08:00
Kartik Agaram 44bb71e7de 4943 2019-01-30 10:08:47 -08:00
Kartik Agaram 95540b2452 4942 2019-01-21 00:59:05 -08:00
Kartik Agaram f5fce35ebf 4941 2019-01-21 00:58:45 -08:00
Kartik Agaram ee2f7013c3 4940 2019-01-21 00:48:42 -08:00
Kartik Agaram 148ab0a23e 4939 2019-01-21 00:00:00 -08:00
Kartik Agaram c65dee2d99 4938 2019-01-20 23:20:34 -08:00
Kartik Agaram 332cbba31f 4937 2019-01-20 22:50:44 -08:00
Kartik Agaram 1f0f381303 4936 2019-01-18 22:30:38 -08:00
Kartik Agaram 305770aabc 4935 2019-01-16 11:17:07 -08:00
Kartik Agaram 0c11cafe79 4934 2019-01-16 11:16:34 -08:00
Kartik Agaram 71ee78f279 4933 2019-01-16 11:13:39 -08:00
Kartik Agaram 76733e1995 4932 2019-01-16 00:12:55 -08:00
Kartik Agaram 05cffaa69f 4931 2019-01-16 00:11:41 -08:00
Kartik Agaram bf58189697 4930 2019-01-15 16:36:24 -08:00
Kartik Agaram 7011322ad1 4929
Clean up primitives for converting from/to hex chars.
2019-01-15 14:11:26 -08:00
Kartik Agaram 8472406209 4928 2019-01-14 23:16:22 -08:00
Kartik Agaram 3f97166cf7 4927 2019-01-14 17:29:10 -08:00
Kartik Agaram 509f0a12ca 4926 2019-01-14 17:06:10 -08:00
Kartik Agaram feec2292b5 4925 2019-01-14 16:54:41 -08:00
Kartik Agaram a220427e72 4924
Restore update_html
2019-01-14 16:53:17 -08:00
Kartik Agaram 220ac38964 4923
We want slice-equal? for length-prefixed strings, not null-terminated "kernel"
strings.
2019-01-12 22:24:06 -08:00
Kartik Agaram e92fa89edf 4922 2019-01-11 18:12:05 -08:00
Kartik Agaram db8a9ab553 4921 2019-01-11 18:08:21 -08:00
Kartik Agaram dadae33848 4920 2019-01-11 17:50:29 -08:00
Kartik Agaram 44e030822e 4919 2019-01-10 17:19:00 -08:00
Kartik Agaram 89bcb56717 4918 2019-01-10 17:13:47 -08:00
Kartik Agaram 5a2e541c18 4917 2019-01-10 17:07:55 -08:00
Kartik Agaram 8b9dd2d1a9 4916
In the process of building slice primitives I found an out-of-bounds access
in write-byte.
2019-01-10 17:06:38 -08:00
Kartik Agaram f7f0d63182 4915
In the process of building next-token I finally added some support for a
debugging situation I've found myself in a couple of times: wondering "what
changed this memory location"?
2019-01-08 15:46:55 -08:00
Kartik Agaram 96a6bac52d 4914 2019-01-07 13:36:15 -08:00
Kartik Agaram 74a46597aa 4913 2019-01-07 13:34:16 -08:00
Kartik Agaram a4df80db2b 4912 2019-01-06 21:58:11 -08:00
Kartik Agaram aff782c429 4911 2019-01-06 12:52:33 -08:00
Kartik Agaram 458ee5e354 4910 2019-01-06 12:01:42 -08:00
Kartik Agaram 15ebb7eb9f 4909
Improve error checking to warn on unexpected displacements as well.
2019-01-05 13:02:42 -08:00
Kartik Agaram 2eb174d697 4908
Fix CI.

a) Update canonical binaries.
b) Fix an out-of-bounds access in `clear-stream`. This also required supporting
   a new instruction in `subx run` to load an imm8 into rm8.
2019-01-05 01:07:37 -08:00
Kartik Agaram aa96ac23a6 4907 2019-01-04 21:59:27 -08:00
Kartik Agaram bc20cc3d45 4906 - helper to allocate streams on the heap 2019-01-04 15:37:16 -08:00
Kartik Agaram 7b548ff5c5 4905 - safe ptr lookup is now 6 instructions
The lines within '{}' can now be turned into a macro like `E_X = deref(E_X)`,
parameterizing the register being modified.

Assumes the input is in a register but also saved elsewhere, so it's safe
to clobber and replace with the result.

Compare commit 4894. Used to take 9 instructions, 8 of them making loads/stores.
Now it's 6 instructions, 4 of them loads/stores (the one non-local load
is unchanged, of course). Key is to not consume more registers so we don't
have to push/pop them.
2019-01-04 11:29:12 -08:00
Kartik Agaram 8413cd9c9d 4904 2019-01-04 00:06:21 -08:00
Kartik Agaram e3118458b0 4903 2019-01-03 23:54:54 -08:00
Kartik Agaram 0ee4ff8193 4902 - initial sketch, stage 2 of compiler
I've agonized over this for a week; high time I saved a snapshot.
2019-01-03 23:51:52 -08:00
Kartik Agaram 634b162a98 4901 2019-01-03 17:02:17 -08:00
Kartik Agaram 1ffb27a045 4900
Finally really fix the CI failure of commit 4894.

This is a remainder to forget my knowledge of stack addresses in the SubX
VM when writing SubX programs. Otherwise my programs will work in the VM
but not natively. The only assumptions a SubX program should make about
its segment addresses are what's encoded in the ELF binary. Thanks to
https://en.wikipedia.org/wiki/Address_space_layout_randomization, it can't
know anything else.
2018-12-30 21:01:35 -08:00