Commit 3e375ab
committed
fix(sort): skip non-hierarchical refs in topological sort
The topological sort in nodeRefsReady() previously blocked on ALL
inverse non-HasTypeDefinition references. This caused deadlocks
when two nodes in the same nodeset referenced each other via a
non-hierarchical reference type (e.g. HasSubStateMachine i=117).
Non-hierarchical references do not establish parent-child ordering
dependencies. Only inverse hierarchical references (subtypes of
HierarchicalReferences i=33) and forward HasTypeDefinition require
ordering constraints.
Add isHierarchicalRef() to identify well-known ns0 hierarchical
reference types and update nodeRefsReady() to only block on inverse
hierarchical references. Non-ns0 reference types are conservatively
treated as hierarchical.
Fixes loading of the Glass companion specification, which uses
HasSubStateMachine between StateMachine objects in the same nodeset.1 parent bcfe420 commit 3e375ab
1 file changed
Lines changed: 39 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
139 | 174 | | |
140 | 175 | | |
141 | 176 | | |
| |||
144 | 179 | | |
145 | 180 | | |
146 | 181 | | |
| 182 | + | |
147 | 183 | | |
148 | 184 | | |
149 | | - | |
150 | | - | |
151 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
152 | 188 | | |
153 | 189 | | |
154 | 190 | | |
| |||
0 commit comments