internal/core/adt: streamline task equality checking
This is needed for the new pushdown code.
For partially completed values we must check for
task equality to disambiguated them. We made a
few changes here:
1. The code was duplicated. We now check it in
equalPartialNode, but drop the identical checks in
appendDisjunct.
2. We replace the logic with equalTasks. This does
a nested loop, so this increases the time complexity.
It is arguably a bit more robust and flexible, though,
as the previous code relied, perhaps mistakenly, on
the alignment of tasks.
The main purpose of doing this is to get rid of the
taskPos field, though. Doing so will allow us in the
future let the process method only process required
tasks, instead of being forced to process all tasks.
Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: Ia4592adea54c6c18c830b7e719b879dceba5db3c
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1236060
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>