From 9542bb112419d575190a72baf7f964c3e32df223 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 25 Jul 2015 22:15:51 -0700 Subject: 1853 --- html/029debug.cc.html | 129 +++++--------------------------------------------- 1 file changed, 12 insertions(+), 117 deletions(-) (limited to 'html/029debug.cc.html') diff --git a/html/029debug.cc.html b/html/029debug.cc.html index 58adec43..80f33d7d 100644 --- a/html/029debug.cc.html +++ b/html/029debug.cc.html @@ -15,10 +15,9 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } * { font-size: 1.05em; } .cSpecial { color: #008000; } .Constant { color: #00a0a0; } -.Comment { color: #9090ff; } +.Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .Delimiter { color: #a04060; } .Identifier { color: #804000; } -.CommentedCode { color: #6c6c6c; } --> @@ -30,26 +29,24 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; }
-//: Recipe to look at elements of containers.
-
 :(before "End Primitive Recipe Declarations")
 _PRINT,
 :(before "End Primitive Recipe Numbers")
 Recipe_ordinal["$print"] = _PRINT;
 :(before "End Primitive Recipe Implementations")
-case _PRINT: {
-  for (long long int i = 0; i < SIZE(ingredients); ++i) {
-    if (is_literal(current_instruction().ingredients.at(i))) {
-      trace(Primitive_recipe_depth, "run") << "$print: " << current_instruction().ingredients.at(i).name;
-      if (has_property(current_instruction().ingredients.at(i), "newline"))
+case _PRINT: {
+  for (long long int i = 0; i < SIZE(ingredients); ++i) {
+    if (is_literal(current_instruction().ingredients.at(i))) {
+      trace(Primitive_recipe_depth, "run") << "$print: " << current_instruction().ingredients.at(i).name << end();
+      if (has_property(current_instruction().ingredients.at(i), "newline"))
         cout << '\n';
-      else
+      else
         cout << current_instruction().ingredients.at(i).name;
     }
-    else {
-      for (long long int j = 0; j < SIZE(ingredients.at(i)); ++j) {
-        trace(Primitive_recipe_depth, "run") << "$print: " << ingredients.at(i).at(j);
-        if (j > 0) cout << " ";
+    else {
+      for (long long int j = 0; j < SIZE(ingredients.at(i)); ++j) {
+        trace(Primitive_recipe_depth, "run") << "$print: " << ingredients.at(i).at(j) << end();
+        if (j > 0) cout << " ";
         cout << ingredients.at(i).at(j);
       }
     }
@@ -57,117 +54,15 @@ case _PRINT: {
   break;
 }
 
-:(before "End Primitive Recipe Declarations")
-_START_TRACING,
-:(before "End Primitive Recipe Numbers")
-Recipe_ordinal["$start-tracing"] = _START_TRACING;
-:(before "End Primitive Recipe Implementations")
-case _START_TRACING: {
-  if (current_instruction().ingredients.empty())
-    Trace_stream->dump_layer = "all";
-  else
-    Trace_stream->dump_layer = current_instruction().ingredients.at(0).name;
-//?   cout << Trace_stream << ": " << Trace_stream->dump_layer << '\n'; //? 1
-  break;
-}
-
-:(before "End Primitive Recipe Declarations")
-_STOP_TRACING,
-:(before "End Primitive Recipe Numbers")
-Recipe_ordinal["$stop-tracing"] = _STOP_TRACING;
-:(before "End Primitive Recipe Implementations")
-case _STOP_TRACING: {
-  Trace_stream->dump_layer = "";
-  break;
-}
-
-:(before "End Primitive Recipe Declarations")
-_CLOSE_TRACE,
-:(before "End Primitive Recipe Numbers")
-Recipe_ordinal["$close-trace"] = _CLOSE_TRACE;
-:(before "End Primitive Recipe Implementations")
-case _CLOSE_TRACE: {
-  if (Trace_stream) {
-    delete Trace_stream;
-    Trace_stream = NULL;
-  }
-  break;
-}
-
 :(before "End Primitive Recipe Declarations")
 _EXIT,
 :(before "End Primitive Recipe Numbers")
 Recipe_ordinal["$exit"] = _EXIT;
 :(before "End Primitive Recipe Implementations")
-case _EXIT: {
+case _EXIT: {
   exit(0);
   break;
 }
-
-:(before "End Primitive Recipe Declarations")
-_DUMP_TRACE,
-:(before "End Primitive Recipe Numbers")
-Recipe_ordinal["$dump-trace"] = _DUMP_TRACE;
-:(before "End Primitive Recipe Implementations")
-case _DUMP_TRACE: {
-  if (ingredients.empty()) {
-    DUMP("");
-  }
-  else {
-    DUMP(current_instruction().ingredients.at(0).name);
-  }
-  break;
-}
-
-:(before "End Primitive Recipe Declarations")
-_CLEAR_TRACE,
-:(before "End Primitive Recipe Numbers")
-Recipe_ordinal["$clear-trace"] = _CLEAR_TRACE;
-:(before "End Primitive Recipe Implementations")
-case _CLEAR_TRACE: {
-  CLEAR_TRACE;
-  break;
-}
-
-:(before "End Primitive Recipe Declarations")
-_DUMP_MEMORY,
-:(before "End Primitive Recipe Numbers")
-Recipe_ordinal["$dump-memory"] = _DUMP_MEMORY;
-:(before "End Primitive Recipe Implementations")
-case _DUMP_MEMORY: {
-  dump_memory();
-  break;
-}
-
-:(before "End Primitive Recipe Declarations")
-_DUMP,
-:(before "End Primitive Recipe Numbers")
-Recipe_ordinal["$dump"] = _DUMP;
-:(before "End Primitive Recipe Implementations")
-case _DUMP: {
-  reagent after_canonize = canonize(current_instruction().ingredients.at(0));
-  cerr << current_recipe_name() << ": " << current_instruction().ingredients.at(0).name << ' ' << current_instruction().ingredients.at(0).value << " => " << after_canonize.value << " => " << Memory[after_canonize.value] << '\n';
-  break;
-}
-
-//: Helper for debugging: grab an address and then dump its value.
-:(before "End Globals")
-long long int foo = -1;
-:(before "End Primitive Recipe Declarations")
-_FOO,
-:(before "End Primitive Recipe Numbers")
-Recipe_ordinal["$foo"] = _FOO;
-:(before "End Primitive Recipe Implementations")
-case _FOO: {
-  if (current_instruction().ingredients.empty()) {
-    if (foo != -1) cerr << foo << ": " << Memory[foo] << '\n';
-    else cerr << '\n';
-  }
-  else {
-    foo = canonize(current_instruction().ingredients.at(0)).value;
-  }
-  break;
-}
 
-- cgit 1.4.1-2-gfad0