All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Lib.Krakatau.ssa.blockmaker.pyc Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
?
?HRc@s0ddlZddlmZmZmZmZddlmZddlm	Z	m
Z
ddlmZm
Z
mZmZmZmZddlmZmZied	6ed
6ed6e
d6ed
6ed6ed6Zd?Zd?Zd?Zd?Zd?Zd?Zd?Zd?Zd?Zd?Zd?Zd?Z d?Z!d?Z"d?Z#d?Z$d ?Z%d!?Z&d"?Z'd#?Z(d$?Z)d%?Z*d&?Z+d'?Z,d(?Z-d)?Z.d*?Z/d+?Z0d,?Z1d-?Z2d.?Z3d/?Z4d0?Z5d1?Z6d2?Z7d3?Z8d4?Z9d5?Z:d6?Z;d7?Z<d8?Z=i7eej>ej??ej@6eejAd9eB?ejC6eejD6eejE6eejF6eejG6e ejH6e!ejI6e"ejJ6e#ejK6e$ejL6e%ejM6eejNejO?ejP6e&ejQ6e'ejR6e'ejS6e7ejT6e(ejU6e*ejV6e)ejW6e*ejX6e+ejY6e,ejZ6e-ej[6e-ej\6e-ej]6e-ej^6e-ej_6e.ej`6e/eja6e0ejb6e1ejc6e2ejd6e2eje6e3ejf6eejgejh?eji6e4ejj6e5ejk6e6ejl6e7ejm6eejnd9eB?ejo6e'ejp6e'ejq6eejrejs?ejt6e8eju6e9ejv6eejwd9ex?ejy6eejzd9ex?ej{6e:ej|6eej}ej~?ej6e;ej?6e<ej?6e=ej?6eej?d9ex?ej?6eej?d9eB?ej?6Z?d:?Z?d;?Z?d<?Z?dS(=i????Ni(tssa_opst	ssa_jumpstobjtypestsubproci(topnames(tparseMethodDescriptortparseFieldDescriptor(tSSA_INTtSSA_LONGt	SSA_FLOATt
SSA_DOUBLEt
SSA_OBJECTt	SSA_MONAD(tslots_tt
BasicBlocktDtFtItJtBtCtScCs|dkrdSdS(NtJDii((tc((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pytgetCategoryscKs|S(N((tkwargs((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pytmakeDict
scCs|j|?}||_|S(N(tmakeVariabletconst(tparentttype_tvaltvar((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pytmakeConstVars	cCsH|ddkr8t|dt?}tj|d?}n|df}|S(Nit[tunsynthesize(RtFalseRtverifierToSynthetic(tdesctvtypesttt((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pytparseArrOrClassNames
cCs\t|\}}||}g|D]}|||d^q"}|| |}td|?S(Nitnewstack(tgenericStackCodesR(toptstacktnumtreplaceCodestvalstitnewvalsR*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_genericStackOperations
%cs??fd?}|S(Nc	s?t|jd?}|jddk}|r2?n?}|j|dd|?}|||?}|jd| |jgdg|d}td|d|?S(NitDFii????tlineR*(RtinstructionR-trvaltNoneR(	Rtinput_tiNodetcattisfloatR,targsR5R*(tfoptiop(s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pytmath1&s*((R>R?R@((R>R?s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_floatOrIntMath%s
cs??fd?}|S(Ncs?t|jd?}?r#|dn||}|j|d|?}?||?}|j| |jgdg|d}td|d|?S(NiR5R*(RR6R-R7R8R(RR9R:R;tsizeR=R5R*(tisShiftR,(s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pytmath23s'((R,RCRD((RCR,s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_intMath2scCsr|j|jd?d}t|?}tj||jd||j?}|jd |jg}td|d|?S(Niii????R5R*(	tgetConstPoolArgsR6R)RtNewArrayR-tmonadR7R(RR9R:tnameR(R5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt
_anewarray>s
"cCsCtj||jd?}|jd |jg}td|d|?S(Ni????R5R*(Rt	ArrLengthR-R7R(RR9R:R5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_arrlenEscCs?t|jd}t|jd?}tj||jd|d|j?}|jd |jgdg|d}t	d|d|?S(Nii????RHR5R*(
t_charToSSATypeR6RRtArrLoadR-RHR7R8R(RR9R:RR;R5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_arrloadJs
%&cCsOtj||jdtd|j?}|jd |jg}td|d|?S(Ni????RHR5R*(RRNR-RRHR7R(RR9R:R5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_arrload_objRs%cCs?t|jd?dkr:|jd |jdd!}}n|jd |jd}}tj||d|j?}td|d|?S(Nii????i????i????RHR5R*(RR6R-RtArrStoreRHR(RR9R:R*R=R5((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt	_arrstoreWs
!cCsBtj||jdd|j?}|jd }td|d|?S(Ni????RHR5R*(RRQR-RHR(RR9R:R5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt
_arrstore_obj_s"
cCsU|jd}|j|?d}t|?}tj|||jd?}td|?S(Niii????R5(R6RFR)Rt	CheckCastR-R(RR9R:tindexR&R(R5((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt
_checkcastds

c	Csg|jd\}}t|?}t|}t|||?}|j|gdg|d}td|?S(NiR*(R6RRMR!R-R8R(	RR9R:tctypeRR;RR R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_constks
cCs;t|td?}tj|_|j|g}td|?S(NtnullR*(R!RRtNullTTtdecltypeR-R(RR9R:R R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt
_constnullsscCs?|jd\}}t|?t|?}}|j| |j|}}tj||t|t|?}	||	jgdg|d}
td|	d|
?S(NiR5R*(	R6RR-RtConvertRMR7R8R(RR9R:tsrc_ctdest_ctsrc_cattdest_catR-targR5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_convertys c
Cs}|j\}}}t|?}|j|dd|?}tj|||?}|j|d |jg}	td|d|	?S(NiR5R*(R6RR-RtFCmpR7R(
RR9R:R,RtNaN_valR;R=R5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_fcmp?scCs|jd}|j|?\}}}tt|??}d|jdkrP|nd}d|jdkrv|d7}nt|j?|}	g|j|	D]}
|
dk	r?|
^q?}tj||j|||fd|d|j?}|j|	 |j	}
t
d|d|
?S(	NitputitstaticR=RHR5R*(R6RFtlenRR-R8RtFieldAccessRHtreturnedR(RR9R:RUttargetRIR&R;targcnttsplitIndtxR=R5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt
_field_access?s

,0cCsmt|td?}tj|_tj||jd|j|j	d|f?}|j	d }t
d|d|?S(NRYii????tjumpR*(R!RRRZR[RtIfR6t
successorsR-R(RR9R:RYRqR*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_if_a?s
/
cCsat|td?}tj||jd|j|jd|f?}|jd }td|d|?S(Niii????RqR*(R!RRRrR6RsR-R(RR9R:tzeroRqR*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_if_i?s/
cCsItj||jd|j|jd?}|jd }td|d|?S(Nii????RqR*(RRrR6RsR-R(RR9R:RqR*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_if_icmp?s)
c
Csx|j\}}}|j|}t|t|?}tj|||f?}t|j?}	|j|	|/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_iinc?s

