about summary refs log tree commit diff stats
path: root/085scenario_console.cc
Commit message (Expand)AuthorAgeFilesLines
* 4266 - space for alloc-id in heap allocationsKartik Agaram2018-06-241-6/+6
* 4258 - undo 4257Kartik Agaram2018-06-151-6/+6
* 4257 - abortive attempt at safe fat pointersKartik Agaram2018-06-151-6/+6
* 4179 - experiment: rip out memory reclamationKartik K. Agaram2018-01-031-10/+6
* 4106Kartik K. Agaram2017-11-031-1/+1
* 4104Kartik K. Agaram2017-11-031-7/+7
* 3894 - comment/uncomment lines in edit appKartik K. Agaram2017-05-291-0/+1
* 3643Kartik K. Agaram2016-11-071-1/+1
* 3565Kartik K. Agaram2016-10-231-4/+4
* 3522Kartik K. Agaram2016-10-191-5/+5
* 3503Kartik K. Agaram2016-10-151-2/+2
* 3502Kartik K. Agaram2016-10-151-5/+2
* 3500Kartik K. Agaram2016-10-151-2/+2
* 3445Kartik K. Agaram2016-10-061-10/+27
* 3389Kartik K. Agaram2016-09-171-10/+10
* 3381Kartik K. Agaram2016-09-171-4/+4
* 3379Kartik K. Agaram2016-09-171-4/+4
* 3273Kartik K. Agaram2016-08-281-2/+2
* 3272Kartik K. Agaram2016-08-281-1/+1
* 3260Kartik K. Agaram2016-08-261-2/+2
* 3259Kartik K. Agaram2016-08-261-1/+1
* 3241Kartik K. Agaram2016-08-211-29/+26
* 3240Kartik K. Agaram2016-08-211-8/+8
* 3239Kartik K. Agaram2016-08-211-4/+4
* 3229 - fake file systems using 'assume-filesystem'Kartik K. Agaram2016-08-201-2/+2
* 3178Kartik K. Agaram2016-08-131-0/+4
* 3083Kartik K. Agaram2016-07-011-2/+2
* 2990Kartik K. Agaram2016-05-201-1/+1
* 2973 - reclaim refcounts for local scopes againKartik K. Agaram2016-05-181-0/+2
* 2864 - replace all address:shared with just addressKartik K. Agaram2016-04-241-10/+10
* 2773 - switch to 'int'Kartik K. Agaram2016-03-131-21/+21
* 2771 - fix for clang on 32-bit machinesKartik K. Agaram2016-03-131-1/+1
* 2767 - reclaim refcounts for local variablesKartik K. Agaram2016-03-121-0/+2
* 2712Kartik K. Agaram2016-02-261-2/+2
* 2677Kartik K. Agaram2016-02-201-2/+2
* 2581 - make space for the refcount in address:sharedKartik K. Agaram2016-01-201-5/+13
* 2576 - distinguish allocated addresses from othersKartik K. Agaram2016-01-191-10/+10
* 2430 - make room for more transformsKartik K. Agaram2015-11-131-0/+287
ng.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# Example program showing that 'return-continuation-until-mark' can 'pause' a
# function call, returning a continuation, and that calling the continuation
# can 'resume' the paused function call.
#
# To run:
#   $ git clone https://github.com/akkartik/mu
#   $ cd mu
#   $ ./mu continuation1.mu
#
# Expected output:
#   1

def main [
  local-scope
  k:continuation <- call-with-continuation-mark 100/mark, create-yielder
  x:num <- call k  # should return 1
  $print x 10/newline
]

def create-yielder -> n:num [
  local-scope
  load-inputs
  return-continuation-until-mark 100/mark
  return 1
]
='#n640'>640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736