Commit Graph

90 Commits

Author SHA1 Message Date
Kartik K. Agaram e94453100d 2547 2015-12-24 15:36:12 -08:00
Kartik K. Agaram 7a23ce3d56 2469 - start logging all warnings again
Since we switched to end() for terminating trace lines, there's a lot
less reason to avoid this. We don't nest trace statements either
anymore.

I'd like to not hide warnings and still be able to make assertions on
their absence so that printed warnings also express as failed tests.
2015-11-21 18:52:31 -08:00
Kartik K. Agaram 6fa778b3e7 2390 - undo 2389
Ooh, I think I see a solution.
2015-11-07 19:54:38 -08:00
Kartik K. Agaram cb0060ee0f 2389
Now we're back to trying to rerunning idempotent transforms on
specialized recipes. Still doesn't work, but at least we don't see
different results depending on whether the trace is enabled inside the
test or right at the start. That got fixed by the more disciplined
insertion into maps, looks like.
2015-11-07 13:54:49 -08:00
Kartik K. Agaram cdd6fd0967 2313 2015-10-29 12:09:23 -07:00
Kartik K. Agaram 77cdc6d03f 2271 - bugfix: traces cross-contaminating errors
There were several places where we push a call on to a routine without
incrementing call-stack depth, which was used to compute the depth at
which to trace an instruction. So sometimes you ended up one depth lower
than you started a call with. Do this enough times and instructions that
should be traced at level 100 end up at level 0 and pop up as errors.

Solution: since call-stack depth is only used for tracing, include it in
the trace stream and make sure we reset it along with the trace stream.
Then catch all places where we forget to increment call-stack depth and
make sure we catch such places in the future.

When I first ran into this with Caleb I thought there must be some way
that we're writing some output into the warnings result. I didn't
recognize that the spurious output as part of the trace, just at the
wrong level.
2015-10-19 15:45:55 -07:00
Kartik K. Agaram 857adbc496 2261 2015-10-06 23:48:04 -07:00
Kartik K. Agaram e00d485428 2260 - start tracing by depth rather than label
Now we can collect all traces, just modulating the depth.
2015-10-06 23:38:28 -07:00
Kartik K. Agaram 491f51d1e0 2259 2015-10-06 22:35:21 -07:00
Kartik K. Agaram 5f98a10cc7 2258 - separate warnings from errors
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.
2015-10-06 22:15:45 -07:00
Kartik K. Agaram 41f5188dcf 2254 2015-10-05 22:53:41 -07:00
Kartik K. Agaram 164bf99fef 2253 - start reorganizing traces 2015-10-05 22:50:58 -07:00
Kartik K. Agaram 2e72dc12f7 2215 2015-09-29 09:12:31 -07:00
Kartik K. Agaram 06584c523a 2202 - don't let editor die on syntax errors
Bugfix to 2186. I hadn't taken care of 'reload' as cleanly as I had
'run-interactive'.
2015-09-15 19:48:53 -07:00
Kartik K. Agaram baaf6d6512 2185 2015-09-12 14:58:33 -07:00
Kartik K. Agaram 7be15b8b4a 2184 - bugfix in trace_count
It was reading lines like this in scenarios:

  -warn: f: error error

as:

  -warn: f

which was causing them to be silently ignored.

Also found an insane preprocessor expansion from not parenthesizing
preprocessor arguments. SIZE(end+delim) worked even when end was an
integer, but it happily didn't ever get the wrong answer.
2015-09-12 14:39:20 -07:00
Kartik K. Agaram 6c1376f830 2095
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.
2015-08-28 23:25:21 -07:00
Kartik K. Agaram 23eed027bc 2073 2015-08-24 19:38:02 -07:00
Kartik K. Agaram 7f402c85eb 1921 - show trace by clicking on code
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.
2015-08-02 16:18:16 -07:00
Kartik K. Agaram 35064671ef 1844 - explicitly end each trace line
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.
2015-07-25 00:02:20 -07:00
Kartik K. Agaram 094548498b 1782 - stop tracing anything but warnings inside edit
Speeds up edit.mu tests by 10x, and shrinks memory usage by 100x.
We need a more efficient implementation of traces, but we can keep going
for now.

