diff options
author | olpc user <olpc@xo-5d-f7-86.localdomain> | 2019-12-31 11:27:44 -0800 |
---|---|---|
committer | olpc user <olpc@xo-5d-f7-86.localdomain> | 2019-12-31 11:27:44 -0800 |
commit | 5414c74f7c85c90fcbd7efc385248e873d7753dc (patch) | |
tree | b763f9654822bedebb1657ca3ad142693a41b932 /starts/meaning-vm/level-1/funcs.cpp | |
parent | a131c1f038a855a5102df11d3dab21e535071b19 (diff) | |
download | standingwithresilience-5414c74f7c85c90fcbd7efc385248e873d7753dc.tar.gz standingwithresilience-5414c74f7c85c90fcbd7efc385248e873d7753dc.zip |
working on runtime errors
Diffstat (limited to 'starts/meaning-vm/level-1/funcs.cpp')
-rw-r--r-- | starts/meaning-vm/level-1/funcs.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/starts/meaning-vm/level-1/funcs.cpp b/starts/meaning-vm/level-1/funcs.cpp index 2ba2d0f..af4815b 100644 --- a/starts/meaning-vm/level-1/funcs.cpp +++ b/starts/meaning-vm/level-1/funcs.cpp @@ -150,10 +150,10 @@ concept* hyphenate(concept* a, concept* b) return getnamed(getname(a) + "-" + getname(b)); } -std::string dump(concept* what, concept* skipmarkertype, concept* skipmarkertarget) +std::string dump(concept* what, concept* set) { std::stringstream ss; - if (what->linked(skipmarkertype, skipmarkertarget)) { + if (set->linked(what, _true)) { return {}; } for (auto & link : ref(what).links()) { @@ -162,17 +162,14 @@ std::string dump(concept* what, concept* skipmarkertype, concept* skipmarkertarg if (ss.str().size() == 0) { ss << ref(what).name() << " " << (void*) what << ":\n"; } - ss << " " << link.first.name() << ": " << link.second.name() << "\n"; + ss << " " << link.first.name() << ": " << link.second.name() << " " << (void*)link.second << "\n"; } - what->link(skipmarkertype, skipmarkertarget); + set->link(what, _true); for (auto & link : ref(what).links()) { - if (link.first.linked(allocator, level0-allocations)) { continue; } - if (link.second.linked(allocator, level1-allocations)) { continue; } - if (link.first.ptr() == skipmarkertype && link.second.ptr() == skipmarkertarget) { - continue; - } + if (link.first.linked(level0::concepts::allocator(), level0::concepts::level0allocations())) { continue; } + if (link.second.linked(level0::concepts::allocator(), level1-allocations)) { continue; } if (link.second.isa(concepts::name)) { continue; } - ss << dump(link.second, skipmarkertype, skipmarkertarget); + ss << dump(link.second, set); } return ss.str(); } |