From fb2ffbd0960d8e9a9e8fd9daa9dc688405016ba2 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 12 Apr 2019 10:51:33 -0700 Subject: 5085 - 'assort' phase done! 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. --- subx/010---vm.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'subx/010---vm.cc') diff --git a/subx/010---vm.cc b/subx/010---vm.cc index 9fbecbc0..6fac9cf7 100644 --- a/subx/010---vm.cc +++ b/subx/010---vm.cc @@ -223,8 +223,10 @@ inline uint8_t* mem_addr_u8(uint32_t addr) { result = &Mem.at(i).data(addr); } } - if (result == NULL) + if (result == NULL) { + if (Trace_file) Trace_file.flush(); raise << "Tried to access uninitialized memory at address 0x" << HEXWORD << addr << '\n' << end(); + } return result; } inline int8_t* mem_addr_i8(uint32_t addr) { -- cgit 1.4.1-2-gfad0