about summary refs log tree commit diff stats
path: root/031address.cc
Commit message (Collapse)AuthorAgeFilesLines
* 2657 - type-checking for 'merge' instructionsKartik K. Agaram2016-02-151-0/+3
|
* 2620Kartik K. Agaram2016-01-301-3/+3
| | | | | I was finding it hard to wrap around the directionality of calls with 'lhs' and 'rhs'. Seems to work better with 'to' and 'from'. Let's see.
* 2576 - distinguish allocated addresses from othersKartik K. Agaram2016-01-191-0/+4
| | | | | | | | | | | | | | | | 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-4/+8
|
* fix a crash on unknown typeKartik K. Agaram2015-12-151-0/+11
|
* 2482 - better choice between valid variantsKartik K. Agaram2015-11-271-1/+1
| | | | Literal '0' ingredients should map to numbers before addresses.
* 2473 - bad idea to use /raw with multiple intentionsKartik K. Agaram2015-11-221-4/+4
| | | | | /raw is to express absolute addresses /unsafe is to sidestep type-checking in test setup
* 2399 - consistent debug_string vocabularyKartik K. Agaram2015-11-081-2/+1
|
* 2393 - redo 2391Kartik K. Agaram2015-11-071-1/+2
| | | | | | | | | | | Got that idea to work with a special-case for 'new'. Requires parsing new's first ingredient, performing the replacement, and then turning it back into a string. I didn't want to replace NEW with ALLOCATE right here, because then it messes with my invariant that transform should never see a naked ALLOCATE. Layer 11 still not working, but everything else is. Let's clean up before we diagnose the new breakage.
* 2392 - undo 2391Kartik K. Agaram2015-11-071-2/+1
| | | | Yup, type ingredients were taking size 1 by default.
* 2391Kartik K. Agaram2015-11-071-1/+2
| | | | | | | | | | | | | No, my idea was abortive. My new plan was to run no transforms for generic recipes, and instead only run them on concrete specializations as they're created. The trouble with this approach is that new contains a type specification in its ingredient which apparently needed to be transformed into an allocate before specialization. But no, how was that working? How was new computing size based on type ingredients? It might have been wrong all along.
* 2388 - final layer of edit/ loaded successfullyKartik K. Agaram2015-11-071-0/+7
|
* 2377 - stop using operator[] in mapKartik K. Agaram2015-11-061-8/+8
| | | | | | | | | | | | | | | | I'm still seeing all sorts of failures in turning on layer 11 of edit/, so I'm backing away and nailing down every culprit I run into. First up: stop accidentally inserting empty objects into maps during lookups. Commands run: $ sed -i 's/\(Recipe_ordinal\|Recipe\|Type_ordinal\|Type\|Memory\)\[\([^]]*\)\] = \(.*\);/put(\1, \2, \3);/' 0[1-9]* $ vi 075scenario_console.cc # manually fix up Memory[Memory[CONSOLE]] $ sed -i 's/\(Memory\)\[\([^]]*\)\]/get_or_insert(\1, \2)/' 0[1-9]* $ sed -i 's/\(Recipe_ordinal\|Type_ordinal\)\[\([^]]*\)\]/get(\1, \2)/' 0[1-9]* $ sed -i 's/\(Recipe\|Type\)\[\([^]]*\)\]/get(\1, \2)/' 0[1-9]* Now mu dies pretty quickly because of all the places I try to lookup a missing value.
* 2373 - bad bug: instruction was losing /lookupKartik K. Agaram2015-11-051-0/+12
|
* 2313Kartik K. Agaram2015-10-291-1/+1
|
* 2283 - represent each /property as a treeKartik K. Agaram2015-10-261-2/+2
|
* 2277 - reagents now have a tree of typesKartik K. Agaram2015-10-251-42/+29
|
* 2258 - separate warnings from errorsKartik K. Agaram2015-10-061-9/+9
| | | | | | | At the lowest level I'm reluctantly starting to see the need for errors that stop the program in its tracks. Only way to avoid memory corruption and security issues. But beyond that core I still want to be as lenient as possible at higher levels of abstraction.
* 2243Kartik K. Agaram2015-10-051-0/+2
|
* 2241 - back to type-checking get-addressKartik K. Agaram2015-10-051-1/+1
| | | | | Now duplex-list is fully non-generic and only works with characters. But we'll fix that in a bit..
* 2237Kartik K. Agaram2015-10-041-1/+1
|
* 2234 - check type of get's productKartik K. Agaram2015-10-021-0/+2
| | | | Already I'm finding type errors in the programming environment.
* 2227 - offset-checking for containersKartik K. Agaram2015-10-011-2/+6
|
* 2226 - standardize warning formatKartik K. Agaram2015-10-011-3/+3
| | | | | | | | Always show recipe name where error occurred. But don't show internal 'interactive' name for sandboxes, that's just confusing. What started out as warnings are now ossifying into errors that halt all execution. Is this how things went with C and Unix as well?
* 2220Kartik K. Agaram2015-09-301-0/+3
|
* 2219Kartik K. Agaram2015-09-301-12/+4
|
* 2218 - check types in instructions much earlierKartik K. Agaram2015-09-301-3/+48
| | | | | | | | | Front-loads it a bit more than I'd like, but the payoff is that other recipes will now be able to describe the type checks right next to their operation. I'm also introducing a new use of /raw with literals to indicate unsafe typecasts.
* 2213 - start moving type checks out of 'run'Kartik K. Agaram2015-09-281-4/+1
| | | | | That way we only have to check each static instruction once, rather than every time it runs.
* 2199 - stop printing numbers in scientific notationKartik K. Agaram2015-09-141-3/+3
| | | | | | | | | | | Turns out the default format for printing floating point numbers is neither 'scientific' nor 'fixed' even though those are the only two options offered. Reading the C++ standard I found out that the default (modulo locale changes) is basically the same as the printf "%g" format. And "%g" is basically the shorter of: a) %f with trailing zeros trimmed b) %e So we'll just do %f and trim trailing zeros.
* 2095Kartik K. Agaram2015-08-281-3/+0
| | | | | | | | | | | | Finally terminate the experiment of keeping debug prints around. I'm also going to give up on maintaining counts. What we really need is two kinds of tracing: a) For tests, just the domain-specific facts, organized by labels. b) For debugging, just transient dumps to stdout. b) only works if stdout is clean by default. Hmm, I think this means 'stash' should be the transient kind of trace.
* 1988 - handle reagents without typesKartik K. Agaram2015-08-131-1/+1
| | | | | | This can happen if 'canonize' fails. Make sure it doesn't kill mu. Thanks Caleb Couch.
* 1951 - warn when copying scalars to arrays, etc.Kartik K. Agaram2015-08-071-0/+3
|
* 1921 - show trace by clicking on codeKartik K. Agaram2015-08-021-2/+2
| | | | | | | Region to click on to edit is now reduced to just the menu bar for the sandbox (excluding the 'x' for deleting the sandbox). The symmetry there might be useful, but we'll see if the relative click area is in line with how commonly the actions are performed.
* 1902Kartik K. Agaram2015-07-301-0/+14
| | | | Now fix the proximal cause of the write to address 0.
* 1877 - shorten /lookup property to prefix '*'Kartik K. Agaram2015-07-281-0/+20
|
* 1869 - rename the /deref property to /lookupKartik K. Agaram2015-07-281-17/+17
| | | | Should be a little bit more mnemonic.
* 1868 - start using naked literals everywhereKartik K. Agaram2015-07-281-13/+13
| | | | First step to reducing typing burden. Next step: inferring types.
* 1864Kartik K. Agaram2015-07-281-1/+13
|
* 1862Kartik K. Agaram2015-07-281-1/+1
|
* 1860 - new primitive: $systemKartik K. Agaram2015-07-271-47/+1
| | | | Also reorganize my miscellaneous hacky primitives.
* 1848 - core instructions now check for ingredientsKartik K. Agaram2015-07-251-2/+8
| | | | Also standardized warnings.
* 1844 - explicitly end each trace lineKartik K. Agaram2015-07-251-1/+1
| | | | | | | | | More verbose, but it saves trouble when debugging; there's never something you thought should be traced but just never came out the other end. Also got rid of fatal errors entirely. Everything's a warning now, and code after a warning isn't guaranteed to run.
* 1842 - get layers building again after 2 weeksKartik K. Agaram2015-07-241-12/+61
| | | | | Also, turns out I haven't been building 999spaces.cc in my default build. Now fixed.
* 1702 - experiment: start using 'ordinal' in namesKartik K. Agaram2015-07-041-1/+1
| | | | | | | It comes up pretty early in the codebase, but hopefully won't come up in the mu level until we get to higher-order recipes. Potentially intimidating name, but such prime real estate with no confusing overloadings in other projects!
* 1585Kartik K. Agaram2015-06-171-1/+1
|
* 1434 - support all unicode spacesKartik K. Agaram2015-05-231-2/+2
|
* 1417 - draft zoom levels in tracesKartik K. Agaram2015-05-211-1/+1
|
* 1414 - traces now robust to new recipes/typesKartik K. Agaram2015-05-211-14/+1
|
* 1391 - avoid unsigned integersKartik K. Agaram2015-05-171-6/+6
|
* 1363 - rename 'integer' to 'number'Kartik K. Agaram2015-05-131-17/+17
| | | | ..now that we support non-integers.