Commit Graph

27 Commits

Author SHA1 Message Date
Kartik Agaram 257add0f7e 4421
Clean up the rat's nest that all my trace management globals had
gradually turned into.

  a) Get rid of 'Start_tracing'. Horryibly named, I don't know how I
  missed that until now.

  b) Never use START_TRACING_UNTIL_END_OF_SCOPE in main(). It's
  confusing to combine it with atexit(delete Trace_stream), because the
  atexit() never has to run. Instead we'll just manually initialize
  Trace_stream and let atexit() clean up.

  c) If we run tests we only want a trace for the test run itself. So
  delete the Trace_stream that was initialized at the top of main --
  once it's clear we had no load-time errors.

  d) Clean up horribly "Load Recipes" waypoints, combine them with the better
  name, "Mu Prelude".

Putting these together, we have the following manual tests:

  - CFLAGS=-g mu x.mu

    Should not create last_run.

  - CFLAGS=-g mu --trace x.mu

    Should create last_run.
    Should write it out exactly once.

  - CFLAGS=-g mu --trace x.mu  # when x.mu has an error

    Should create last_run.
    Should write it out exactly once.

  - CFLAGS=-g mu --trace test copy_literal  # C test

    Should create last_run.
    Should write it out exactly once.

  - CFLAGS=-g mu --trace test recipe_with_header  # Mu test

    Should create last_run.
    Should write it out exactly once.

I don't know how to automate these scenarios yet. We need a way to run
our build toolchain atop our stack.
2018-07-26 10:09:29 -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 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 f8a6721df2 4088
I no longer remember why we were disabling memory reclamation inside
sandboxes. Everything seems to be working. Just take it out.
2017-10-21 08:52:25 -07:00
Kartik K. Agaram ec99eb7a2a 3966 2017-07-09 14:34:17 -07:00
Kartik K. Agaram 3e31f29a5b 3907 - standardize test failure messages 2017-06-15 10:45:03 -07:00
Kartik K. Agaram b2f699e14f 3888 - beginnings of a profiler
Time to make my ad hoc commented out code fragments a first-class feature.
2017-05-28 23:57:19 -07:00
Kartik K. Agaram d35595fd7d 3805 2017-03-20 18:03:21 -07:00
Kartik K. Agaram 317c0a34e8 3803 2017-03-20 16:53:36 -07:00
Kartik K. Agaram 09125ea216 3802 - more accurate sandbox results
Thanks Lakshman Swaminathan for reporting this issue.
2017-03-20 12:55:36 -07:00
Kartik K. Agaram 227c11e297 3801 2017-03-20 00:51:45 -07:00
Kartik K. Agaram 61fb1da0b6 3730
Properly support reloading lessons containing scenarios in edit/ and
sandbox/ apps.

I was so sure I tested this for commit 3724, but apparently not.
2017-01-06 22:09:29 -08:00
Kartik K. Agaram 294b2ab359 3705 - switch to tested file-system primitives 2016-12-11 16:18:18 -08:00
Kartik K. Agaram 9a81d7460f 3561 2016-10-22 16:56:07 -07:00
Kartik K. Agaram 28103e503a 3409
Support reloading the recipe side of the edit/ app when it includes type
abbreviations.

Thanks Ella Couch for reporting this problem.
2016-09-22 16:30:21 -07:00
Kartik K. Agaram 093036e8a1 3408 2016-09-22 16:30:09 -07:00
Kartik K. Agaram a0331a9b0e 3390 2016-09-17 13:00:39 -07:00
Kartik K. Agaram 760f683f27 3389 2016-09-17 12:55:10 -07:00
Kartik K. Agaram 80df524b56 3388 2016-09-17 10:32:57 -07:00
Kartik K. Agaram 7a84094adb 3385 2016-09-17 10:28:25 -07:00
Kartik K. Agaram 08f4628e8b 3379
Can't use type abbreviations inside 'memory-should-contain'.
2016-09-17 00:31:55 -07:00
Kartik K. Agaram d559f68b2f 3377 2016-09-17 00:12:08 -07:00
Kartik K. Agaram 78c5020531 3374 2016-09-16 23:57:55 -07:00
Kartik K. Agaram 9e0f70d55e 3367
Solution to a minor puzzle that came up during today's lesson with Ella:
some sandboxes were showing the address of text results, while others
were showing their contents. It took a while to realize that the
distinction lay in whether the sandbox was saving the results in a text
variable:

  new [abc]
  => <some address>
  x:text <- new [abc]
  => abc

It took *much* longer to realize why I couldn't make the first case work
like the second. Eventually I realized why: recipes were reclaiming
their results if they weren't 'escaping' -- that is, being saved in a
variable in the caller so they could be used later.

Any solution to this would be a hack, so I'm going to just leave it
alone. Type abbreviations should help minimize the extra typing needed
to get sandboxes to show text contents.
2016-09-15 17:25:07 -07:00
Kartik K. Agaram fd6d8612ed 3269
Deconstruct the tracing layer which had been an exception to our
includes-types-prototypes-globals-functions organization thus far.

To do this we predefine a few primitive globals before the types that
use them, and we pull some method definitions out of struct definitions
at the cost of having to manually write a couple of prototypes.
2016-08-28 14:55:43 -07:00
Kartik K. Agaram f09d9076f1 3230 2016-08-20 17:54:07 -07:00