math/gfreduce.c: Refactor and document.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 9 Aug 2013 09:30:48 +0000 (10:30 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 10 Aug 2013 14:24:06 +0000 (15:24 +0100)
commit8e663045cd18e14e99affd3f904170dc686fd76c
treecbc02613ea10b48b2c80c60756cd65e3ca768ced
parent12208248afbfcdedac9494a68ab83f203335c1a3
math/gfreduce.c: Refactor and document.

There was an unfortunate amount of code duplication in the old code,
particularly around the issuing of LSR instruction sequences.  Gather
the relevant state into a structure, and split the repeated code into
separate functions.

A casualty of this refactoring work is the work put into calculating the
`liv' slot in the `gfreduce' structure, carefully calculated to be a
pointer immediately after the first `STORE' instruction.  Alas, this
information is completely useless.

Also add a bunch of commentary explaining the underlying theory.
math/gfreduce.c
math/t/gfreduce