/usr/lib/python2.6/compiler
NameSizeModeActions
ast.py358320644editdlrm
ast.pyc685170644editdlrm
ast.pyo685170644editdlrm
consts.py4360644editdlrm
consts.pyc6900644editdlrm
consts.pyo6900644editdlrm
future.py18930644editdlrm
future.pyc29580644editdlrm
future.pyo29580644editdlrm
misc.py17940644editdlrm
misc.pyc37170644editdlrm
misc.pyo37170644editdlrm
pyassem.py261530644editdlrm
pyassem.pyc277820644editdlrm
pyassem.pyo273230644editdlrm
pycodegen.py471010644editdlrm
pycodegen.pyc554240644editdlrm
pycodegen.pyo549490644editdlrm
symbols.py144270644editdlrm
symbols.pyc177210644editdlrm
symbols.pyo176850644editdlrm
syntax.py14440644editdlrm
syntax.pyc18720644editdlrm
syntax.pyo18720644editdlrm
transformer.py516180644editdlrm
transformer.pyc470850644editdlrm
transformer.pyo453250644editdlrm
visitor.py38960644editdlrm
visitor.pyc41950644editdlrm
visitor.pyo41950644editdlrm
__init__.py9990644editdlrm
__init__.pyc12770644editdlrm
__init__.pyo12770644editdlrm
Edit: /usr/lib/python2.6/compiler/pyassem.pyc (27782B)
gc@sdZddkZddkZddkZddklZddklZlZl Z l Z dfdYZ dZ dfd YZ d Zd Zd Zd Zde fdYZdZdfdYZdZdZdfdYZdfdYZeiZdS(s/A flow graph representation for Python bytecodeiN(tmisc(t CO_OPTIMIZEDt CO_NEWLOCALSt CO_VARARGStCO_VARKEYWORDSt FlowGraphcBseZdZdZddZdZdZdZdZ dZ dZ d Z d Z d Zd Zd ZdZdZRS(cCs[t|_|_td|_ti|_|ii|i|ii|idS(Ntexit(tBlocktcurrenttentryRRtSettblockstadd(tself((s&/usr/lib/python2.6/compiler/pyassem.pyt__init__ s cCsg|ioP|io7dGt|iGHdG|iiGHdG|iiGHnt|GHn||_dS(Ntends nexts (t_debugRtreprtnextt get_children(R tblock((s&/usr/lib/python2.6/compiler/pyassem.pyt startBlocks  cCs>|djo|i}n|ii||i|dS(N(tNonetnewBlockRtaddNextR(R R((s&/usr/lib/python2.6/compiler/pyassem.pyt nextBlocks  cCst}|ii||S(N(RR R (R tb((s&/usr/lib/python2.6/compiler/pyassem.pyR5s cCs|i|idS(N(RR(R ((s&/usr/lib/python2.6/compiler/pyassem.pytstartExitBlock:sicCs d|_dS(Ni(R(R ((s&/usr/lib/python2.6/compiler/pyassem.pyt _enable_debug?scCs d|_dS(Ni(R(R ((s&/usr/lib/python2.6/compiler/pyassem.pyt_disable_debugBscGs|io dG|GHn|ddjo|ii|int|djo,t|dto|ii|dn|ii|dS(Ns it RETURN_VALUEt YIELD_VALUEii(RR(RRt addOutEdgeRtlent isinstanceRtemit(R tinst((s&/usr/lib/python2.6/compiler/pyassem.pyR#Es  'cCsxL|iiD];}||ijoqn|ip|i|iqqWt|ih}|i|i||i|i|jo|i |in|S(slReturn the blocks in reverse postorder i.e. each node appears before all of its successors ( R telementsRRRt dfs_postorderR treverset fixupOrdertappend(R Rtorder((s&/usr/lib/python2.6/compiler/pyassem.pytgetBlocksInOrderNs  cCs$|i|||i||dS(s"Fixup bad order introduced by DFS.N(tfixupOrderHonorNexttfixupOrderForward(R R t default_next((s&/usr/lib/python2.6/compiler/pyassem.pyR(csc Csh}x(tt|D]}|||| 3   c Csh}g}g}x`|D]X}t|||<|i||io+|id|jo|i|g}qqW|i|x3g}xtt|D]}||} x| D]}x|iD]} || |josd} xA|iD]6} | ddjo| d| jo d} q%qqW| pqn|i|| |fqqWqWqW|pPn|d\} }|| jpt||} |i| |i| | q|2x,|D]$} x| D]}|i|qWqWdS(s(Make sure all JUMP_FORWARDs jump forwardit JUMP_FORWARDiN( R!R)RR/RtinstsR0tremovetinsert(R R R.R2tchainsR5Rt constraintsR3R8tct forward_pR$t goes_beforeta_chain((s&/usr/lib/python2.6/compiler/pyassem.pyR-sV      '  cCs |iiS(N(R R%(R ((s&/usr/lib/python2.6/compiler/pyassem.pyt getBlocksscCs|iS(s/Return nodes appropriate for use with dominator(R (R ((s&/usr/lib/python2.6/compiler/pyassem.pytgetRootscCs4g}x'|iD]}|i|iqW|S(N(RDtextendtgetContainedGraphs(R R8R((s&/usr/lib/python2.6/compiler/pyassem.pyRGs  N(t__name__t __module__RRRRRRRRRR#R+R(R,R-RDRERG(((s&/usr/lib/python2.6/compiler/pyassem.pyR s         ) .  cCs_g}|||s (RNRP(R ((s&/usr/lib/python2.6/compiler/pyassem.pyt__repr__s cCs2tt|i}d|i|idi|fS(Nss (tmaptstrR;RNRPtjoin(R R;((s&/usr/lib/python2.6/compiler/pyassem.pyt__str__scCsG|d}|d djo|ii|dn|ii|dS(NiitJUMPi(RMR R;R)(R R$top((s&/usr/lib/python2.6/compiler/pyassem.pyR#s cCs|iS(N(R;(R ((s&/usr/lib/python2.6/compiler/pyassem.pytgetInstructionsscCs|ii|dS(N(RLR (R R((s&/usr/lib/python2.6/compiler/pyassem.pyt addInEdgescCs|ii|dS(N(RMR (R R((s&/usr/lib/python2.6/compiler/pyassem.pyR scCs@|ii|t|idjpttt|idS(Ni(RR)R!R0RRRS(R R((s&/usr/lib/python2.6/compiler/pyassem.pyRsRt RAISE_VARARGSRt JUMP_ABSOLUTER:t CONTINUE_LOOPcCsUy|id\}}Wnttfj odSX||ijo g|_ndS(sLRemove bogus edge for unconditional transfers Each block has a next edge that accounts for implicit control transfers, e.g. from a JUMP_IF_FALSE to the block that will be executed if the test is true. These edges must remain for the current assembler code to work. If they are removed, the dfs_postorder gets things in weird orders. However, they shouldn't be there for other purposes, e.g. conversion to SSA form. This method will remove the next edge when it follows an unconditional control transfer. iN(R;t IndexErrort ValueErrort_uncond_transferR(R RWtarg((s&/usr/lib/python2.6/compiler/pyassem.pyt pruneNexts cCsP|io2|id|ijo|ii|idn|ii|iS(Ni(RRMR<R%(R ((s&/usr/lib/python2.6/compiler/pyassem.pyRs!cCsfg}xY|iD]N}t|djoqn|d}t|do|i|iqqW|S(sReturn all graphs contained within this block. For example, a MAKE_FUNCTION block will contain a reference to the graph for the function body. itgraph(R;R!thasattrR)Rb(R t containedR$RW((s&/usr/lib/python2.6/compiler/pyassem.pyRG"s  (s RETURN_VALUERZs YIELD_VALUER[s JUMP_FORWARDR\(RHRIRORRQRUR#RXRYR RR_RaRRG(((s&/usr/lib/python2.6/compiler/pyassem.pyRs         tRAWtFLATtCONVtDONEt PyFlowGraphc BsIeZeiZddddZdZdZdZdZ dZ dZ ddZ d Z d ZeiZx%eiD]ZeieieqWeiZx%eiD]ZeieieqWd Zd Zd ZhZdZdZeZeZdZdZ e Z!e Z"e Z#e Z$e Z%e Z&e Z'e Z(e Z)e Z*dZ+e+Z,e+Z-dZ.e/ei0Z1dZ2xFe3i4D]5\Z5Z6e5d djoe5dZe6ee|iD]3}t|to|i}n|i|qWt|S(sReturn a tuple for the const slot of the code object Must convert references to code (MAKE_FUNCTION) to code objects recursively. (RsR"RiRR)R(R R8R7((s&/usr/lib/python2.6/compiler/pyassem.pyR]s (N(>RHRIRRRjRRRRRRRRRRRR RtdisR3R RRRRRRRRt_convert_STORE_FASTt_convert_DELETE_FASTRRt_convert_STORE_NAMEt_convert_DELETE_NAMEt_convert_IMPORT_NAMEt_convert_IMPORT_FROMt_convert_STORE_ATTRt_convert_LOAD_ATTRt_convert_DELETE_ATTRt_convert_LOAD_GLOBALt_convert_STORE_GLOBALt_convert_DELETE_GLOBALRt_convert_LOAD_DEREFt_convert_STORE_DEREFRRxtcmp_opRRtlocalstitemsRktobjRRR/R!tnumRR(((s&/usr/lib/python2.6/compiler/pyassem.pyRi9sv         !                  cCs|d djodSdS(NiRVi((R((s&/usr/lib/python2.6/compiler/pyassem.pytisJumpjsRzcBs)eZdZdZdZdZRS(s:Helper for marking func defs with nested tuples in arglistcCs||_||_dS(N(tcountRt(R RRt((s&/usr/lib/python2.6/compiler/pyassem.pyRps cCsd|i|ifS(NsTupleArg(%s, %s)(RRt(R ((s&/usr/lib/python2.6/compiler/pyassem.pyRQsscCs d|iS(Ns.%d(R(R ((s&/usr/lib/python2.6/compiler/pyassem.pyR{us(RHRIt__doc__RRQR{(((s&/usr/lib/python2.6/compiler/pyassem.pyRzns  cCsbt|}|oKxH|D]<}t|to&tti|i}||}qqWn|S(N(R!R"RzRtflattenRt(RnRpR`tnumNames((s&/usr/lib/python2.6/compiler/pyassem.pyRoxs cCs$t|tptt|dS(s/Convert an int argument into high and low bytesi(R"tintR0tdivmod(tval((s&/usr/lib/python2.6/compiler/pyassem.pyRsRcBs;eZdZdZdZdZdZdZRS(s(lnotab This class builds the lnotab, which is documented in compile.c. Here's a brief recap: For each SET_LINENO instruction after the first one, two bytes are added to lnotab. (In some cases, multiple two-byte entries are added.) The first byte is the distance in bytes between the instruction for the last SET_LINENO and the current SET_LINENO. The second byte is offset in line numbers. If either offset is greater than 255, multiple two-byte entries are added -- see compile.c for the delicate details. cCs:g|_d|_d|_d|_d|_g|_dS(Ni(tcodet codeOffsetRtlastlinetlastoffR(R ((s&/usr/lib/python2.6/compiler/pyassem.pyRs      cGsAx$|D]}|iit|qW|it||_dS(N(RR)tchrRR!(R RnR`((s&/usr/lib/python2.6/compiler/pyassem.pyRscCs|idjo||_||_n|i|i}||i}|djo|ii}x0|djo"|d|d|d8}q_Wx6|djo(|||d|d8}d}qW|djp |djo||||n||_|i|_ndS(Nii(RRRRRR)(R tlinenotaddrtlinetpush((s&/usr/lib/python2.6/compiler/pyassem.pyRs.            cCsdi|iS(NRK(RTR(R ((s&/usr/lib/python2.6/compiler/pyassem.pyRscCsditt|iS(NRK(RTRRRR(R ((s&/usr/lib/python2.6/compiler/pyassem.pyRs(RHRIRRRRRR(((s&/usr/lib/python2.6/compiler/pyassem.pyRs     tStackDepthTrackercBseZddZh$dd6dd6dd6dd6dd 6dd 6dd 6dd 6dd 6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd6dd 6dd!6dd"6dd#6dd$6dd%6d&d'6d&d(6dd)6dd*6Zd8d9gZd-Zd.Zd/Zd0Zd1Z d2Z d3Z d4Z d5Z d6Zd7ZRS(:ic Cs#d}d}x|D]}|d}|o|Gn|ii|d}|dj o||}nxC|iD]8\}} |t| |jo| }||}PqlqlW|djo;t||d} | dj o|| |d}qn||jo |}n|o |G|GHqqW|S(Nii(teffectRRtpatternsR!tgetattr( R R;tdebugRtmaxDepthR3Rtdeltatpatt pat_deltatmeth((s&/usr/lib/python2.6/compiler/pyassem.pyRs2         itPOP_TOPitDUP_TOPit LIST_APPENDsSLICE+1sSLICE+2sSLICE+3s STORE_SLICE+0s STORE_SLICE+1s STORE_SLICE+2is STORE_SLICE+3sDELETE_SLICE+0sDELETE_SLICE+1sDELETE_SLICE+2sDELETE_SLICE+3t STORE_SUBSCRt DELETE_SUBSCRt PRINT_ITEMRRt EXEC_STMTt BUILD_CLASSt STORE_NAMEt STORE_ATTRt DELETE_ATTRt STORE_GLOBALt BUILD_MAPt COMPARE_OPt STORE_FASTt IMPORT_STARt IMPORT_NAMEt IMPORT_FROMt LOAD_ATTRit SETUP_EXCEPTt SETUP_FINALLYtFOR_ITERt WITH_CLEANUPtBINARY_tLOAD_cCs|dS(Ni((R R((s&/usr/lib/python2.6/compiler/pyassem.pytUNPACK_SEQUENCEscCs | dS(Ni((R R((s&/usr/lib/python2.6/compiler/pyassem.pyt BUILD_TUPLEscCs | dS(Ni((R R((s&/usr/lib/python2.6/compiler/pyassem.pyt BUILD_LISTscCs"t|d\}}||d S(Nii(R(R targcRR((s&/usr/lib/python2.6/compiler/pyassem.pyt CALL_FUNCTIONscCs|i|dS(Ni(R(R R((s&/usr/lib/python2.6/compiler/pyassem.pytCALL_FUNCTION_VARscCs|i|dS(Ni(R(R R((s&/usr/lib/python2.6/compiler/pyassem.pytCALL_FUNCTION_KW!scCs|i|dS(Ni(R(R R((s&/usr/lib/python2.6/compiler/pyassem.pytCALL_FUNCTION_VAR_KW#scCs| S(N((R R((s&/usr/lib/python2.6/compiler/pyassem.pyt MAKE_FUNCTION%scCs| S(N((R R((s&/usr/lib/python2.6/compiler/pyassem.pyt MAKE_CLOSURE'scCs(|djodS|djodSdS(Niiii((R R((s&/usr/lib/python2.6/compiler/pyassem.pyt BUILD_SLICE*s  cCs|S(N((R R((s&/usr/lib/python2.6/compiler/pyassem.pytDUP_TOPX/s(R i(R i(RHRIRRRR R R RRRRRRRR(((s&/usr/lib/python2.6/compiler/pyassem.pyRsf             (RRRRtcompilerRtcompiler.constsRRRRRR&RReRfRgRhRiRRzRoRRRR(((s&/usr/lib/python2.6/compiler/pyassem.pyts*   " Y2  Bj