monte-language / typhon

A virtual machine for Monte.
Other
67 stars 10 forks source link

Generalized static auditor discharge #150

Open MostAwesomeDude opened 7 years ago

MostAwesomeDude commented 7 years ago

We should move t.nano.auditors to after t.nano.mix and use the dynamic guard information to determine whether a static audition is possible. We should also refactor the static DeepFrozen pass away; I think that it can mostly be satisfied by running the actual DF auditor directly.

class DischargeAuditors(MixIR.selfPass()):

    def visitObjectExpr(self, doc, patt, guards, auditors, script, mast,
                        layout, clipboard):
        if auditors and not layout.frameTable.dynamicGuards:
            import pdb; pdb.set_trace()

Before we can do this, we must figure out what happens to statically-discharged as-auditors; do they still move to the guard of the pattern?

MostAwesomeDude commented 7 years ago

The next round of work on this involves forward propagation of values so that we can find more live auditors.