about summary refs log tree commit diff stats
path: root/043space.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-13 16:33:40 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-13 16:34:10 -0700
commit31401373614ec131d415e9c6bcbb83dd78b98b6e (patch)
tree9e9ea6ccffb1438f1f776b16be3ec5626e085b19 /043space.cc
parent5497090aa1e708c22cd240913a53dda32bb067aa (diff)
downloadmu-31401373614ec131d415e9c6bcbb83dd78b98b6e.tar.gz
1364 - trace call-stack when switching routines
Drop the #$%# 'encapsulated' stack ADT.
Diffstat (limited to '043space.cc')
-rw-r--r--043space.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/043space.cc b/043space.cc
index 88cc5aa3..ec63e19a 100644
--- a/043space.cc
+++ b/043space.cc
@@ -94,7 +94,7 @@ tmp.properties.push_back(pair<string, vector<string> >("raw", vector<string>()))
 
 :(code)
 index_t space_base(const reagent& x) {
-  return Current_routine->calls.top().default_space;
+  return Current_routine->calls.front().default_space;
 }
 
 index_t address(index_t offset, index_t base) {
@@ -110,8 +110,8 @@ index_t address(index_t offset, index_t base) {
 :(after "void write_memory(reagent x, vector<double> data)")
   if (x.name == "default-space") {
     assert(data.size() == 1);
-    Current_routine->calls.top().default_space = data.at(0);
-//?     cout << "AAA " << Current_routine->calls.top().default_space << '\n'; //? 1
+    Current_routine->calls.front().default_space = data.at(0);
+//?     cout << "AAA " << Current_routine->calls.front().default_space << '\n'; //? 1
     return;
   }
 
@@ -125,6 +125,6 @@ recipe main [
 :(after "vector<double> read_memory(reagent x)")
   if (x.name == "default-space") {
     vector<double> result;
-    result.push_back(Current_routine->calls.top().default_space);
+    result.push_back(Current_routine->calls.front().default_space);
     return result;
   }
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 */
#!/usr/bin/zsh
# Regenerate html files.

rm html/**/*.html

process() {
  vim -c "TOhtml | w | qa" $1

  sed -i 's,<title>\~/mu/,<title>Mu - ,' $1.html
  sed -i 's,\.html</title>,</title>,' $1.html
  sed -i 's/^\*.*/* { font-size: 1.05em; }/g' $1.html
  # tweak contrast
  sed -i 's/^\.Constant .*/.Constant { color: #00a0a0; }/' $1.html
  sed -i 's/^\.muControl .*/.muControl { color: #c0a020; }/' $1.html
  sed -i 's/^\.Comment .*/.Comment { color: #9090ff; }/' $1.html
  sed -i 's/^\.Delimiter .*/.Delimiter { color: #a04060; }/' $1.html  # not meant to be read/ can be lower-contrast

  mv -i $1.html html/`dirname $1`
}

for f in *.cc *.mu edit/*.mu
do
  process $f
done