about summary refs log tree commit diff stats
Commit message (Expand)AuthorAgeFilesLines
* 4200Kartik K. Agaram2018-01-2754-2869/+2869
* 4199Kartik K. Agaram2018-01-25138-20904/+19978
* 4198Kartik K. Agaram2018-01-251-3/+3
* 4197 - done supporting all indirect addressing modesKartik K. Agaram2018-01-241-0/+44
* 4196Kartik K. Agaram2018-01-242-20/+28
* 4195Kartik K. Agaram2018-01-243-28/+20
* 4194Kartik K. Agaram2018-01-241-2/+80
* 4193Kartik K. Agaram2018-01-242-24/+20
* 4192Kartik K. Agaram2018-01-241-1/+24
* 4191Kartik K. Agaram2018-01-241-1/+15
* 4190Kartik K. Agaram2018-01-241-26/+17
* 4189Kartik K. Agaram2018-01-245-136/+136
* 4188Kartik K. Agaram2018-01-241-5/+11
* 4187Kartik K. Agaram2018-01-241-7/+9
* 4186Kartik K. Agaram2018-01-241-3/+0
* 4185Kartik K. Agaram2018-01-247-102/+158
* 4184Kartik K. Agaram2018-01-241-1/+13
* 4183Kartik K. Agaram2018-01-246-188/+203
* 4182 - subx: beginnings of support for indexed addressingKartik K. Agaram2018-01-241-0/+45
* 4181Kartik K. Agaram2018-01-214-374/+374
* 4180Kartik K. Agaram2018-01-031-2/+7
* 4179 - experiment: rip out memory reclamationKartik K. Agaram2018-01-0316-1463/+151
* 4178Kartik K. Agaram2017-12-312-23/+20
* 4177Kartik K. Agaram2017-12-311-0/+1
* 4176Kartik K. Agaram2017-12-312-2/+2
* 4175Kartik K. Agaram2017-12-301-0/+21
* 4174Kartik K. Agaram2017-12-301-0/+72
* 4173Kartik K. Agaram2017-12-301-2/+2
* 4172Kartik K. Agaram2017-12-301-2/+2
* 4171Kartik K. Agaram2017-12-301-7/+7
* 4170Kartik K. Agaram2017-12-301-2/+2
* 4169Kartik K. Agaram2017-12-302-40/+22
* 4168Kartik K. Agaram2017-12-302-104/+104
* 4167 - show square colors in chessboard appKartik K. Agaram2017-12-272-400/+420
* 4166Kartik K. Agaram2017-12-272-20/+20
* 4165Kartik K. Agaram2017-12-2739-307/+317
* 4164Kartik K. Agaram2017-12-2714-40/+57
* 4163Kartik K. Agaram2017-12-243-3/+3
* 4162Kartik K. Agaram2017-12-2219-360/+310
* 4161Kartik K. Agaram2017-12-15135-1475/+1520
* 4160 - named marks for delimited continuationsKartik K. Agaram2017-12-158-54/+74
* 4159Kartik K. Agaram2017-12-102-3/+30
* 4158Kartik K. Agaram2017-12-091-0/+4
* 4157Kartik K. Agaram2017-12-092-33/+33
* 4156Kartik K. Agaram2017-12-072-2/+2
* 4155Kartik K. Agaram2017-12-0767-6049/+6317
* 4154Kartik K. Agaram2017-12-071-0/+89
* 4153Kartik K. Agaram2017-12-071-2/+3
* 4152Kartik K. Agaram2017-12-072-1/+12
* 4151 - specializing calls returning continuationsKartik K. Agaram2017-12-072-2/+30
le */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.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 */
scenario array-from-args [
  run [
    1:address:array:character <- new-array 0, 1, 2
    2:array:character <- copy *1:address:array:character
  ]
  memory-should-contain [
    2 <- 3  # array length
    3 <- 0
    4 <- 1
    5 <- 2
  ]
]

# create an array out of a list of scalar args
recipe new-array [
  local-scope
  capacity:number <- copy 0
  {
    # while read curr-value
    curr-value:character, exists?:boolean <- next-ingredient
    break-unless exists?
    capacity <- add capacity, 1
    loop
  }
  result:address:array:character <- new character:type, capacity
  rewind-ingredients
  i:number <- copy 0
  {
    # while read curr-value
    done?:boolean <- greater-or-equal i, capacity
    break-if done?
    curr-value:character, exists?:boolean <- next-ingredient
    assert exists?, [error in rewinding ingredients to new-array]
    tmp:address:character <- index-address *result, i
    *tmp <- copy curr-value
    i <- add i, 1
    loop
  }
  reply result
]