diff --git a/src/steam/engine/proc-id.hpp b/src/steam/engine/proc-id.hpp index 2ea7c5f19..6c0712b22 100644 --- a/src/steam/engine/proc-id.hpp +++ b/src/steam/engine/proc-id.hpp @@ -58,9 +58,9 @@ namespace engine { class ProcID { - string nodeSymb_; - string portQual_; - string argLists_; + StrView nodeSymb_; + StrView portQual_; + StrView argLists_; ProcID (StrView nodeSymb, StrView portQual, StrView argLists); diff --git a/src/steam/engine/proc-node.cpp b/src/steam/engine/proc-node.cpp index 117c3c0d0..ab8b19196 100644 --- a/src/steam/engine/proc-node.cpp +++ b/src/steam/engine/proc-node.cpp @@ -49,7 +49,14 @@ namespace engine { namespace { // Details... std::unordered_set procRegistry; + std::unordered_set symbRegistry; + void inline + dedupSymbol (StrView& symbol) + { + auto res = symbRegistry.emplace (symbol); + symbol = *res.first; + } } // (END) Details... @@ -76,7 +83,15 @@ namespace engine { % nodeSymb % portSpec }; auto res = procRegistry.insert (ProcID{nodeSymb, portSpec.substr(0,p), portSpec.substr(p)}); - return unConst (*res.first); + ProcID& entry{unConst (*res.first)}; + if (res.second) + {// new record placed into the registry + dedupSymbol (entry.nodeSymb_); + dedupSymbol (entry.argLists_); + if (not isnil(entry.portQual_)) + dedupSymbol (entry.portQual_); + } + return entry; } /** @internal */ @@ -103,9 +118,12 @@ namespace engine { string ProcID::genProcSpec() { - return nodeSymb_ - + (isnil(portQual_)? string{} : "."+portQual_) - + argLists_; + std::ostringstream buffer; + buffer << nodeSymb_; + if (not isnil(portQual_)) + buffer << '.' << portQual_; + buffer << argLists_; + return buffer.str(); } diff --git a/tests/core/steam/engine/node-linkage-test.cpp b/tests/core/steam/engine/node-linkage-test.cpp index 14d53ba3a..7728ca9b8 100644 --- a/tests/core/steam/engine/node-linkage-test.cpp +++ b/tests/core/steam/engine/node-linkage-test.cpp @@ -86,9 +86,32 @@ namespace test { CHECK (watch(n1).leads().empty()); CHECK (watch(n1).ports().size() == 1); SHOW_EXPR(watch(n1).getPortSpec(0)) + // can generate a symbolic spec to describe the Port's processing functionality... CHECK (watch(n1).getPortSpec(0) == "Test:Src.dummyFun(TestFrame)"_expect); SHOW_EXPR(watch(n1).getPortSpec(1)) CHECK (watch(n1).getPortSpec(1) == "↯"_expect); + + // such a symbolic spec is actually generated by a deduplicated metadata descriptor + auto& meta1 = ProcID::describe("N1","(arg)"); + auto& meta1b = ProcID::describe("N1","(arg)"); + auto& meta2 = ProcID::describe("N2","(arg)"); + auto& meta3 = ProcID::describe("N1","uga()"); + CHECK ( isSameObject (meta1,meta1b)); + CHECK (not isSameObject (meta1,meta2)); + CHECK (not isSameObject (meta1,meta3)); + CHECK (hash_value(meta1) == hash_value(meta1b)); + CHECK (hash_value(meta1) != hash_value(meta2)); + CHECK (hash_value(meta1) != hash_value(meta3)); + +SHOW_EXPR(meta1.genProcSpec()); + CHECK (meta1.genProcSpec() == "N1(arg)"_expect); +SHOW_EXPR(meta2.genProcSpec()); + CHECK (meta2.genProcSpec() == "N2(arg)"_expect); +SHOW_EXPR(meta3.genProcSpec()); + CHECK (meta3.genProcSpec() == "N1.uga()"_expect); + auto& metaN1 = ProcID::describe("Test:Src",DUMMY_FUN_ID); +SHOW_EXPR(metaN1.genProcSpec()); + CHECK (metaN1.genProcSpec() == "Test:Src.dummyFun(TestFrame)"_expect); } diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 568715a59..c3d648948 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -13676,9 +13676,7 @@ - - - +

Schreibweise für create Clauses @@ -15400,9 +15398,7 @@ - - - +

Das ursprüngliche Ziel für diesen Test @@ -17417,9 +17413,7 @@ - - - +

vermittelt über den ViewLocator (InteractionDirector) @@ -19654,9 +19648,7 @@ - - - +

weil ElementBoxWidget selbst keine "business logic" bereitstellt @@ -47022,9 +47014,7 @@ - - - +

aber die Operationen sind der Sache nach nicht symmetrisch @@ -47873,9 +47863,7 @@ - - - +

warning: messed-up state in case of failure @@ -48155,9 +48143,7 @@ - - - +

...denn in dem Moment, wo wir den top-level TreeMutator erzeugen, @@ -48394,9 +48380,7 @@ - - - +

um den Binde- bzw. Anknüpfungs-Punkt in den real-Daten überhaupt zu finden, @@ -48662,9 +48646,7 @@ - - - +

Marker-Typ MutationMessage @@ -91403,6 +91385,10 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + + @@ -91783,10 +91769,10 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + - - + + @@ -91803,7 +91789,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -91813,7 +91799,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -91826,8 +91812,12 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + - + + @@ -91841,7 +91831,27 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + + + + + +

    +
  • + geplantes vollständiges Format:
     NodeSymb[.portQualifier](inType[/#][,inType[/#]])(outType[/#][,outType[/#]][ >N]) +
  • +
+
    +
  • + tatsächlich auf dieser Ebene implementiert
    NodeSymb[.portQualifier]<argumentList> +
  • +
+ + +
+ +
+