about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
...
* 2832 - support static arrays in rewrite_stashKartik K. Agaram2016-04-131-2/+18
| | | | Thanks Ella and Caleb for finding this.
* 2831 - bugfix in static arraysKartik K. Agaram2016-04-132-10/+41
| | | | | | | | | | | I'd started using size_of() in transforms at some point, but not gotten around to actually updating it to support arrays before run-time. Wish there was a way I could statically enforce that something is only called at transform time vs runtime. Thanks Ella and Caleb Couch for finding this issue. Static arrays are likely still half-baked, but should get a thorough working-over in coming weeks.
* 2830 - bring back deleted test from 2829Kartik K. Agaram2016-04-103-9/+26
| | | | Issue 1 in 2829 is now fixed.
* 2829 - issues while switching to 'put'Kartik K. Agaram2016-04-104-51/+27
| | | | | | | | | | | | | | | | 1. It turns out we couldn't overload 'get' and 'get-address' until now, because transform_names looks for those names, and the resolve_ambiguous_calls transform happens before transform_names. Why does resolve_ambiguous_calls happen before transform_names? Because if my students made mistakes in the ingredients to an instruction they got overzealous errors from resolve_ambiguous_calls. Now this impacts 'put' as well, which is already overloaded for tables. Not sure what to do about this; I'm going to go back to the overzealous errors, and just teach students to visually scan past them for now. 2. I need addresses in a third place besides storing to containers and arrays, and managing the heap -- to synchronize routines. wait-for-location requires an address. Not sure what to do about this..
* 2828Kartik K. Agaram2016-04-101-3/+13
|
* 2827 - start replacing 'get-address' with 'put'Kartik K. Agaram2016-04-102-0/+79
| | | | | | | Current plan: - get rid of get-address and index-address, and therefore any address that is not address:shared - rename address:shared to just 'shared'
* 2826Kartik K. Agaram2016-04-101-4/+12
|
* 2825Kartik K. Agaram2016-04-101-2/+2
|
* 2824Kartik K. Agaram2016-04-102-11/+0
| | | | | Undo commit 9da3fc3118; looks like we don't need it anymore, and the test was poorly done. Let's see if we hit the error again.
* 2823Kartik K. Agaram2016-04-102-7/+7
|
* 2822Kartik K. Agaram2016-04-101-1/+1
|
* 2821 - addresses before containersKartik K. Agaram2016-04-102-63/+46
|
* 2820Kartik K. Agaram2016-04-011-1/+4
|
* 2819Kartik K. Agaram2016-03-311-2/+2
|
* 2818Kartik K. Agaram2016-03-283-7/+5
|
* 2817Kartik K. Agaram2016-03-282-52/+2
|
* 2816Kartik K. Agaram2016-03-273-3/+2
| | | | Move all bounds checks for types and recipes to one place.
* 2815Kartik K. Agaram2016-03-272-2/+2
|
* 2814Kartik K. Agaram2016-03-271-22/+22
|
* 2813Kartik K. Agaram2016-03-271-0/+4
|
* 2812Kartik K. Agaram2016-03-2799-2852/+3992
|
* 2811Kartik K. Agaram2016-03-271-4/+4
|
* 2810 - undo 2767, reclaiming local allocationsKartik K. Agaram2016-03-241-20/+25
| | | | | | | | | | | | | | | | | | | | | | | I realize that there's still a serious problem with refcounts. Everything's fine as long as I copy those shared addresses manually elsewhere, but there's a couple of places where I just do a memcopy right now without any extra smarts: in 'copy' and 'merge' instructions. I need to replace support for arbitrary types in these instructions, and replace it with transforms to generate the right code. Mu basically needs copy constructors and destructors, so that containers can decrement the refcounts of any elements (or elements of elements, or elements of elements of elements..) that are shared addresses. But my confidence in this whole approach is shaken. Maybe I should stop this project. It's turning into a language+OS design project where I was hoping that being a toy would shelter me from these concerns. I just want to explore turning manual tests into reproducible automatic ones. Maybe I should just build libraries for each interface to hardware (network, disk, screen, keyboard, ...) in C++11 or something. Use no high-level libraries for sockets, files, etc. Instead rely on just the kernel syscalls, memory allocator, RAII, STL. Build things from scratch atop those building blocks.
* 2809Kartik K. Agaram2016-03-231-0/+2
|
* 2808 - quick fix for memory corruptionKartik K. Agaram2016-03-221-9/+7
| | | | | | | | | | Thanks Caleb for finding this. Repeatedly running sandboxes was in some reliably reproducing situations causing 'new' to return 1, or to run into writes to the free list. No test yet; the issue is likely only mitigated at this point, not fixed. Even if routines share the Free_list, that should probably not cause memory corruption.
* 2807 - exclude .traces/ and html/ in 'git log'Kartik K. Agaram2016-03-221-0/+8
|
* 2806 - bugfix: cleaning up in 'reload'Kartik K. Agaram2016-03-213-10/+39
| | | | | | | | | | | | | | | This brings back some of the complexity I thought I'd gotten rid of in 2799. The regression brought home the point that I'd forgotten to write tests for those bits. Written now. It also brought home the point that our cleanup in 'reload' has always been hacky and incomplete. It's also ugly that those tests in the sandbox/ and edit/ apps need changing (particularly when the test is about how the output doesn't change).
* 2805Kartik K. Agaram2016-03-211-4/+4
| | | | Fix test failures caused by 2804 in sandbox/ app.
* 2804 - support stashing arraysKartik K. Agaram2016-03-214-13/+50
| | | | | Now to extend 'stash' for arrays, just extend array-to-text-line instead and perform the lookup inside it.
* 2803Kartik K. Agaram2016-03-2138-249/+264
| | | | | Show more thorough information about instructions in the trace, but keep the original form in error messages.
* 2802 - default support for stashing new typesKartik K. Agaram2016-03-211-0/+36
| | | | | Don't let rewrite_stash transform working programs into non-working ones.
* 2801 - bring back the 'rewrite_stash' transformKartik K. Agaram2016-03-201-0/+50
| | | | Next I'll start improving it.
* 2800 - remove a gotcha when writing testsKartik K. Agaram2016-03-201-1/+6
| | | | | | | | | Several times now I've wasted time tracking down a failing test only to eventually remember that order of definition matters in tests even though it doesn't elsewhere -- I've been having tests implicitly start running the first function defined in them. Now I stop doing that if a test defines a function called 'main', and just start the test at main instead.
* 2799 - new approach to undoing changes in testsKartik K. Agaram2016-03-2010-187/+92
| | | | | | | | As outlined at the end of 2797. This worked out surprisingly well. Now the snapshotting code touches fewer layers, and it's much better behaved, with less need for special-case logic, particularly inside run_interactive(). 30% slower, but should hopefully not cause any more bugs.
* 2798 - experiment: split channels into two endsKartik K. Agaram2016-03-194-189/+231
| | | | | | | | | | This way when you pass one end to a function or routine, you can implicitly give it the right to either read or write the channel, but not both. The cost: code gets more convoluted, names get more convoluted. You can see this in particular in the test for buffer-lines. Let's see how it goes..
* 2797 - bugfix: transform can create recipesKartik K. Agaram2016-03-192-2/+9
| | | | | | | | | | | | | | | | | | | | | When I started to make channels generic in 2784, I introduced an infinite loop when running until just layer 72. This happens because transform_all() can create new recipes while specializing, and these were getting added to Recently_added_recipes and then deleted. I didn't notice until now because layer 91 was clearing Recently_added_recipes soon after. Solution: make calls to transform_all after calls to load_permanently also clear Recently_added_recipes like load_permanently does. No transforms yet create new types. If they do we'll need to start handling the other Recently_added_* variables as well. I should rethink this whole approach of tracking changes to global state while running tests, and undoing such changes. Ideally I wouldn't need to manually track changes for each global. I should just encapsulate all global state in an object, copy it for each test and delete the copy when I'm done.
* 2796Kartik K. Agaram2016-03-191-5/+0
|
* 2795 - quick hacks for CalebKartik K. Agaram2016-03-193-76/+2
| | | | | | | | It turns out that my extensible stash doesn't yet work well in all situations. If you try to stash an array, you end up trying to create an array local that's not statically sized -- a no-no. Bah, just throw it all out.
* 2794Kartik K. Agaram2016-03-191-40/+40
| | | | Arrange for tests to run multiple variants of channel functions.
* 2793 - more fixes to make channels genericKartik K. Agaram2016-03-191-8/+8
| | | | Finally..
* 2792Kartik K. Agaram2016-03-191-0/+1
|
* 2791Kartik K. Agaram2016-03-193-18/+5
| | | | | | | Simplify 2790 by simply not computing any type->value inside parse_type_tree. It now only generates names, and it turns out the consumers handle the absence of values anyway. Now parse_type_tree no longer pollutes the Type_ordinal table with type ingredients.
* 2790Kartik K. Agaram2016-03-194-12/+34
| | | | | | | | The issue alluded to in the previous 2789 is now fixed. I'm not happy with my solution, though. I pollute Type_ordinal with type ingredients in parse_type_tree and simply ignore such entries later on. I'd much rather avoid the pollution in the first place, but I'm not sure how to do that..
* 2789Kartik K. Agaram2016-03-181-0/+10
| | | | | | | | | | | | | | | | | | | Why do earlier unit tests start to fail if I load chessboard.mu fail after correcting the definition of new-channel to be properly generic? I have narrowed it down to a manual test but am still struggling to turn it into a scenario. It looks like the 'new' instruction is the culprit: first transform: load a recipe containing a call to new with a generic type parse_type_tree is called, and pollutes the Type_ordinal table with the generic type second transform: load a generic container containing the same generic type ingredient it fails to be detected as a generic type ingredient To reproduce, compare these two commands: mu test mu test z.mu
* 2788Kartik K. Agaram2016-03-171-5/+5
|
* 2787Kartik K. Agaram2016-03-171-2/+2
| | | | | | *Really* make channels generic. I'd fixed all the call sites in 2785, but forgotten to actually switch the declaration. It works though; generics working smoothly.
* 2788Kartik K. Agaram2016-03-161-0/+27
|
* 2785Kartik K. Agaram2016-03-151-7/+12
|
* 2784 - make channels genericKartik K. Agaram2016-03-144-94/+94
| | | | | | I've ignored Mu's concurrency primitives for a while, but they're starting to return to front-and-center as I work on the file system interfaces.
* 2783 - typo in Readme; thanks John LampingKartik K. Agaram2016-03-141-2/+2
|