cCsr|jd}|j|?d}t|?}tj|||jd?}|jd |jg}td|d|?S(Niii????R5R*(R6RFR)Rt
InstanceOfR-R7R(RR9R:RUR&R(R5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_instanceof?s
c
Cs|jd}|j|?\}}}tt|?d?}d|jdkr[|d7}nt|j?|}|jtjkr?|jnt	}	g|j|D]}
|
dk	r?|
^q?}tj||j|||fd|d|j
d|	?}|j| |j}
td|d|
?S(	NiiRhR=RHt
isThisCtorR5R*(R6RFRiRR-R,tvopst
INVOKEINITR?R$R8RtInvokeRHRkR(RR9R:RURlRIR&RmRnR?RoR=R5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_invoke?s

!,6cCsU|jdg}|jdkr,td|?Stj||?}td|d|?SdS(NR*Rq(R-R8treturnedFromRRt
ProcCallOp(RR9R:R*Rq((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_jsr?s

cCsR|jddd?}tj||?}|jd |jg}td|d|?S(Ni????iR5R*(R-RtICmpR7R(RR9R:R=R5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_lcmp?sc
Csq|jd\}}|j|?}|j|?}d}|dkrht|t|d?}tj|_n?|dkr?t|t	|d?}n?|dkr?t|t
|d?}n?|dkr?t|t|d?}nb|dkr?t|t|d?}n=|dkr9|ddf}t|t|?}tj
|_n|sEt?|j|gdg|d}	td	|	?S(
NitStringitInttLongtFloattDoubletClassR*(R6tgetConstPoolTypeRFR8R!RRtStringTTR[RRR	R
tClassTTtAssertionErrorR-R(
RR9R:RUR;t
entry_typeR=R R(R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_ldc?s,cCsHt|jd?}|jd}|j|j|||!}td|?S(NiiR*(RR6R-RyR(RR9R:R;RUR*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_load?s
cCsUd|jdk}tj||jd|j|?}|jd }td|d|?S(Ntexitii????R5R*(R6RtMonitorR-RHR(RR9R:tisExitR5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_monitors"
c
Cs?|j\}}}|j|?d}t|?}|d|ksGt?tj||j|||j?}|j| |jg}	t	d|d|	?S(NiiR5R*(
R6RFR)R?Rt
MultiNewArrayR-RHR7R(
RR9R:R,RUtdimRIR(R5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_multinewarrays#cCs?t|jd?}|j|d}|jddkrPtj||g?}n-t||jd?}tj|||g?}|j| |jgdg|d}t
d|d|?S(NiiR4R5R*(RR6R-RtFNegR!ttypetISubR7R8R(RR9R:R;RbR5RuR*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_negs'cCs^|jd}|j|?d}tj|||j?}|j|jg}td|d|?S(NiiR5R*(R6RFRtNewRHR-R7R(RR9R:RUt	classnameR5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_news

cCsxt|jddt?}tj|d?}tj||jd||j?}|jd |j	g}t
d|d|?S(NiR#ii????R5R*(RR6R$RR%RRGR-RHR7R(RR9R:R'R(R5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt	_newarray's
"cCst?S(N(R(RR9R:((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_nop/scCstj||?}td|?S(NRq(RtDummyRetR(RR9R:Rq((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_ret2scCs^tj||j?}|jd}|dkr7g}n|jt|?}td|d|?S(NiR5R*(Rt	TryReturnRHR6R8R-RR(RR9R:R5trtypeR*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_return6s
	cCs?t|jd?}|jd}t|j?}t|?||krg|dg||t|?7}n|j|||||+|j| }td|d|?S(NiiR*Rx(RR6R{RyRiR8R-R(RR9R:R;RURxR*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_storeAs
"cCsU|jdd!\}}tj||||jd?}|jd }td|d|?S(Niii????RqR*(R6RtSwitchR-R(RR9R:tdefaultttableRqR*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_switchMs
cCs,tj||jd?}td|dg?S(Ni????R5R*(RtThrowR-R(RR9R:R5((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt_throwSscCs?|jd}itdfd6tdfd6tdfd6|\}}tj||jdd|d	|?}|jd |jg}td
|d|?S(NiiRiRRi????tsignedtwidthR5R*(R6tTrueR$RtTruncateR-R7R(RR9R:R_R?R?R5R*((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyt	_truncateWs

7%RCcCs?|jjdd?}|j}|r@t||?td?ksFt?d?t||jt|??D?}|jt|? }|g|D]}||^q?7}td|?S(Nt+tt1234cSsi|]\}}||?qS(((t.0Rtv((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pys
?s	R*(	tbeforetreplacetaftertsetR?tzipR-RiR(RR9R:tbtaR?R*R((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pytgenericStackUpdate?s	('!cCsP|jd}|tjkr#|jS|tjtjtjfkrL|jdSdS(Ni(R6R?tRETURNt	returnKeytRETtTHROWRsR8(RR:tvop((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pytgetOnNoExceptionTarget?s
c
Cs|jst?|j}|jt?}g|jD]}|j||?^q1}g|jD]}|j||?^qY}td|d|d|?}|j	dk	r?d|j	kr?t}	nt|d}	|	|||?}
t
|
jd?\}}|
jd|?}
|
jd	|?}|r-|jr-|jn|}td|d|d|
?}|dk	rc|gng}g|jD]}|tf|f^qs}|dtjkr?|j|jtf|f?n|re|jre|s?t?t||?}tj||j||j?|?}td|d|d|jg?}|g|j?D]}|tf|f^qC7}n|s?|dtjks?t|j?d
ks?t?tj|t||??}nt |jd|d|?}||_!t"j#|?|_$g|
|D]}|dk	r?|^q?|_%|S(
NRHRyR-t1iR5RqR*Rxitlines(slinesjump(&tvisitedR?R6RRR-tmakeVarFromVtypeRyR
R?R8R?t_instructionHandlerstmaptgettoutMonadRsR$R?R?tappendR?toutExceptionR?RtOnExceptiontkeytrawExceptionHandlerstgetExceptSuccessorsR?RitGotoRtinslotstcollectionstOrderedDicttsuccessorStatesttempvars(RR:tinitMaptinstrRHtvtR-tlocals_R?tfuncR0R5RqR*Rxtnewmonadtoutslot_normR?tnodekeyR?tfallthroughtoutslot_excepttblockR ((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pytfromInstruction?sB	((	(
$!2.	,(?R?R?RRRRRR?tverifier.descriptorsRRt	ssa_typesRRR	R
RRR
RRMRRR!R)R3RARERJRLRORPRRRSRVRXR\RcRfRpRtRvRwR?R?R?R?R?R?R?R?R?R?R?R?R?R?R?R?R?R?R?tFAddRztADDtIAndR$tANDt	ANEWARRAYtARRLENtARRLOADtARRLOAD_OBJtARRSTOREtARRSTORE_OBJt	CHECKCASTtCONSTt	CONSTNULLtCONVERTtFDivtIDivtDIVtFCMPt	GETSTATICtGETFIELDtGOTOtIF_AtIF_ACMPtIF_ItIF_ICMPtIINCt
INSTANCEOFR?tINVOKEINTERFACEt
INVOKESPECIALtINVOKESTATICt
INVOKEVIRTUALtJSRtLCMPtLDCtLOADtMONENTERtMONEXITt
MULTINEWARRAYtFMultIMultMULtNEGtNEWtNEWARRAYtNOPtIOrtORt	PUTSTATICtPUTFIELDtFRemtIRemtREMR?R?tIShlR?tSHLtIShrtSHRtSTOREtFSubR?tSUBtSWITCHR?tTRUNCATEtIUshrtUSHRtIXortXORR?R?R?R?(((s>/home/alex/projects/github/krakatau/Krakatau/ssa/blockmaker.pyts?".						
											
										
					
	
									











































	
	




© 2015 - 2025 Weber Informatics LLC | Privacy Policy