From 298f8065857630e414d84e4ee785a6d17e5f99bb Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 5 Jul 2016 01:08:00 -0700 Subject: 3102 --- html/010vm.cc.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'html/010vm.cc.html') diff --git a/html/010vm.cc.html b/html/010vm.cc.html index a2a4c926..508f7483 100644 --- a/html/010vm.cc.html +++ b/html/010vm.cc.html @@ -111,9 +111,11 @@ recipe_ordinal Next_recipe_ordinal = 1(); type_tree(const type_tree& old); // simple: type ordinal - explicit type_tree(string name, type_ordinal v) :name(name), value(v), left(NULL), right(NULL) {} + explicit type_tree(string name); + type_tree(string name, type_ordinal v) :name(name), value(v), left(NULL), right(NULL) {} // intermediate: list of type ordinals type_tree(string name, type_ordinal v, type_tree* r) :name(name), value(v), left(NULL), right(r) {} + type_tree(string name, type_tree* r); // advanced: tree containing type ordinals type_tree(type_tree* l, type_tree* r) :value(0), left(l), right(r) {} }; @@ -133,6 +135,9 @@ recipe_ordinal Next_recipe_ordinal = 1}; // End type_tree Definition +:(code) +type_tree::type_tree(string name) :name(name), value(get(Type_ordinal, name)), left(NULL), right(NULL) {} +type_tree::type_tree(string name, type_tree* r) :name(name), value(get(Type_ordinal, name)), left(NULL), right(r) {} :(before "End Globals") // Locations refer to a common 'memory'. Each location can store a number. @@ -305,9 +310,9 @@ reagent::reagent(constdelete type_names; // special cases if (is_integer(name) && type == NULL) - type = new type_tree("literal", get(Type_ordinal, "literal")); + type = new type_tree("literal"); if (name == "_" && type == NULL) - type = new type_tree("literal", get(Type_ordinal, "literal")); + type = new type_tree("literal"); // other properties slurp_properties(in, properties); // End Parsing reagent @@ -463,8 +468,7 @@ string_tree* property(const< } //:: Helpers for converting various values to string -//: Use to_string() in trace(), and try to avoid relying on unstable codes that -//: will perturb .traces/ from commit to commit. +//: Use to_string() in trace(), and try to keep it stable from run to run. //: Use debug_string() while debugging, and throw everything into it. //: Use inspect() only for emitting a canonical format that can be parsed back //: into the value. @@ -705,9 +709,9 @@ string trim_floating_point(c } :(before "End Includes") -#include<utility> +#include <utility> using std::pair; -#include<math.h> +#include <math.h> -- cgit 1.4.1-2-gfad0