diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-07-16 23:34:33 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-07-16 23:40:25 -0700 |
commit | c2a74205d690862d4df31682aa5bbe992227fda1 (patch) | |
tree | b570f38927e21af0ab05d4864cfd3676bb2b0880 /subx/010---vm.cc | |
parent | 70a999aaebbd05873be56b0460e0d4182397cfea (diff) | |
download | mu-c2a74205d690862d4df31682aa5bbe992227fda1.tar.gz |
5408
Bugfix ten: type error in `convert`. I was calling `rewind-stream` on a `buffered-file`. examples/ex1 is now just one nibble off the canonical. I *have* found one missing feature in the self-hosted translator, though: dquotes doesn't support newlines in strings, even though the C++ version does. dquotes parses them right, but the value initialized in the data segment is wrong.
Diffstat (limited to 'subx/010---vm.cc')
-rw-r--r-- | subx/010---vm.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/subx/010---vm.cc b/subx/010---vm.cc index 6ee41c9b..b54dd9d5 100644 --- a/subx/010---vm.cc +++ b/subx/010---vm.cc @@ -202,7 +202,9 @@ inline uint8_t* mem_addr_u8(uint32_t addr) { } if (result == NULL) { if (Trace_file) Trace_file.flush(); - raise << "Tried to access uninitialized memory at address 0x" << HEXWORD << addr << '\n' << die(); + raise << "Tried to access uninitialized memory at address 0x" << HEXWORD << addr << '\n' << end(); + DUMP(""); + exit(1); } return result; } @@ -222,6 +224,8 @@ inline uint32_t* mem_addr_u32(uint32_t addr) { if (Trace_file) Trace_file.flush(); raise << "Tried to access uninitialized memory at address 0x" << HEXWORD << addr << '\n' << end(); raise << "The entire 4-byte word should be initialized and lie in a single segment.\n" << end(); + DUMP(""); + exit(1); } return result; } |