Esempio n. 1
0
    def _reduce(self, emu=None):

        v1 = self.kids[0]
        v2 = self.kids[1]

        v1d = v1.isDiscrete()
        v2d = v2.isDiscrete()

        if v1d and v2d:
            return Const(self.solve(emu=emu), self.getWidth())

        v1val = self.kids[0].solve(emu=emu)
        v2val = self.kids[1].solve(emu=emu)

        # FIXME - dependancy loop.  does this effect perf?
        from vivisect.symboliks.reducers import reduceoper
        ret = reduceoper(self, emu=emu)
        if ret is not None:
            return ret
        return self._op_reduce(v1, v1val, v2, v2val, emu)
Esempio n. 2
0
    def _reduce(self, emu=None):

        v1 = self.kids[0]
        v2 = self.kids[1]

        v1d = v1.isDiscrete()
        v2d = v2.isDiscrete()

        if v1d and v2d:
            return Const( self.solve(emu=emu), self.getWidth() )

        v1val = self.kids[0].solve(emu=emu)
        v2val = self.kids[1].solve(emu=emu)

        # FIXME - dependancy loop.  does this effect perf?
        from vivisect.symboliks.reducers import reduceoper
        ret = reduceoper(self,emu=emu)
        if ret != None:
            return ret
        return self._op_reduce(v1, v1val, v2, v2val, emu)