about summary refs log tree commit diff stats
path: root/038new.cc
Commit message (Collapse)AuthorAgeFilesLines
* 2638Kartik K. Agaram2016-02-071-659/+0
|
* 2613 - better error message when forgetting 'shared'Kartik K. Agaram2016-01-281-7/+21
|
* 2609 - reuse test-recipe variables in sandbox/ testsKartik K. Agaram2016-01-271-0/+69
| | | | | | | | I'd feared that the refcount errors in the previous commit meant there was a bug in my ref-counting, so I temporarily used new variables rather than reusing existing ones. But it turns out the one remaining place memory corruption can happen is when recipes don't use default-scope and so end up sharing memory. Don't I have a warning for this?
* 2607Kartik K. Agaram2016-01-271-1/+0
|
* 2599 - abandon should clear its argumentKartik K. Agaram2016-01-231-11/+27
| | | | | Is this a violation of our requirement to always treat ingredients as immutable? We shouldn't be using it much anyway..
* 2584Kartik K. Agaram2016-01-211-1/+1
|
* 2583 - start maintaining refcountsKartik K. Agaram2016-01-211-2/+65
| | | | | | | | | | | | Also start auto-abandoning addresses when their refcount returns to 0. I'm mixing this auto-abandon support with my earlier/hackier support for automatically abandoning default-space created by 'local-scope'. We need to flesh out the story for automatically reclaiming memory using C++-style destructors. But that's a value-add. Memory corruption is far more important to avoid than memory *leaks*.
* 2581 - make space for the refcount in address:sharedKartik K. Agaram2016-01-201-13/+30
| | | | | | | | | | | We don't yet actually maintain the refcount. That's next. Hardest part of this was debugging the assume-console scenarios in layer 85. That took some detailed manual diffing of traces (because the output of diff was no good). New tracing added in this commit add 8% to .traces LoC. Commented out trace() calls (used during debugging) make that 45%.
* 2576 - distinguish allocated addresses from othersKartik K. Agaram2016-01-191-43/+88
| | | | | | | | | | | | | | | | This is the one major refinement on the C programming model I'm planning to introduce in mu. Instead of Rust's menagerie of pointer types and static checking, I want to introduce just one new type, and use it to perform ref-counting at runtime. So far all we're doing is updating new's interface. The actual ref-counting implementation is next. One implication: I might sometimes need duplicate implementations for a recipe with allocated vs vanilla addresses of the same type. So far it seems I can get away with just always passing in allocated addresses; the situations when you want to pass an unallocated address to a recipe should be few and far between.
* 2574Kartik K. Agaram2016-01-191-11/+4
|
* 2573 - check product type of 'new'Kartik K. Agaram2016-01-191-4/+29
| | | | | | | | | | | I realize that my current doesn't allow nesting a:b:c linear type syntax inside a dilated property. So you can't currently say: (recipe address:number) Need to fix that at some point. Non-trivial since linear syntax is oblivious to dilated syntax. I should probably make the dilated syntax more fundamental and introduce it at an earlier layer.
* 2571Kartik K. Agaram2016-01-191-0/+418
Reorganize layers in preparation for a better way to manage heap allocations without ever risking use-after-free errors.