diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-11-10 21:39:02 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-11-10 21:39:02 -0800 |
commit | 93d4cc937ee480952cb93f21e5a04a96296c8302 (patch) | |
tree | 99018782ac8bd84e1eae1f0650b89d2f72989dd2 /html/example1.png | |
parent | dc80c7b92a9c5e576436f5c877fa9ecc6883d152 (diff) | |
download | mu-93d4cc937ee480952cb93f21e5a04a96296c8302.tar.gz |
3663 - fix a refcounting bug: '(type)' != 'type'
This was a large commit, and most of it is a follow-up to commit 3309, undoing what is probably the final ill-considered optimization I added to s-expressions in Mu: I was always representing (a b c) as (a b . c), etc. That is now gone. Why did I need to take it out? The key problem was the error silently ignored in layer 30. That was causing size_of("(type)") to silently return garbage rather than loudly complain (assuming 'type' was a simple type). But to take it out I had to modify types_strictly_match (layer 21) to actually strictly match and not just do a prefix match. In the process of removing the prefix match, I had to make extracting recipe types from recipe headers more robust. So far it only matched the first element of each ingredient's type; these matched: (recipe address:number -> address:number) (recipe address -> address) I didn't notice because the dotted notation optimization was actually representing this as: (recipe address:number -> address number) --- One final little thing in this commit: I added an alias for 'assert' called 'assert_for_now', to indicate that I'm not sure something's really an invariant, that it might be triggered by (invalid) user programs, and so require more thought on error handling down the road. But this may well be an ill-posed distinction. It may be overwhelmingly uneconomic to continually distinguish between model invariants and error states for input. I'm starting to grow sympathetic to Google Analytics's recent approach of just banning assertions altogether. We'll see..
Diffstat (limited to 'html/example1.png')
0 files changed, 0 insertions, 0 deletions