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

Lib.Krakatau.java.astgen.pyc Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
?
?HRc@sddlmZddlmZddlmZmZmZmZmZm	Z	ddl
mZmZm
Z
ddl
mZddlmZddlmZmZdd	lmZid
ej6dej6dej6d
ej6dej6dej6Ziejej6ejej6ejej6ejej6Z de!fd??YZ"ej#ej$ej%ej&ej'fZ(e(ej)ej*ej+ej,ej-ej.f7Z(e(ej/ej0ej1ej2ej3f7Z(e4e5e(dj6???Z7d?Z8d?Z9e4e5ddj6???Z:e;d?Z<d?Z=dS( i(tast(t
variablemerge(tSEBlockItemtSEScopetSEIftSESwitchtSETrytSEWhilei(t	ssa_typestssa_opst	ssa_jumps(tobjtypes(tLabelGen(tparseFieldDescriptortparseMethodDescriptor(topnamestitjtftdtbtstVarInfocBs8eZd?Zd?Zd?Zed?Zd?ZRS(c
Cs:|jj|_t?j|_t|jdt?d}|rPtj	|d?nd|_|jj|_
||_||_i|_i|_x?|D]?}x?|jj?D]?\}}|jtjkr?q?n|jtjkr|j?}	|jj?r!d|	ddf}	q!n
t|j}	|	|j|8s(	R&tconstRRtLiteralR!tformatRBtLocal(R0R7tnumR9tnamefunc((RCs;/home/alex/projects/github/krakatau/Krakatau/java/astgen.pyt_newVar/s
	$	cCs?|jtjkst?|||f}|jj||?}y|j|SWn<tk
r?|j|d|dj	?}||j|<|SXdS(Nii(
R)RR*tAssertionErrorR$R=R%tKeyErrorRKRI(R0tnodeR7tisCasttkeytnew((s;/home/alex/projects/github/krakatau/Krakatau/java/astgen.pyR7=s

cs"??fd?}tj||?S(Ncs?jj??S(N(R#R?(R@(RAR0(s;/home/alex/projects/github/krakatau/Krakatau/java/astgen.pyRDIs(RRH(R0R9RARJ((RAR0s;/home/alex/projects/github/krakatau/Krakatau/java/astgen.pyt	customVarHs(t__name__t
__module__R:RBRKRR7RR(((s;/home/alex/projects/github/krakatau/Krakatau/java/astgen.pyRs
			s#+ / * % - & | << >> >>> ^ + / * % -c	Cs?g|jD]$}|jtjkr
||?^q
}d|ksFt?d}t|tj?rot	j
|d?St|t?r?t}t	j
|t|?|?}nqt|tj?r?t	j|ddtj?}n@t|tj?r?t	j|?}nt|tj?r=t	j|d|d?}t	j||d?}n?t|tj?rtt	jt	j|j?|d?}n?t|tj?r?idtj6dtj6dtj6dtj6|j}|df}t	jt	j|?|d?}n+t|tj tj!f?r?tj"}	t	j#j$t	j#j%t	j#j&}
}}t|tj!?pQ|j'dk}
|
r?t	j(t	j
d	||	?|
t	j(t	j
d
||	?||??}q|j'dks?t?t	j(t	j
d||	?|t	j(t	j
d
||	?||
??}nt|tj?r?tj)t*|j+d
t,?d?}|j-dt.j/t.j0fkr?|j|k}|jdf}t	jt	j|?|j1|d|?}nt	j|d|j1|?}|j-dt.j2t.j0fkrt	j||d?}qn)t|tj3?rt	j4d|d?}n?t|tj5?rb|dt	j|j?f}t	j
d|dtj"?}n?t|tj6?r?t7|j+d
t,?\}}tj8|?}|r?tj)|d?nd}|j-dt.j9kr|j:r|j|kr?dnd}t	j;d|||d||?}q|j-dt.j<kru|jdf}t	j;t	j|?|j1dg||||?}qt	j;|d|j1|jdfg||d||?}nct|tj=?r?|j>r?dnd}t	j?||?}n't|tj@?rt	jA|jB|?}n?t|tjC?rSt	j?dt	j|jB?gdtD?}n?t|tjE?r?|jF\}}t	jA||df|d?}n}t|tjG?ridtDdf6dt,df6dtDdf6|jH|jIf}|df}t	jt	j|?|d?}n|jJdk	rG|rGt	j||jJ?|?}n|dkr?t|tjK?ridSt	jLdt|?jM?Snt	jN|?S(Nitlengthiis.ints.longs.floats.doubletRt	printLeftt-t
instanceofR>tthistsupers
//monexit({})s//monenter({})s// {}tisNews.shortis.chars.byteis//(OtparamsR)RR*RRLt
isinstanceR	tThrowRtThrowStatementt_math_typest
_math_symbolstBinaryInfixt	ArrLengthtFieldAccessRtIntTTtArrLoadtArrayAccesstArrStoret
Assignmentt	CheckCasttCasttTypeNamet	target_tttConverttSSA_INTtSSA_LONGt	SSA_FLOATt
SSA_DOUBLEttargettFCmptICmptBoolTTRFtN_ONEtZEROtONEtNaN_valtTernaryRR
tdescRtinstructionRt	GETSTATICt	PUTSTATICR!tPUTFIELDtFNegtUnaryPrefixt
InstanceOftInvokeRtverifierToSynthetic_seqt
INVOKEINITt
isThisCtortMethodInvocationtINVOKESTATICtMonitortexittDummyt
MultiNewArrayt
ArrayCreationR9tNewtTruetNewArraytbasettTruncatetsignedtwidthtrvalt	TryReturntStringStatementRStExpressionStatement(toptgetExprR"R7R^R@topdictttypecodeR9tboolttcn1tc0tc1tascendR>RXtargstvtypestrettypesttt_typestret_typeR!tfmttbasetdim((s;/home/alex/projects/github/krakatau/Krakatau/java/astgen.pyt
_convertJExprQs?4%!"	&!EE"*%4<*#="cs%??fd????fd?}?j}|dk	rKt||j?ng}g|D]}|dk	rX|^qX}i}|r.t|jdtj?r.t|djtj	?s?t
?|jdjd}|dj}	tj?j
?|t?|	?|d_|djjd}
||<|	j|
_ng}g}xy?jD]n}
|
?jk|
?jkksnt
?|
?jkrx2t?j|
|
j?D]{\}}|dkr?q?ntj?j
|
|??j
?|??}|jd|jdkr?|jtj|??q?q?WqDx?t?j|
|
j?D]{\}}|j|?j
?|??}tj?j
|
|?|?}|jd|jdkr3|jtj|??q3q3WqDW|d ||d|}?j?}|dkr?dn|j}d}t|tjtjf?r?|s%t
?t|tj?ri?j
?|jd?}|jtj|??q?t|j?dkr??j
?|jd?}|jtj|?j ??q?|jtj??n"t|?dkr?|dj!}ntj"?j#?j!|||?}d|ks!t
?|S(Ncs?j?|?S(N(R7(R7(tinfoRN(s;/home/alex/projects/github/krakatau/Krakatau/java/astgen.pyRD?scst|??j?S(N(R?R"(R?(R?R?(s;/home/alex/projects/github/krakatau/Krakatau/java/astgen.pyRD?si????ii($R6RtmaptlinesR_R	RlR@RRmRLR^RkR7R?R>t
successorstoutvarsteassignstziptinvarstappendR?R=tnormalSuccessorstjumpR
tRethrowtReturnRatlentReturnStatementR t_keytStatementBlockR(R?tendkRNtop2exprR6R?txt
outreplaceR7tcexprtnvarR?tnassignstn2toutvtinvR@trightt
statementstnorm_successorsR?tjumpKeytparamRQ((R?R?RNs;/home/alex/projects/github/krakatau/Krakatau/java/astgen.pyt_createASTBlock?s^	$%
($&* &!
!teqtnetlttgetgttles== != < >= > <=cCs?|jj}|dk	r$|jjnd}t|t?rLt|||j?St|t?r?|jd|g}gt	|j|?D]\}}t
|||?^q?}	tj|j
|||	|d|?St|t?r%g|j?D]}
t
||
|t?^q?}	tj|j
||t|	??St|t?rg|j?D]}
t
||
|t?^qA}	|j?dj}tj|j|j?}|jdkr?|j|d?}
n|j||j?}
tj||
?}||	dfg}tj|j
|||	d|?S|d}|jj}|jj}t|t?r?g|j?D]}
t
||
|t?^qI}	t |j!}g|j"D]}|j||?^q?}tj#||t$j%?}tj&|j
|||t|	??}n?t|t'?r?|j(d|g}gt	|j(|?D]!\}}t
|||t?^q}	x|	D]}||_)qBW|j||j"d?}t	|j*|	?}tj+|j
||||?}nt|||?}|j,dks?t-?||_,tj|j
||||g|?S(Nit	labelablei????tignoredExceptioni(i????(.t
entryBlockR?RR_RR?RNRR(R?t
_createASTSubRR?RRt	getScopesR?tWhileStatementttupleRtCatchTypeNamesRttopttstcatchvarRRR7tVariableDeclaratortTryStatementtheadR6R?Rt	_cmp_strstcmpR^RdRRxtIfStatementRtorderedtbreakKeytordered_keysetstSwitchStatementR?RL(R?tcurrenttftitemt
forceUnlabledtbeginkR?tftitemstitemtnewfttpartstscopet	catchnodetdecltR?tdecltpairstmidkRNR?tcmp_strR7texprstifexprRQtpartR@t	headscope((s;/home/alex/projects/github/krakatau/Krakatau/java/astgen.pyR??sT7#.. 
.
(':

!	cCsCtj|?}t||j||?}t||d?}||fS(N(RtmergeVariablesRR2R?R(R1tssagraphtserootR3R4R?tastroot((s;/home/alex/projects/github/krakatau/Krakatau/java/astgen.pyt	createAST&sN(seqsnesltsgesgtsle(>tRRtsetreeRRRRRRtssaRR	R
RR3Rtverifier.descriptorsR
RRRgtLongTTtFloatTTtDoubleTTRxtStringTTR<RqRrRsRtR/tobjectRtIAddtIDivtIMultIRemtISubRbtIAndtIOrtIShltIShrtIUshrtIXortFAddtFDivtFMultFRemtFSubtdictR?tsplitRcR?R?R?RR?R(((s;/home/alex/projects/github/krakatau/Krakatau/java/astgen.pyts,.<$.(	\	A7




© 2015 - 2025 Weber Informatics LLC | Privacy Policy