File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -153,15 +153,15 @@ inline: acrossFields: ok1: {
153
153
}
154
154
}
155
155
-- out/eval/stats --
156
- Leaks: 268
157
- Freed: 168
158
- Reused: 162
159
- Allocs: 274
160
- Retain: 821
156
+ Leaks: 247
157
+ Freed: 141
158
+ Reused: 136
159
+ Allocs: 252
160
+ Retain: 734
161
161
162
- Unifications: 436
163
- Conjuncts: 1499
164
- Disjuncts: 795
162
+ Unifications: 388
163
+ Conjuncts: 1297
164
+ Disjuncts: 688
165
165
-- out/eval --
166
166
Errors:
167
167
structural cycle:
Original file line number Diff line number Diff line change @@ -235,6 +235,7 @@ func (c *OpContext) Unify(v *Vertex, state VertexStatus) {
235
235
fallthrough
236
236
237
237
case Partial , Conjuncts :
238
+ // TODO: remove this optimization or make it correct.
238
239
// No need to do further processing when we have errors and all values
239
240
// have been considered.
240
241
// TODO: is checkClosed really still necessary here?
@@ -1348,10 +1349,9 @@ func (n *nodeContext) getValidators(state VertexStatus) BaseValue {
1348
1349
1349
1350
// TODO: this function can probably go as this is now handled in the nodeContext.
1350
1351
func (n * nodeContext ) maybeSetCache () {
1351
- if n .node .Status () > Partial { // n.node.BaseValue != nil
1352
- return
1353
- }
1354
- if n .scalar != nil {
1352
+ // Set BaseValue to scalar, but only if it was not set before. Most notably,
1353
+ // errors should not be discarded.
1354
+ if n .scalar != nil && isCyclePlaceholder (n .node .BaseValue ) {
1355
1355
n .node .BaseValue = n .scalar
1356
1356
}
1357
1357
// NOTE: this is now handled by associating the nodeContext
You can’t perform that action at this time.
0 commit comments