diff options
Diffstat (limited to 'starts/meaning-vm/level-1')
-rw-r--r-- | starts/meaning-vm/level-1/baseref.hpp | 2 | ||||
-rw-r--r-- | starts/meaning-vm/level-1/funcs.cpp | 17 | ||||
-rw-r--r-- | starts/meaning-vm/level-1/funcs.hpp | 2 |
3 files changed, 9 insertions, 12 deletions
diff --git a/starts/meaning-vm/level-1/baseref.hpp b/starts/meaning-vm/level-1/baseref.hpp index 93e18ae..ac6ff9c 100644 --- a/starts/meaning-vm/level-1/baseref.hpp +++ b/starts/meaning-vm/level-1/baseref.hpp @@ -48,7 +48,7 @@ struct baseref : public level0::baseref<ref> template <typename... Ref> ref operator()(Ref... args) { return self.template fun<Ref...>()(args...); } - std::string dump(ref skipmarkertype, ref skipmarkertarget) { return level1::dump(self, skipmarkertype, skipmarkertarget); }; + std::string dump(ref set) { return level1::dump(self, set); }; private: template <typename... Refs> 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(); } diff --git a/starts/meaning-vm/level-1/funcs.hpp b/starts/meaning-vm/level-1/funcs.hpp index d70a868..185de7b 100644 --- a/starts/meaning-vm/level-1/funcs.hpp +++ b/starts/meaning-vm/level-1/funcs.hpp @@ -21,7 +21,7 @@ concept* hyphenate(concept* a, concept* b); concept* alloc(concept* allocator, std::any val); -std::string dump(concept * what, concept * skipmarkertype, concept * skipmarkertarget); +std::string dump(concept * what, concept * set); } } |