Lib.Krakatau.ssa.constraints.obj_c.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 Z d d l m Z d d l m Z d d l m Z e d d d ? Z d Z e e j
g ? Z d
? Z d e f d ? ? YZ
d e f d ? ? YZ d S( i????Ni ( t ValueTypei ( t
IntConstraint( t objtypesi i i s java/lang/Objects java/lang/Cloneables java/io/Serializablec s t ? ? f d ? | D? ? S( Nc 3 s$ | ] } t j ? ? | ? Vq d S( N( R t isSubtype( t .0t y( t envt x( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pys s ( t any( R R t seq( ( R R sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pyt isAnySubtype s t TypeConstraintc B sz e Z d j ? Z d ? Z e d ? ? Z d ? Z d ? Z d ? Z d ? Z
d ? Z e d ? ? Z d ? Z
d
? Z RS( s env supers exact isBotc C s? | t | ? t | ? | _ | _ | _ t j | k | _ | j | j B} | st t t | ? d ? d k st t ? t j
| k s? t ? d S( Ni i ( t frozensetR t superst exactR t ObjectTTt isBott mint zipt AssertionErrort NullTT( t selfR R
R t temp( ( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pyt __init__ s
))c G s
t | ? S( N( R ( t args( ( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pyt fromTops s c C s | j | j f S( N( R
R ( R ( ( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pyt _key s c C s t | j p | j ? S( N( t boolR
R ( R ( ( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pyt __nonzero__ s c C s? d j d ? t | j ? D? ? } d j d ? t | j ? D? ? } | sZ d j | | ? S| sp d j | | ? Sd j | | | ? Sd S( Ns , c s s# | ] \ } } | d | Vq d S( s []N( ( R t namet dim( ( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pys s c s s# | ] \ } } | d | Vq d S( s []N( ( R R R ( ( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pys ! s s
{} extends {}s {} is {}s {} extends {} or is {}( t joint sortedR
R t format( R t varstrt
supernamest
exactnames( ( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pyt print_ s ""c C s) t j | j t | j ? t | j ? ? S( N( R t commonSupertypeR t listR
R ( R ( ( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pyt getSingleTType) s c C sa | j s t | j ? d k r" t St | j ? \ } } | d | d k o` t | ? d d g k S( Ni i i s .booleans .byte( R
t lenR t FalseR R ( R t basest dims( ( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pyt isBoolOrByteArray- s c C s? g } x^ | D]V } t | | | ? s
g | D]! } t j | | | ? s, | ^ q, } | j | ? q
q
Wg | D] } t | | | ? sn | ^ qn } t | | | ? S( N( R
R R t appendR ( R R
R t newsupersR R t newexact( ( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pyt reduce3 s
.+c G s? t t t t | ? ? ? d k s' t ? | d j } t d ? | D? ? } | s` t | t g ? St | ? d k r| | j ? St | ? d k s? t ? t d ? | D? ? \ } } t ? } xg t
j | ? D]V \ } } t j
| | | ? r? | j | ? q? t j
| | | ? r? | j | ? q? q? Wt j | ? } xK | D]C } g | D]0 } | | j k spt | | | j ? rF| ^ qF} q9Wt j | j ? j | | ? }
|
S( Ni i c s s | ] } | j s | Vq d S( N( R ( R t c( ( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pys C s i c s s | ] } | j ? Vq d S( N( R ( R R2 ( ( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pys J s ( R) t sett mapt typeR R R t obj_fsett popR t itertoolst productR R t addR t unionR R
R
R1 ( t consR t supers_lt exact_lR/ t t1t t2R0 R2 R t result( ( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pyR > s* '
Ac G sL t j d ? | D? ? } t j d ? | D? ? } t j | d j | | ? S( Nc s s | ] } | j Vq d S( N( R
( R R2 ( ( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pys ] s c s s | ] } | j Vq d S( N( R ( R R2 ( ( sE /home/alex/projects/github/krakatau/Krakatau/ssa/constraints/obj_c.pys ^ s i ( R R; R R1 R ( R<