Lib.Krakatau.ssa.ssa_jumps.ifcmp.pyc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of krakatau-lib Show documentation
Show all versions of krakatau-lib Show documentation
Assembler, disassebmler, decompiler and compiler tools library for Java.
?
?HRc @ s` d d l m Z d d l m Z d d l m Z m Z d d l m Z d e f d ? ? YZ d S( i ( t BaseJumpi ( t ssa_types( t
IntConstraintt ObjectConstraint( t Gotot Ifc B sn e Z i d d 6d d 6d d 6d d 6d d 6d d 6Z d ? Z d ? Z d ? Z d ? Z d
? Z d ? Z RS( t net eqt get ltt let gtc C sZ t t | ? j | | ? | d k s+ t ? | | _ | | _ | d j t j k | _ d S( NR R R R R R
i ( s eqs nes lts ges gts le(
t superR t __init__t AssertionErrort cmpt
successorst typeR t
SSA_OBJECTt isObj( t selft parentR R t arguments( ( sC /home/alex/projects/github/krakatau/Krakatau/ssa/ssa_jumps/ifcmp.pyR
s
c C s/ g | j D] } | j | | ? ^ q
| _ d S( N( R t get( R t blockDictt key( ( sC /home/alex/projects/github/krakatau/Krakatau/ssa/ssa_jumps/ifcmp.pyt
replaceBlocks s c C s | j S( N( R ( R ( ( sC /home/alex/projects/github/krakatau/Krakatau/ssa/ssa_jumps/ifcmp.pyt getNormalSuccessors s c C su t | j ? } x! | D] \ } } | j | ? q Wt | ? d k rI d St | ? d k rq t | j | j ? ? S| S( Ni i ( t setR t removet lent NoneR R t pop( R t
pairsToRemovet tempt childt t( ( sC /home/alex/projects/github/krakatau/Krakatau/ssa/ssa_jumps/ifcmp.pyt reduceSuccessors s c C s g } xi | j D]^ } | j | t f ? } | | | ? } d | k r | d k sX t ? | j | t f ? q q W| j | ? S( N( NN( R t getSuccessorConstraintst FalseR R t appendR% ( R t xt yt
impossibleR# t funct results( ( sC /home/alex/projects/github/krakatau/Krakatau/ssa/ssa_jumps/ifcmp.pyt constrainJumps" s c s} | \ } } | t k s t ? | | j d k rA t j | j n | j ? | j rf ? f d ? } | S? f d ? } | Sd S( Ni c s? | d k s | d k r d S? d k rA | j | ? } | | f S| | } } | j ? r? | j } t j | j | j | j d t ?} n | j ? r? | j } t j | j | j | j d t ?} n | | f Sd S( NR t nonnull( NN(
R t joint isConstNullt typesR t fromTopst envt superst exactt True( R) R* t zt x2t y2t ytt xt( t cmp_t( sC /home/alex/projects/github/krakatau/Krakatau/ssa/ssa_jumps/ifcmp.pyt propagateConstraints_obj2 s
' 'c s? | d k s | d k r d S| j | j | j | j f \ } } } } ? d k s^ ? d k r | | | | f \ } } } } n ? d k s? ? d k r? t | | d ? } t | d | ? } n6? d k s? ? d k r? t | | ? } t | | ? } n? ? d k r.t | | ? } } t | | ? } } n? ? d k r?| | k o\| k o\| k n red S| | k r?| | k r?| n | d } | | k r?| n | d } n | | k r?| | k r?| n | d } | | k r?| n | d } q?n ? d k s? d k r/| | | | f \ } } } } n | | k rSt j | j | | ? n d } | | k r}t j | j | | ? n d } | | f S(
NR R R i R
R R ( NN( NN( R t mint maxR t ranget width( R) R* t x1R9 t y1R: t con1t con2( R= ( sC /home/alex/projects/github/krakatau/Krakatau/ssa/ssa_jumps/ifcmp.pyt propagateConstraints_intC s8 *!'"!**( R' R R R t oppositesR R ( R t .1t blockR$ R> RG ( ( R= sC /home/alex/projects/github/krakatau/Krakatau/ssa/ssa_jumps/ifcmp.pyR&