%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/compiler/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/compiler/pycodegen.pyo


Oac@sddlZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZddlmZm
Z
mZmZddlmZmZmZmZmZddlmZmZmZmZmZmZmZmZmZddlm Z yej!dZ"Wne#k
r2d	Z"nXid
ddf6dd	df6ddd	f6d
d	d	f6Z$d	Z%dZ&dZ'dZ(ddZ)e*e*dZ+dfdYZ,de,fdYZ-de,fdYZ.de,fdYZ/dfdYZ0dZ1dfdYZ2d fd!YZ3d"e3e2fd#YZ4d$e3e2fd%YZ5d&e3e2fd'YZ6d(fd)YZ7d*e3e7e2fd+YZ8d,e3e7e2fd-YZ9d.fd/YZ:d0e3e:e2fd1YZ;d2Z<d3Z=d4fd5YZ>d6fd7YZ?d8e?fd9YZ@d:e?fd;YZAd<e?fd=YZBd>e?fd?YZCie@ejD6eAejE6eBejF6eCejG6ZHd@ZIeJdAkrxejKd	D]ZLe)eLqWndS(BiN(tStringIO(tasttparsetwalktsyntax(tpyassemtmisctfuturetsymbols(tSC_LOCALtSC_GLOBAL_IMPLICITtSC_GLOBAL_EXPLICITtSC_FREEtSC_CELL(	t
CO_VARARGStCO_VARKEYWORDStCO_NEWLOCALSt	CO_NESTEDtCO_GENERATORtCO_FUTURE_DIVISIONtCO_FUTURE_ABSIMPORTtCO_FUTURE_WITH_STATEMENTtCO_FUTURE_PRINT_FUNCTION(tTupleArgiit
CALL_FUNCTIONtCALL_FUNCTION_VARtCALL_FUNCTION_KWtCALL_FUNCTION_VAR_KWiiicCst|d}|j}|jt||}y|j|Wntk
r[n+Xt|dd}|j||jdS(NtUtctwb(topentreadtclosetModuletcompiletSyntaxErrortdump(tfilenametdisplaytftbuftmod((s./usr/local/lib/python2.7/compiler/pycodegen.pytcompileFile%s


cCs|dk	s|dk	r$tdn|dkrBt||}nH|dkr`t||}n*|dkr~t||}ntd|j|jS(s*Replacement for builtin compile() functionsnot implemented yettsingletexectevals6compile() 3rd arg must be 'exec' or 'eval' or 'single'N(tNonetRuntimeErrortInteractiveR"t
Expressiont
ValueErrorR#tcode(tsourceR&tmodetflagstdont_inherittgen((s./usr/local/lib/python2.7/compiler/pycodegen.pyR#3s
tAbstractCompileModecBs2eZdZdZdZdZdZRS(cCs||_||_d|_dS(N(R5R&R/R4(tselfR5R&((s./usr/local/lib/python2.7/compiler/pycodegen.pyt__init__Hs		cCs9t|j|j}tj|j|tj||S(N(RR5R6Rtset_filenameR&Rtcheck(R;ttree((s./usr/local/lib/python2.7/compiler/pycodegen.pyt	_get_treeMs
cCsdS(N((R;((s./usr/local/lib/python2.7/compiler/pycodegen.pyR#SscCs|jS(N(R4(R;((s./usr/local/lib/python2.7/compiler/pycodegen.pytgetCodeVsN(t__name__t
__module__R/R6R<R@R#RA(((s./usr/local/lib/python2.7/compiler/pycodegen.pyR:Ds
			R2cBseZdZdZRS(R.cCs+|j}t|}|j|_dS(N(R@tExpressionCodeGeneratorRAR4(R;R?R9((s./usr/local/lib/python2.7/compiler/pycodegen.pyR#]s(RBRCR6R#(((s./usr/local/lib/python2.7/compiler/pycodegen.pyR2YsR1cBseZdZdZRS(R,cCs+|j}t|}|j|_dS(N(R@tInteractiveCodeGeneratorRAR4(R;R?R9((s./usr/local/lib/python2.7/compiler/pycodegen.pyR#fs(RBRCR6R#(((s./usr/local/lib/python2.7/compiler/pycodegen.pyR1bsR"cBs8eZdZddZdZejZdZRS(R-icCsN|j}t|}|r;ddl}|j|GHn|j|_dS(Ni(R@tModuleCodeGeneratortpprintRAR4(R;R'R?R9RG((s./usr/local/lib/python2.7/compiler/pycodegen.pyR#oscCs*|j|jtj|j|dS(N(twritetgetPycHeadertmarshalR%R4(R;R(((s./usr/local/lib/python2.7/compiler/pycodegen.pyR%wscCs2tjj|j}tjd|}|j|S(Ns<i(tostpathtgetmtimeR&tstructtpacktMAGIC(R;tmtime((s./usr/local/lib/python2.7/compiler/pycodegen.pyRI}s(	RBRCR6R#R%timpt	get_magicRPRI(((s./usr/local/lib/python2.7/compiler/pycodegen.pyR"ks
	tLocalNameFindercBskeZdZddZdZdZdZdZdZdZ	dZ
d	Zd
ZRS(sFind local names in scopecCsCtj|_tj|_x|D]}|jj|q%WdS(N(RtSettnamestglobalstadd(R;RVtname((s./usr/local/lib/python2.7/compiler/pycodegen.pyR<s
cCsFx<|jjD]+}|jj|r|jj|qqW|jS(N(RWtelementsRVthas_elttremove(R;telt((s./usr/local/lib/python2.7/compiler/pycodegen.pyt	getLocalsscCsdS(N((R;tnode((s./usr/local/lib/python2.7/compiler/pycodegen.pyt	visitDictscCs(x!|jD]}|jj|q
WdS(N(RVRWRX(R;R_RY((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitGlobalscCs|jj|jdS(N(RVRXRY(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitFunctionscCsdS(N((R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitLambdascCs4x-|jD]"\}}|jj|p(|q
WdS(N(RVRX(R;R_RYtalias((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitImportscCs4x-|jD]"\}}|jj|p(|q
WdS(N(RVRX(R;R_RYRd((s./usr/local/lib/python2.7/compiler/pycodegen.pyt	visitFromscCs|jj|jdS(N(RVRXRY(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitClassscCs|jj|jdS(N(RVRXRY(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitAssNames((
RBRCt__doc__R<R^R`RaRbRcReRfRgRh(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRTs								cCs&t|tjr"|js"dSndS(Nii(t
isinstanceRtConsttvalue(R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytis_constant_falses	t
CodeGeneratorcBsUeZdZdZdZdZdZdZdZ	dZ
dZdZdZ
d	Zd
ZdZdZd
ZdZdZedZeZdZdZdZdZdZdZddZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)d Z*d!Z+d"Z,d#Z-d$Z.d%Z/d&Z0d'Z1d(Z2d)Z3d*Z4d+Z5d,Z6d-Z7d.Z8dZ9d/Z:d0Z;d1Z<d2Z=d3Z>d4Z?d5Z@d6ZAd7ZBd8ZCd9ZDd:ZEd;ZFd<ZGd=d>ZHeId?krveHZJeHZKnd@ZJdAZKdBZLidCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6ZMd[ZNd\ZOd]ZPd^ZQd_ZRd`ZSddaZTdbZUdcZVddZWddeZXddfZYdgZZdhZ[diZ\djZ]dkZ^dlZ_dmZ`dnZadoZbdpZcdqZddrZedsZfdtZgduZhdvZidwZjdxZkdyZldzZmd{Znd|Zod}Zpd~ZqdZrdZsdZtRS(sDefines basic code generator for Python bytecode

    This class is an abstract base class.  Concrete subclasses must
    define an __init__() that defines self.graph and then calls the
    __init__() defined in this class.

    The concrete class must also define the class attributes
    NameFinder, FunctionGen, and ClassGen.  These attributes can be
    defined in the initClass() method, which is a hook for
    initializing these methods after all the classes have been
    defined.
    icCs|jdkr(|jd|j_n|jtj|_tj|_d|_	|j
d|_|jj
}x|D]}|dkr|jjtd|_q|dkr|jjtq|dkr|jjtq|dkr|jjtqqWdS(Nit
BINARY_DIVIDEtdivisiontBINARY_TRUE_DIVIDEtabsolute_importtwith_statementtprint_function(t_CodeGenerator__initializedR/t	initClasst	__class__t
checkClassRtStacktlocalstsetupstlast_linenot_setupGraphDelegationt_div_opt
get_moduletfuturestgraphtsetFlagRRRR(R;Rtfeature((s./usr/local/lib/python2.7/compiler/pycodegen.pyR<s(

	
	
cCsdS(s)This method is called once for each classN((R;((s./usr/local/lib/python2.7/compiler/pycodegen.pyRvtcCs7yWn,tk
r2}d|jj}t|nXdS(s*Verify that class is constructed correctlysBad class construction for %sN(tAssertionErrorRwRB(R;tmsgtintro((s./usr/local/lib/python2.7/compiler/pycodegen.pyRxs
cCsO|jj|_|jj|_|jj|_|jj|_|jj|_dS(N(RtemittnewBlockt
startBlockt	nextBlocktsetDocstring(R;((s./usr/local/lib/python2.7/compiler/pycodegen.pyR}s
cCs
|jjS(sReturn a code object(RRA(R;((s./usr/local/lib/python2.7/compiler/pycodegen.pyRAscCs*|jdk	r"tj||jS|SdS(N(t
class_nameR/Rtmangle(R;RY((s./usr/local/lib/python2.7/compiler/pycodegen.pyRscCs tj}t|||jS(N(Rt
SymbolVisitorRtscopes(R;R?ts((s./usr/local/lib/python2.7/compiler/pycodegen.pytparseSymbolss
cCs
tddS(Ns#should be implemented by subclasses(R0(R;((s./usr/local/lib/python2.7/compiler/pycodegen.pyRscCs|jjj|S(N(RzttopR[(R;RY((s./usr/local/lib/python2.7/compiler/pycodegen.pytisLocalName
scCs|jd|dS(NtSTORE(t_nameOp(R;RY((s./usr/local/lib/python2.7/compiler/pycodegen.pyt	storeName
scCs|jd|dS(NtLOAD(R(R;RY((s./usr/local/lib/python2.7/compiler/pycodegen.pytloadNamescCs|jd|dS(NtDELETE(R(R;RY((s./usr/local/lib/python2.7/compiler/pycodegen.pytdelNamescCs|j|}|jj|}|tkrd|jsM|j|d|q|j|d|n|tkr|j|d|n|tkr|js|j|d|q|j|d|nB|tks|t	kr|j|d|nt
d||fdS(Nt_NAMEt_FASTt_GLOBALt_DEREFs unsupported scope for var %s: %d(Rtscopet
check_nameR	t	optimizedRRR
RR
R0(R;tprefixRYR((s./usr/local/lib/python2.7/compiler/pycodegen.pyRs 		cCs8|jr |j|d|n|j|d|dS(sEmit name ops for names generated implicitly by for loops

        The interpreter generates names that start with a period or
        dollar sign.  The symbol table ignores these names because
        they aren't present in the program text.
        RRN(RR(R;RRY((s./usr/local/lib/python2.7/compiler/pycodegen.pyt_implicitNameOp+s	cCsTt|dd}|dk	rP||jks3|rP|jd|||_tStS(sEmit SET_LINENO if necessary.

        The instruction is considered necessary if the node has a
        lineno attribute and it is different than the last lineno
        emitted.

        Returns true if SET_LINENO was emitted.

        There are no rules for when an AST node should have a lineno
        attribute.  The transformer and AST code need to be reviewed
        and a consistent policy implemented and documented.  Until
        then, this method works around missing line numbers.
        tlinenot
SET_LINENON(tgetattrR/R|RtTruetFalse(R;R_tforceR((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
set_lineno<s	cCs|j||_|j||_|jdd|jr^|jd|j|jdnt|j|jdd}|j	j
|j|j|j|jdd|jddS(NRit
LOAD_CONSTRitverbosetRETURN_VALUE(RRRRtdocRRR_t
NameFinderRztpushR^tvisitR/(R;R_tlnf((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitModuleZs	cCsP|j||j||_|j||_|j|j|jddS(NR(RRRRRR_R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitExpressiongs

cCsC|j|dd|jr/|j|jn|j|jdS(NtisLambdai(t_visitFuncOrLambdaRRRRY(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyRbns	cCs|j|dddS(NRi(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyRctscCs|rI|jrIx!|jjD]}|j|qWt|jj}nd}|j||j||j|j}t|j	||j
|j|x|jD]}|j|qW|j
|t|jx$t|D]}|jddqWdS(NiRi(t
decoratorstnodesRtlentFunctionGenRRRRR4tfinishRtdefaultst_makeClosuretrangeR(R;R_Rt	decoratortndecoratorsR9tdefaultti((s./usr/local/lib/python2.7/compiler/pycodegen.pyRws

cCs|j||j|j}t|j||j|j||jd|jx|j	D]}|j
|qbW|jdt|j	|j|d|jdd|jd|j
|jdS(NRtBUILD_TUPLEiRtBUILD_CLASS(tClassGenRRRR4RRRRYtbasesRRRR(R;R_R9tbase((s./usr/local/lib/python2.7/compiler/pycodegen.pyRgs


cCs|j}t|j}xt|D]}|j|\}}t|rSq(n|j||j||j}|jd||j|j||jd||j	|q(W|j
r|j|j
n|j|dS(NtPOP_JUMP_IF_FALSEtJUMP_FORWARD(RRttestsRRmRRRRRtelse_(R;R_tendtnumtestsRttesttsuitetnextTest((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitIfs"



	cCs|j||j}|j}|j}|jd||j||jjt|f|j|dt|j|j	|jd|p||j|j|j
|jd||j||jd|jj|j
r
|j|j
n|j|dS(Nt
SETUP_LOOPRRt
JUMP_ABSOLUTEt	POP_BLOCK(RRRRR{RtLOOPRRRtbodyRtpopR(R;R_tloopRtafter((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitWhiles&





	cCs(|j}|j}|j}|jjt|f|j||jd||j|j|jd|j||j|dd|jd||j|j	|j|j
|jd||j||jd|jj|jr|j|jn|j|dS(NRtGET_ITERRitFOR_ITERRR(
RR{RRRRRtlistRtassignRRR(R;R_tstarttanchorR((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitFors(





	cCsC|js%td|j|jfn|j||jddS(Ns'break' outside loop (%s, %d)t
BREAK_LOOP(R{R$R&RRR(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitBreaks
	
cCs[|js%td|j|jfn|jj\}}|tkrp|j||jd||jn|t	ks|t
kr)|j|t|j}x=|dkr|d}|j|\}}|tkrPqqW|tkrtd|j|jfn|jd||jn.|tkrWd}t||j|jfndS(Ns 'continue' outside loop (%s, %d)Riit
CONTINUE_LOOPs7'continue' not allowed inside 'finally' clause (%s, %d)(
R{R$R&RRRRRRtEXCEPTtTRY_FINALLYRtEND_FINALLY(R;R_tkindtblockRt
loop_blockR((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitContinues0	




cCsp|j}x<|jd D]-}|j||j|||jqW|j|jd|j|dS(Ni(RRRRR(R;R_tjumpRtchild((s./usr/local/lib/python2.7/compiler/pycodegen.pyt	visitTests
cCs|j|ddS(NtJUMP_IF_FALSE_OR_POP(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitAndscCs|j|ddS(NtJUMP_IF_TRUE_OR_POP(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitOrscCs|j}|j}|j|j|jd||j|j|jd||j||j|j|j|dS(NRR(RRRRtthenRR(R;R_tendblockt	elseblock((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitIfExps
cCs3|j|j|j}xl|jd D]]\}}|j||jd|jd|jd||jd||jq*W|jr|jd\}}|j||jd|nt|jdkr/|j}|jd||j||jd|jd	|j|ndS(
NitDUP_TOPt	ROT_THREEt
COMPARE_OPRiRtROT_TWOtPOP_TOP(RtexprRtopsRRRR(R;R_tcleanuptopR4R((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitCompare s(


	



c	CsF|j||jddg}xttt|j|jD]\}}|j|\}}d}x<|jD]1}|dkr|j	}n|j||qvW|j
d|||fqEW|j|j|jdt|jdxJ|D]B\}}}|r!|j|n|jd||j
|qWdS(Nt
BUILD_LISTitLIST_APPENDiR(RRtzipRRtqualsRR/tifsRtinsertRRR(	R;R_tstackRtfor_RRtconttif_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitListComp8s$
.c	CsF|j||jddg}xttt|j|jD]\}}|j|\}}d}x<|jD]1}|dkr|j	}n|j||qvW|j
d|||fqEW|j|j|jdt|jdxJ|D]B\}}}|r!|j|n|jd||j
|qWdS(Nt	BUILD_SETitSET_ADDiR(RRRRRRRR/RRRRRR(	R;R_RRR	RRR
R((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitSetCompPs$
.c	CsV|j||jddg}xttt|j|jD]\}}|j|\}}d}x<|jD]1}|dkr|j	}n|j||qvW|j
d|||fqEW|j|j|j|j|jdt|jdxJ|D]B\}}}|r1|j
|n|jd||j|qWdS(Nt	BUILD_MAPitMAP_ADDiR(RRRRRRRR/RRRRltkeyRR(	R;R_RRR	RRR
R((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitDictComphs&
.cCs|j}|j}|j|j|jd|j||j|dt|jd||j|j|j||fS(NRRR(RRRRRRRR(R;R_RR((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitListCompFors


cCsA|j|dt|j|j|jd||jdS(NRR(RRRRRR(R;R_tbranch((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitListCompIfscCs|jj}|rox|D]}|jd|qW|jdt||jd||jd|n |jd||jd|dS(NtLOAD_CLOSURERRtMAKE_CLOSUREt
MAKE_FUNCTION(Rt
get_free_varsRR(R;R9targstfreesRY((s./usr/local/lib/python2.7/compiler/pycodegen.pyRs
cCst||j|j|j}t|j||j|j||j|d|j	|jj
dj|jd|jdddS(NiRRi(
tGenExprCodeGeneratorRRRRR4RRRRRtiterR(R;R_R9((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitGenExprs


c
Css|j|g}xttt|j|jD]\}}|j|\}}}d}x<|jD]1}	|dkr|j}n|j|	|qiW|j	d||||fq5W|j|j
|jd|jdxt|D]l\}}}}|r|j|n|jd||j
||jd|jj|j|qW|jdddS(NitYIELD_VALUERRRR(RRRRRRR/RRRRRRRR{R(
R;R_RRR	RRRR
R((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitGenExprInners,
. 




cCs|j}|j}|j}|jjt|f|jd||jrc|jdn|j|j|jd|j	||j
|dt|jd||j	|j|j|||fS(NRs.0RRR(
RR{RRRt
is_outmostRRRRRRR(R;R_RRR((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitGenExprFors	


cCsA|j|dt|j|j|jd||jdS(NRR(RRRRRR(R;R_R((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitGenExprIfscCsdS(N((R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitAssertscCs|j|d}|jr9|j|j|d}n|jr_|j|j|d}n|jr|j|j|d}n|jd|dS(Niit
RAISE_VARARGS(Rtexpr1Rtexpr2texpr3R(R;R_tn((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitRaises
	
	
	
cCs9|j}|j}|j}|jr<|j}n|}|j||jd||j||jjt|f|j|j	|jd|jj
|jd||j|t|j
d}xtt|j
D]}|j
|\}}	}|j||rt|jd|j||jdd|j}
|jd|
|jn|jd	|	r|j|	n
|jd	|jd	|j||jd||r|j|
q|jqW|jd
|jr(|j||j|jn|j|dS(NtSETUP_EXCEPTRRiRRsexception matchRRR(RRRRRR{RRRRRRRthandlersR(R;R_RR-RtlElsetlastRRttargettnext((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitTryExcept	sR	













	
cCs|j}|j}|j||jd||j||jjt|f|j|j|jd|jj	|jdd|j||jjt|f|j|j|jd|jj	dS(Nt
SETUP_FINALLYRRR(
RRRRR{RRRRRR/Rtfinal(R;R_RR4((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitTryFinally8s





cCs|j}|j}|jd7_d|j}|j||j|j|jd|jdd|jd|jdd|jdd	|jdkr|jd
n|jd||jd||j	||j
jt|f|jdk	r?|jd
||jd||j|jn|j|j
|jd|j
j|jdd|j	||j
jt|f|jd|jd|j
j|jd8_dS(Nis_[%d]Rt	LOAD_ATTRt__exit__Rt	__enter__RiRRR3RRRRtWITH_CLEANUPR(Rt_CodeGenerator__with_countRRRRtvarsR/RRR{RRRRR(R;R_RR4tvaluevar((s./usr/local/lib/python2.7/compiler/pycodegen.pyt	visitWithKs>










cCs.|j||j|j|jddS(NR(RRRR(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitDiscardos
cCs|jd|jdS(NR(RRl(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitConsttscCs'|jd|j|j|jdS(NR(RRYRR(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitKeywordwscCsdS(N((R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyRa{scCs!|j||j|jdS(N(RRRY(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt	visitNames
cCs|j|dS(N(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt	visitPassscCs|j||jjtr%dnd}x|jD]\}}tdkrp|jd||jddn|jd||jdd}|r|j	||j
|q5|j
|q5WdS(NiiiRtIMPORT_NAMEt.(RRt	checkFlagRRVtVERSIONRR/tsplitt_resolveDotsR(R;R_tlevelRYRdR*((s./usr/local/lib/python2.7/compiler/pycodegen.pyRes

cCs9|j||j}|dkr>|jjtr>d}ntd|jD}tdkr|jd||jd|n|jd|j	x|jD]\}}tdkr|dkrd|_
|jddS|jd	||j||j|p
|q|jd	|qW|jd
dS(Niicss|]\}}|VqdS(N((t.0RYRd((s./usr/local/lib/python2.7/compiler/pycodegen.pys	<genexpr>siRRCt*tIMPORT_STARtIMPORT_FROMR(
RRIRRERttupleRVRFRtmodnamet	namespaceRHR(R;R_RItfromlistRYRd((s./usr/local/lib/python2.7/compiler/pycodegen.pyRfs(
			

cCsN|jd}t|dkr%dSx"|dD]}|jd|q0WdS(NRDiR6(RGRR(R;RYteltsR]((s./usr/local/lib/python2.7/compiler/pycodegen.pyRHs
cCs0|j|j|jd|j|jdS(NR6(RRRRtattrname(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitGetattrscCs|j||j|jt|jd}xhtt|jD]Q}|j|}||kru|jdnt|tj	rF|j|qFqFWdS(NiR(
RRRRRRRRjRtNode(R;R_tdupsRR]((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitAssigns

cCsa|jdkr"|j|jn;|jdkrQ|j||j|jndG|jGHdS(Nt	OP_ASSIGNt	OP_DELETEtoops(R7RRYRR(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyRhs
cCs|j|j|jdkr>|jd|j|jn?|jdkrl|jd|j|jndG|jGH|GHdS(NRXt
STORE_ATTRRYtDELETE_ATTRswarning: unexpected flags:(RRR7RRRS(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitAssAttrstUNPACK_SEQUENCEcCsSt|dkr.|j|t|jnx|jD]}|j|q8WdS(NRY(tfindOpRRRR(R;R_RR((s./usr/local/lib/python2.7/compiler/pycodegen.pyt_visitAssSequencesicCs|j|ddS(NtUNPACK_TUPLE(R`(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitAssTuplescCs|j|ddS(NtUNPACK_LIST(R`(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitAssListscCsg|j|t|j}|j|d|j|j|j|j|j|j|ddS(Ntloadtstore(Rtwrap_augR_RRRt_augmented_opcodeR(R;R_taug_node((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitAugAssigns
tINPLACE_ADDs+=tINPLACE_SUBTRACTs-=tINPLACE_MULTIPLYs*=tINPLACE_DIVIDEs/=tINPLACE_FLOOR_DIVIDEs//=tINPLACE_MODULOs%=t
INPLACE_POWERs**=tINPLACE_RSHIFTs>>=tINPLACE_LSHIFTs<<=tINPLACE_ANDs&=tINPLACE_XORs^=t
INPLACE_ORs|=cCsB|dkr|j|jn|dkr>|j|jndS(NReRf(RRYR(R;R_R6((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitAugNamescCs|dkrH|j|j|jd|jd|j|jn8|dkr|jd|jd|j|jndS(NReRR6RfRR[(RRRRRS(R;R_R6((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitAugGetattr	s

cCs|dkr|j|dn|dkrd}|jrG|dB}n|jr]|dB}n|dkry|jdn)|dkr|jdn
|jd	|jd
|ndS(NReiRfiiRitROT_FOURRsSTORE_SLICE+%d(t
visitSlicetlowertupperR(R;R_R6tslice((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitAugSlices	
	

cCsL|dkr|j|dn)|dkrH|jd|jdndS(NReiRfRtSTORE_SUBSCR(tvisitSubscriptR(R;R_R6((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitAugSubscript#s

cCs|j|j|jdkr2|jddn|j|j|jdkra|jdn|j|j|jddS(NRRt	EXEC_STMT(RRRzR/RRW(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt	visitExec*scCsd}d}|j||j|jxG|jD]<}|j|t|tjre|d}q3|d}q3W|jdk	r|j|jn|j	dk	r|j|j	n|jdk	}|j	dk	}t
||f}|j||d>|BdS(Niii(RRR_RRjRtKeywordt	star_argsR/t
dstar_argstcallfunc_opcode_infoR(R;R_tpostkwtargt	have_start
have_dstartopcode((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitCallFunc6s"


cCs|j||jr)|j|jnxj|jD]_}|jrR|jdn|j||jr|jd|jdq3|jdq3W|jr|r|jdndS(NRRt
PRINT_ITEM_TOt
PRINT_ITEMR(RtdestRRR(R;R_tnewlineR((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitPrintJs
		
	
cCs=|j|dd|jr,|jdn
|jddS(NRitPRINT_NEWLINE_TOt
PRINT_NEWLINE(RRR(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitPrintnlZs	cCs.|j||j|j|jddS(NR(RRRlR(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitReturnas
cCs.|j||j|j|jddS(NR (RRRlR(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitYieldfs
cCs2|j|jd}|jr<|j|j|dB}n|jrb|j|j|dB}n|r|dkr|jdq|dkr|jddq|jddn|jdkr|jd|nU|jd	kr|jd
|n2|jdkr|jd|nd
G|jGHdS(NiiiRitDUP_TOPXtOP_APPLYsSLICE+%dRXsSTORE_SLICE+%dRYsDELETE_SLICE+%dsweird slice(RRR{R|RR7(R;R_taug_flagR}((s./usr/local/lib/python2.7/compiler/pycodegen.pyRzms,	
	
cCs|j|jx|jD]}|j|qWt|jdkrb|jdt|jn|r{|jddn|jdkr|jdn>|jdkr|jdn|jd	kr|jd
ndS(NiRRiRt
BINARY_SUBSCRRXRRYt
DELETE_SUBSCR(RRtsubsRRR7(R;R_Rtsub((s./usr/local/lib/python2.7/compiler/pycodegen.pyRscCs1|j|j|j|j|j|dS(N(RtlefttrightR(R;R_R((s./usr/local/lib/python2.7/compiler/pycodegen.pytbinaryOpscCs|j|dS(Nt
BINARY_ADD(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitAddscCs|j|dS(NtBINARY_SUBTRACT(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitSubscCs|j|dS(NtBINARY_MULTIPLY(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitMulscCs|j||jS(N(RR~(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitDivscCs|j|dS(NtBINARY_FLOOR_DIVIDE(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitFloorDivscCs|j|dS(Nt
BINARY_MODULO(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitModscCs|j|dS(NtBINARY_POWER(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitPowerscCs|j|dS(Nt
BINARY_LSHIFT(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitLeftShiftscCs|j|dS(Nt
BINARY_RSHIFT(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitRightShiftscCs!|j|j|j|dS(N(RRR(R;R_R((s./usr/local/lib/python2.7/compiler/pycodegen.pytunaryOpscCs|j|dS(NtUNARY_INVERT(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitInvertscCs|j|dS(NtUNARY_NEGATIVE(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitUnarySubscCs|j|dS(NtUNARY_POSITIVE(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitUnaryAddscCs|j|dS(NR(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitUnaryInvertscCs|j|dS(Nt	UNARY_NOT(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitNotscCs|j|dS(Nt
UNARY_CONVERT(R(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitBackquotescCsD|j|dx,|dD] }|j||j|qWdS(Nii(RR(R;RRR_((s./usr/local/lib/python2.7/compiler/pycodegen.pytbitOps
cCs|j|jdS(Nt
BINARY_AND(RR(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitBitandscCs|j|jdS(Nt	BINARY_OR(RR(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitBitorscCs|j|jdS(Nt
BINARY_XOR(RR(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitBitxorscCs|jdtdS(NR(RtEllipsis(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitEllipsisscCsK|j|x|jD]}|j|qW|jdt|jdS(NR(RRRRR(R;R_R]((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitTuples
cCsK|j|x|jD]}|j|qW|jdt|jdS(NR(RRRRR(R;R_R]((s./usr/local/lib/python2.7/compiler/pycodegen.pyt	visitLists
cCsK|j|x|jD]}|j|qW|jdt|jdS(NR
(RRRRR(R;R_R]((s./usr/local/lib/python2.7/compiler/pycodegen.pytvisitSets
cCs>x|jD]}|j|q
W|jdt|jdS(NtBUILD_SLICE(RRRR(R;R_R((s./usr/local/lib/python2.7/compiler/pycodegen.pyt
visitSliceobjscCs||j||jddxX|jD]M\}}|jd|j||j||jd|jdq'WdS(NRiRRR(RRtitemsR(R;R_tktv((s./usr/local/lib/python2.7/compiler/pycodegen.pyR`s




N(uRBRCRiRR/RuRR<RvRxR}RARRRRRRRRRRRRTRRRRRRbRcRRgRRRRRRRRRRRRRRRRRR!R#R$R%R+R2R5R:R=R>R?R@RaRARBReRfRHRTRWRhR]R`RFRbRdRjRhRwRxR~RRRRRRRRzRRRRRRRRRRRRRRRRRRRRRRRRRRRR`(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRns															
																			
									/		$														
				
																																				tNestedScopeMixincBseZdZdZRS(s>Defines initClass() for nested scoping (Python 2.2-compatible)cCs(t|j_t|j_t|j_dS(N(RTRwRtFunctionCodeGeneratorRtClassCodeGeneratorR(R;((s./usr/local/lib/python2.7/compiler/pycodegen.pyRv
s(RBRCRiRv(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRsRFcBs)eZejZdZdZdZRS(cCsEtjd|j|_tj||_|jt||dS(Ns<module>(	RtPyFlowGraphR&RRtfind_futuresRt _ModuleCodeGenerator__super_initR(R;R?((s./usr/local/lib/python2.7/compiler/pycodegen.pyR<s
cCs|S(N((R;((s./usr/local/lib/python2.7/compiler/pycodegen.pyRsN(RBRCRnR<RR/RR(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRFs		RDcBs/eZejZdZdZdZdZRS(cCs3tjd|j|_|jt||dS(Ns<expression>(RRR&Rt$_ExpressionCodeGenerator__super_initR(R;R?((s./usr/local/lib/python2.7/compiler/pycodegen.pyR<#s
cCs|S(N((R;((s./usr/local/lib/python2.7/compiler/pycodegen.pyR(sN((	RBRCRnR<RR/RRR(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRDs
		REcBs8eZejZdZdZdZdZdZ	RS(cCsMtjd|j|_|j|j|t|||jddS(Ns
<interactive>R(RRR&Rt%_InteractiveCodeGenerator__super_initRRR(R;R?((s./usr/local/lib/python2.7/compiler/pycodegen.pyR<2s



cCs|S(N((R;((s./usr/local/lib/python2.7/compiler/pycodegen.pyR9scCs!|j|j|jddS(Nt
PRINT_EXPR(RRR(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyR><sN((
RBRCRnR<RR/RRRR>(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRE+s			tAbstractFunctionCodecBsGeZdZdZdZdZdZdZdZeZ	RS(iicCsL||_||_|r>t}d|j}|jd|_n	|j}t|j\}}	tj||j	|dd|_
||_|j|r|j
r|j|j
nt|j|j|dd}
|jj|
j|jr|j
jtn|jr"|j
jtn|j||	rH|j|jndS(Ns<lambda.%d>iRRi(RtmoduleRtlambdaCountRYtgenerateArgListtargnamesRRR&RRt
super_initRRRR4RRzRR^tvarargsRRtkwargsRRtgenerateArgUnpack(R;tfuncRRRR*tklassRYRthasTupleArgR((s./usr/local/lib/python2.7/compiler/pycodegen.pyR<Fs.		
		
!		
cCs|jS(N(R(R;((s./usr/local/lib/python2.7/compiler/pycodegen.pyRcscCs:|jj|js)|jddn|jddS(NRR(RtstartExitBlockRRR/(R;((s./usr/local/lib/python2.7/compiler/pycodegen.pyRfs
	cCsbx[tt|D]G}||}t|tr|jdd|d|j|qqWdS(Nt	LOAD_FASTs.%di(RRRjRNRtunpackSequence(R;RRR((s./usr/local/lib/python2.7/compiler/pycodegen.pyRls

cCstdkr%|jdt|n|jdt|x=|D]5}t|trg|j|qB|jd|qBWdS(NiR^RaR(RFRRRjRNRR(R;ttupR]((s./usr/local/lib/python2.7/compiler/pycodegen.pyRss
(
RBRCRRR<RRRRtunpackTuple(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRBs					RcBs)eZejZdZejZdZRS(cCs||_|||_|j||||||jj|jj|jj|jj|jjdk	r|jj
tndS(N(RRt"_FunctionCodeGenerator__super_initRtsetFreeVarsRtsetCellVarst
get_cell_varst	generatorR/RR(R;RRRRR*((s./usr/local/lib/python2.7/compiler/pycodegen.pyR<s	
N(	RBRCRnR<RR/RRR(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRs		RcBs)eZejZdZejZdZRS(cCsu||_|||_|j||d|||jj|jj|jj|jj|jjt	dS(Ni(
RRt!_GenExprCodeGenerator__super_initRRRRRRR(R;tgexpRRR*((s./usr/local/lib/python2.7/compiler/pycodegen.pyR<s	
N(	RBRCRnR<RR/RRR(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRs		tAbstractClassCodecBs#eZdZdZdZRS(cCs|j|_||_tj|j|jdddd|_|jt|j	|j
dd}|jj|j
|jjt|jr|j|jndS(NRiRiR(RYRRRRR&RRRR4RRzRR^RRRR(R;RRRR((s./usr/local/lib/python2.7/compiler/pycodegen.pyR<s	
	cCs|jS(N(R(R;((s./usr/local/lib/python2.7/compiler/pycodegen.pyRscCs+|jj|jd|jddS(NtLOAD_LOCALSR(RRR(R;((s./usr/local/lib/python2.7/compiler/pycodegen.pyRs

(RBRCR<RR(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRs		RcBs)eZejZdZejZdZRS(cCs||_|||_|j||||jj|jj|jj|jj|j||j	dd|j
d|jr|j	d|j|j
dndS(NtLOAD_GLOBALRBRCRRi(RRt_ClassCodeGenerator__super_initRRRRRRRRR(R;RRR((s./usr/local/lib/python2.7/compiler/pycodegen.pyR<s	


	N(	RBRCRnR<RR/RRR(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRs		cCsg}g}d}xtt|D]}||}t|trT|j|q%t|tr|jt|d||jtj	||d}q%t
d|q%W|||fS(s&Generate an arg list marking TupleArgsiiisunexpect argument type:(RRRjtstrtappendRNRtextendRtflattenR3(targlistRtextratcountRR]((s./usr/local/lib/python2.7/compiler/pycodegen.pyRs

cCs#t}t||dd|jS(s5Find the op (DELETE, LOAD, STORE) in an AssTuple treeRi(tOpFinderRR(R_R((s./usr/local/lib/python2.7/compiler/pycodegen.pyR_s	RcBs&eZdZdZeZeZRS(cCs
d|_dS(N(R/R(R;((s./usr/local/lib/python2.7/compiler/pycodegen.pyR<scCs@|jdkr|j|_n|j|jkr<tdndS(Nsmixed ops in stmt(RR/R7R3(R;R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyRhs(RBRCR<RhR]R(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRs		t	DelegatorcBs eZdZdZdZRS(sBase class to support delegation for augmented assignment nodes

    To generator code for augmented assignments, we use the following
    wrapper classes.  In visitAugAssign, the left-hand expression node
    is visited twice.  The first time the visit uses the normal method
    for that node .  The second time the visit uses a different method
    that generates the appropriate code to perform the assignment.
    These delegator classes wrap the original AST nodes in order to
    support the variant visit methods.
    cCs
||_dS(N(tobj(R;R((s./usr/local/lib/python2.7/compiler/pycodegen.pyR<scCst|j|S(N(RR(R;tattr((s./usr/local/lib/python2.7/compiler/pycodegen.pyt__getattr__s(RBRCRiR<R(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRs
	t
AugGetattrcBseZRS((RBRC(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRstAugNamecBseZRS((RBRC(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRstAugSlicecBseZRS((RBRC(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRstAugSubscriptcBseZRS((RBRC(((s./usr/local/lib/python2.7/compiler/pycodegen.pyRscCst|j|S(N(twrapperRw(R_((s./usr/local/lib/python2.7/compiler/pycodegen.pyRgst__main__(MRRRKRJRNtsyst	cStringIORtcompilerRRRRRRRRtcompiler.constsR	R
RRR
RRRRRRRRRtcompiler.pyassemRtversion_infoRFtAttributeErrorRRRRRR+R/R#R:R2R1R"RTRmRnRRFRDRERRRRRRR_RRRRRRtGetattrtNametSlicet	SubscriptRRgRBtargvtfile(((s./usr/local/lib/python2.7/compiler/pycodegen.pyt<module>s""(@




		+	U>				



	

Zerion Mini Shell 1.0