We didn't really need to reclaim memory just yet, after all. Mu is
pretty memory-efficient.
2015-07-14 15:54:39 -07:00
Kartik K. Agaram 34c4850fa7 1781 - the hog is Trace_stream, not Memory
I keep forgetting about it. Until, that is, I run gprof. Even if I think
I need a memory profile, a cpu profile is a pretty good proxy.
2015-07-14 15:13:12 -07:00
Kartik K. Agaram eba30983f7 1669 - now it fails in the right place
..when building until layer 41
2015-06-27 18:06:28 -07:00
Kartik K. Agaram e766fd13d6 1640
Another bug in manually running the editor. At least show the error
message when you raise warnings in console mode.

Later we'll want to create a separate side channel and transparently
plumb warnings to the 'menu bar' of the editor..
2015-06-24 16:55:18 -07:00
Kartik K. Agaram 467046ef11 1614 2015-06-21 00:24:12 -07:00
Kartik K. Agaram 029c04e2ea 1501 2015-05-28 13:25:23 -07:00
Kartik K. Agaram 7feea75b13 1417 - draft zoom levels in traces 2015-05-21 18:57:25 -07:00
Kartik K. Agaram 5feb36ff8f 1416 2015-05-21 18:10:17 -07:00
Kartik K. Agaram 1f852acc8f 1415 2015-05-21 17:57:02 -07:00
Kartik K. Agaram d7494165ec 1414 - traces now robust to new recipes/types 2015-05-21 13:00:42 -07:00
Kartik K. Agaram 5af8334699 1413 2015-05-21 11:37:50 -07:00
Kartik K. Agaram d1bd043922 1412 - starting to clean up trace format
Many features of my trace layer were just inherited blindly from wart
but lying unused in this project. Throw them out while we're at it.
2015-05-21 11:37:17 -07:00
Kartik K. Agaram f22059b3bc 1411 2015-05-20 19:51:29 -07:00
Kartik K. Agaram ac0e9db526 1391 - avoid unsigned integers 2015-05-17 02:22:41 -07:00
Kartik K. Agaram 827898fc1b 1357 - temporarily revert floating-point support 2015-05-12 17:10:33 -07:00
Kartik K. Agaram 3663ca6c2d 1356 - snapshot #2: floating point support
I added one test to check that divide can return a float, then hacked at
the rippling failures across the entire entire codebase until all tests
pass. Now I need to look at the changes I made and see if there's a
system to them, identify other places that I missed, and figure out the
best way to cover all cases. I also need to show real rather than
encoded values in the traces, but I can't use value() inside reagent
methods because of the name clash with the member variable. So let's
take a snapshot before we attempt any refactoring. This was non-trivial
to get right.

Even if I convince myself that I've gotten it right, I might back this
all out if I can't easily *persuade others* that I've gotten it right.
2015-05-12 17:00:19 -07:00
Kartik K. Agaram 54e4548dd1 1354 2015-05-12 08:47:06 -07:00
Kartik K. Agaram a6cdf15c09 1308 2015-05-08 08:21:36 -07:00
Kartik K. Agaram 05d177737c 1299 - stop using [] in any vector
Useful check:

  $ grep "[^ '\"]\[[^\"]" *.cc \
    |perl -pwe 's/\Wargv\[|\WTests\[|\Wframe\[|\WMemory\[|\WName\[|\WSurrounding_space\[|\WRecipe\[|\WType\[|\WRecipe_number\[|\WType_number\[|\WBefore_fragments\[|\WAfter_fragments\[//g' \
    |perl -pwe 's/\Wargv\[|\WTests\[|\Wframe\[|\WMemory\[|\WName\[|\WSurrounding_space\[|\WRecipe\[|\WType\[|\WRecipe_number\[|\WType_number\[|\WBefore_fragments\[|\WAfter_fragments\[//g' \
    |grep '[^ ]\['
2015-05-07 15:49:40 -07:00
Kartik K. Agaram b96af395b9 1276 - make C++ version the default
I've tried to update the Readme, but there are at least a couple of issues.
2015-05-05 21:17:24 -07:00