From a131c1f038a855a5102df11d3dab21e535071b19 Mon Sep 17 00:00:00 2001 From: olpc user Date: Mon, 30 Dec 2019 14:49:59 -0800 Subject: working on runtime errors --- starts/meaning-vm/level-1/baseref.hpp | 2 +- starts/meaning-vm/level-1/common.hpp | 2 -- starts/meaning-vm/level-1/concepts.cpp | 10 ---------- starts/meaning-vm/level-1/concepts.hpp | 17 ++++++++++------- 4 files changed, 11 insertions(+), 20 deletions(-) (limited to 'starts/meaning-vm/level-1') diff --git a/starts/meaning-vm/level-1/baseref.hpp b/starts/meaning-vm/level-1/baseref.hpp index 59550dd..93e18ae 100644 --- a/starts/meaning-vm/level-1/baseref.hpp +++ b/starts/meaning-vm/level-1/baseref.hpp @@ -58,7 +58,7 @@ private: { std::initializer_list({&args...}); f(args...); - return concepts::nothing; + return "nothing"; }; } }; diff --git a/starts/meaning-vm/level-1/common.hpp b/starts/meaning-vm/level-1/common.hpp index 9e19760..73de3b4 100644 --- a/starts/meaning-vm/level-1/common.hpp +++ b/starts/meaning-vm/level-1/common.hpp @@ -10,7 +10,5 @@ using level0::concept; template struct baseref; struct ref; -namespace concepts { extern ref nothing; extern ref name; } - } } diff --git a/starts/meaning-vm/level-1/concepts.cpp b/starts/meaning-vm/level-1/concepts.cpp index be643a9..08d645a 100644 --- a/starts/meaning-vm/level-1/concepts.cpp +++ b/starts/meaning-vm/level-1/concepts.cpp @@ -14,16 +14,6 @@ static struct init { init() { givename(intellect::level0::concepts::level0allocations(), "level0-allocations"); } } __init; -ref level1("level1"), allocations("allocations"); -ref is("is", level1-allocations); -ref name("name", level1-allocations); -ref nothing("nothing", level1-allocations); -ref anonymous("anonymous", level1-allocations); -ref link("link", level1-allocations); -ref level0("level0", level1-allocations) , level2("level2", level1-allocations) , level3("level3", level1-allocations) , level4("level4", level1-allocations) , level5("level5", level1-allocations) , level6("level6", level1-allocations) , level7("level7", level1-allocations) , level8("level8", level1-allocations) , level9("level9", level1-allocations); -ref allocator("allocator"), allocates("allocates"); - -ref _false("false", level1-allocations), _true("true", level1-allocations); } } diff --git a/starts/meaning-vm/level-1/concepts.hpp b/starts/meaning-vm/level-1/concepts.hpp index cd92f26..2b460d6 100644 --- a/starts/meaning-vm/level-1/concepts.hpp +++ b/starts/meaning-vm/level-1/concepts.hpp @@ -7,13 +7,16 @@ namespace level1 { namespace concepts { -extern ref nothing; // default value of a ref -extern ref name; // used as the link to value naming each concept -extern ref is; // a link to define group relationships, links to the more general class -extern ref anonymous; // a group given concepts with generated names -extern ref link; // TODO: for concepts that are links, link them with is=link -extern ref level0, level1, level2, level3, level4, level5, level6, level7, level8, level9, level10; -extern ref allocator, allocates, allocations; +static ref level1("level1"), allocations("allocations"); +static ref is("is", level1-allocations); // a link to define group relationships, links to the more general class +static ref name("name", level1-allocations); // used as the link to value naming each concept +static ref nothing("nothing", level1-allocations); // default value of a ref +static ref anonymous("anonymous", level1-allocations); // a group given concepts with generated names +static ref link("link", level1-allocations); // TODO: for concepts that are links, link them with is=link +static ref level0("level0", level1-allocations) , level2("level2", level1-allocations) , level3("level3", level1-allocations) , level4("level4", level1-allocations) , level5("level5", level1-allocations) , level6("level6", level1-allocations) , level7("level7", level1-allocations) , level8("level8", level1-allocations) , level9("level9", level1-allocations); +static ref allocator("allocator"), allocates("allocates"); + +static ref _false("false", level1-allocations), _true("true", level1-allocations); //extern ref true, false; <-- casting provides as if these were declared -- cgit v1.2.3