about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--073scheduler.cc1
-rw-r--r--args.mu8
2 files changed, 9 insertions, 0 deletions
diff --git a/073scheduler.cc b/073scheduler.cc
index 41240e64..5f97220b 100644
--- a/073scheduler.cc
+++ b/073scheduler.cc
@@ -133,6 +133,7 @@ void run_main(int argc, char* argv[]) {
   Current_routine = main_routine;
   for (int i = 1;  i < argc;  ++i) {
     vector<double> arg;
+    arg.push_back(/*alloc id*/0);
     arg.push_back(new_mu_text(argv[i]));
     assert(get(Memory, arg.back()) == 0);
     current_call().ingredient_atoms.push_back(arg);
diff --git a/args.mu b/args.mu
new file mode 100644
index 00000000..3726f097
--- /dev/null
+++ b/args.mu
@@ -0,0 +1,8 @@
+# To provide commandline args to a Mu program, use '--'. In this case:
+#   $ ./mu args.mu -- abc
+#   abc
+def main text:text [
+  local-scope
+  load-inputs
+  $print text 10/newline
+]
55555 } /* 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 */
#!/bin/bash
# Repeatedly stop building until successive layers, and run all tests built.
#
# Assumes .subx files all come after .cc files.

set -e

cd `dirname $0`
# add C++ files one at a time
for f in [0-9]*cc
do
  echo "=== $f"
  ./build_and_test_until $f
done

# build everything one last time
./clean
./build  # build optimized since we'll be running it repeatedly below

# add pure-SubX files (without syntax sugar) one at a time
for f in 0[0-8]*.subx
do
  echo "=== $f"
  ./bootstrap translate init.linux $(tools/enumerate --until $f |grep '\.subx$') -o a.elf
  ./bootstrap run a.elf test
  echo
  test `uname` = 'Linux'  &&  {
    chmod +x a.elf
    ./a.elf test
    echo
  } || true
done