Commit Graph

10 Commits

Author SHA1 Message Date
Kartik Agaram 697d1d1213 4275
Fix CI.
2018-06-25 14:13:19 -07:00
Kartik Agaram 2caaa7f18f 4272 - type-check variables in non-local spaces
So far we only checked if a single recipe used a variable with multiple
types in any single space. Now we also ensure that the types deduced for
a variable in a space are identical across recipes.
2018-06-25 13:36:27 -07:00
Kartik Agaram 23d3a02226 4266 - space for alloc-id in heap allocations
This has taken me almost 6 weeks :(
2018-06-24 09:18:20 -07:00
Kartik Agaram 01ce563dfe 4262 - literal 'null' 2018-06-17 15:57:37 -07:00
Kartik Agaram dd66068298 4261 - start using literals for 'true' and 'false'
They uncovered one bug: in edit/003-shortcuts.mu
  <scroll-down> was returning 0 for an address in one place where I
  thought it was returning 0 for a boolean.

Now we've eliminated this bad interaction between tangling and punning
literals.
2018-06-17 00:29:22 -07:00
Kartik Agaram ce9b2b0515 4258 - undo 4257 2018-06-15 22:16:09 -07:00
Kartik Agaram 0edd9b9fc6 4257 - abortive attempt at safe fat pointers
I've been working on this slowly over several weeks, but it's too hard
to support 0 as the null value for addresses. I constantly have to add
exceptions for scalar value corresponding to an address type (now
occupying 2 locations). The final straw is the test for 'reload':

  x:num <- reload text

'reload' returns an address. But there's no way to know that for
arbitrary instructions.

New plan: let's put this off for a bit and first create support for
literals. Then use 'null' instead of '0' for addresses everywhere. Then
it'll be easy to just change what 'null' means.
2018-06-15 22:12:03 -07:00
Kartik K. Agaram 640d43bb7d 4145 - specializing recipe literals in `call` 2017-12-07 13:24:27 -08:00
Kartik K. Agaram aae198a93b 4099
Generalize commit 4089 to arbitrary closures, and not just the current
'space' or call frame. Now we should be treating spaces just like any
other data structure, and reclaiming all addresses inside them when we
need to.

The cost: all spaces must now specify what recipe generated them (so
they know how to interpret the array of locations) using the /names
property.

We can probably make this ergonomic with a little 'type inference'. But
at least things are safe now.
2017-11-01 02:46:41 -07:00
Kartik K. Agaram c5e4a41aa5 3974 2017-08-20 04:39:07 -07:00