config root man

Current Path : /compat/linux/proc/self/root/usr/local/lib/python2.5/compiler/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/self/root/usr/local/lib/python2.5/compiler/pyassem.pyc

hRc@sdZddkZddkZddkZddklZddklZlZl	Z	l
Z
dfdYZdZdfd	YZ
d
ZdZdZd
ZdefdYZdZdfdYZdZdZdfdYZdfdYZeiZdS(s/A flow graph representation for Python bytecodeiN(tmisc(tCO_OPTIMIZEDtCO_NEWLOCALSt
CO_VARARGStCO_VARKEYWORDSt	FlowGraphcBseZdZdZddZdZdZdZdZ	dZ
dZd	Zd
Z
dZdZd
ZdZdZRS(cCs[t|_|_td|_ti|_|ii|i|ii|idS(Ntexit(tBlocktcurrenttentryRRtSettblockstadd(tself((s,/usr/local/lib/python2.5/compiler/pyassem.pyt__init__s
cCsg|ioP|io7dGt|iGHdG|iiGHdG|iiGHnt|GHn||_dS(Ntends    nexts   (t_debugRtreprtnexttget_children(R
tblock((s,/usr/local/lib/python2.5/compiler/pyassem.pyt
startBlocks

cCs>|djo|i}n|ii||i|dS(N(tNonetnewBlockRtaddNextR(R
R((s,/usr/local/lib/python2.5/compiler/pyassem.pyt	nextBlocks
	cCst}|ii||S(N(RRR(R
tb((s,/usr/local/lib/python2.5/compiler/pyassem.pyR5s	cCs|i|idS(N(RR(R
((s,/usr/local/lib/python2.5/compiler/pyassem.pytstartExitBlock:sicCs
d|_dS(Ni(R(R
((s,/usr/local/lib/python2.5/compiler/pyassem.pyt
_enable_debug?scCs
d|_dS(Ni(R(R
((s,/usr/local/lib/python2.5/compiler/pyassem.pyt_disable_debugBscGs|io
dG|GHn|ddjo|ii|int|djo,t|dto|ii|dn|ii|dS(Ns	itRETURN_VALUEtYIELD_VALUEii(RR(RRt
addOutEdgeRtlent
isinstanceRtemit(R
tinst((s,/usr/local/lib/python2.5/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
        (
RtelementsRRRt
dfs_postorderR	treverset
fixupOrdertappend(R
Rtorder((s,/usr/local/lib/python2.5/compiler/pyassem.pytgetBlocksInOrderNs

cCs$|i|||i||dS(s"Fixup bad order introduced by DFS.N(tfixupOrderHonorNexttfixupOrderForward(R
Rtdefault_next((s,/usr/local/lib/python2.5/compiler/pyassem.pyR(cscCsh}x(tt|D]}||||<qWxtdt|dD]p}||}||d}|ip(|id|jp|id|joqKn|}g}|}	xD|	io9|	id|jo%|i|	id|	id}	qWg}
x=|D]5}|||jpt|
i|||fq	W|
i|
ix|
D]\}}|||=q]W|g||||d+x(tt|D]}||||<qWqKWdS(sFix one problem with DFS.

        The DFS uses child block, but doesn't know about the special
        "next" block.  As a result, the DFS can order blocks so that a
        block isn't next to the right block for implicit control
        transfers.
        iiN(trangeR!RR)tAssertionErrortsortR'(R
RR.tindextiRtntcurtchaintelttltj((s,/usr/local/lib/python2.5/compiler/pyassem.pyR,ls>
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
RR.R2tchainsR5RtconstraintsR3R8tct	forward_pR$tgoes_beforeta_chain((s,/usr/local/lib/python2.5/compiler/pyassem.pyR-sV





'

cCs
|iiS(N(RR%(R
((s,/usr/local/lib/python2.5/compiler/pyassem.pyt	getBlocksscCs|iS(s/Return nodes appropriate for use with dominator(R	(R
((s,/usr/local/lib/python2.5/compiler/pyassem.pytgetRootscCs4g}x'|iD]}|i|iqW|S(N(RDtextendtgetContainedGraphs(R
R8R((s,/usr/local/lib/python2.5/compiler/pyassem.pyRGs

N(t__name__t
__module__RRRRRRRRRR#R+R(R,R-RDRERG(((s,/usr/local/lib/python2.5/compiler/pyassem.pyRs 													)	.		cCsbg}|||<x>|iD]0}|i|oqn|t||}qW|i||S(s;Depth-first search of tree rooted at b, return in postorder(Rthas_keyR&R)(RtseenR*R@((s,/usr/local/lib/python2.5/compiler/pyassem.pyR&s


RcBszeZdZddZdZdZdZdZdZdZ	d	Z
dZdZdZ
dZRS(itcCsYg|_ti|_ti|_||_ti|_g|_	tidt_dS(Ni(
R;RR
tinEdgestoutEdgestlabelRt_counttbidR(R
RO((s,/usr/local/lib/python2.5/compiler/pyassem.pyRs			cCs1|iod|i|ifSnd|iSdS(Ns<block %s id=%d>s
<block id=%d>(RORQ(R
((s,/usr/local/lib/python2.5/compiler/pyassem.pyt__repr__s
cCs2tt|i}d|i|idi|fS(Ns<block %s %d:
%s>s
(tmaptstrR;RORQtjoin(R
R;((s,/usr/local/lib/python2.5/compiler/pyassem.pyt__str__scCsG|d}|d djo|ii|dn|ii|dS(NiitJUMPi(RNRR;R)(R
R$top((s,/usr/local/lib/python2.5/compiler/pyassem.pyR#s
cCs|iS(N(R;(R
((s,/usr/local/lib/python2.5/compiler/pyassem.pytgetInstructionsscCs|ii|dS(N(RMR(R
R((s,/usr/local/lib/python2.5/compiler/pyassem.pyt	addInEdgescCs|ii|dS(N(RNR(R
R((s,/usr/local/lib/python2.5/compiler/pyassem.pyR scCs@|ii|t|idjpttt|idS(Ni(RR)R!R0RSRT(R
R((s,/usr/local/lib/python2.5/compiler/pyassem.pyRsRt
RAISE_VARARGSRt
JUMP_ABSOLUTER:t
CONTINUE_LOOPcCsXy|id\}}Wnttfj
odSnX||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
RXtarg((s,/usr/local/lib/python2.5/compiler/pyassem.pyt	pruneNexts	cCsP|io2|id|ijo|ii|idn|ii|iS(Ni(RRNR<R%(R
((s,/usr/local/lib/python2.5/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)Rc(R
t	containedR$RX((s,/usr/local/lib/python2.5/compiler/pyassem.pyRG"s

(sRETURN_VALUER[sYIELD_VALUER\sJUMP_FORWARDR](RHRIRPRRRRVR#RYRZR RR`RbRRG(((s,/usr/local/lib/python2.5/compiler/pyassem.pyRs										tRAWtFLATtCONVtDONEtPyFlowGraphcBsIeZeiZddddZdZdZdZdZ	dZ
dZddZd	Z
d
ZeiZx%eiD]ZeieieqWeiZx%eiD]ZeieieqWdZd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<qqW[5[6[dZ7hZ8x.e9e:eiD]Z;e;e8eie;<qW[;dZ<dZ=RS(icCs|i||_||_d|_||_t||_||_|ot	t
B|_n
d|_g|_g|_
g|_g|_g|_t|pg|_xQtt|iD]:}|i|}t|to|i|i|<qqWt|_dS(Ni(t
super_inittnametfilenameRt	docstringtargstgetArgCounttargcounttklassRRtflagstconststnamestfreevarstcellvarstclosuretlisttvarnamesR/R!R"tTupleArgtgetNameRftstage(R
RlRmRot	optimizedRrR3tvar((s,/usr/local/lib/python2.5/compiler/pyassem.pyR<s,
											
cCs
||_dS(N(Rn(R
tdoc((s,/usr/local/lib/python2.5/compiler/pyassem.pytsetDocstringZscCs5|i|B|_|tjo|id|_ndS(Ni(RsRRq(R
tflag((s,/usr/local/lib/python2.5/compiler/pyassem.pytsetFlag]s
cCs|i|@odSndS(Ni(Rs(R
R((s,/usr/local/lib/python2.5/compiler/pyassem.pyt	checkFlagbscCst||_dS(N(RyRv(R
Ru((s,/usr/local/lib/python2.5/compiler/pyassem.pytsetFreeVarsfscCs
||_dS(N(Rw(R
Ru((s,/usr/local/lib/python2.5/compiler/pyassem.pytsetCellVarsiscCs|itjpt|i|i|itjpt|i|itjpt|i|it	jpt|i
S(sGet a Python code object(R}RfR0tcomputeStackDepthtflattenGraphRgtconvertArgsRhtmakeByteCodeRit
newCodeObject(R
((s,/usr/local/lib/python2.5/compiler/pyassem.pytgetCodels



cCs|oti}|t_nd}x|iD]w}|d}|djoHnt|djodGd|G|GH|d}q-dGd|G|G|dGH|d}q-W|o
|t_ndS(Nit
SET_LINENOis	s%3di(tsyststdoutR;R!(R
tiotsavetpctttopname((s,/usr/local/lib/python2.5/compiler/pyassem.pytdumpxs 	



csphd}x*iD]}t|i|<qWhfdid_dS(sCompute the max stack depth.

        Approach is to compute the stack effect of each basic block.
        Then find the path through the code with the largest total
        effect.
        csi|o|Snd|<||}|i}|o2tg}|D]}|||qQ~Sn)|idjpi|Sn|SdS(NiR(RJRtmaxROR(Rtdtchildrent_[1]R@(R
t	max_depthtdepthRK(s,/usr/local/lib/python2.5/compiler/pyassem.pyRs
2iN(RRDt	findDepthRYR	t	stacksize(R
RR((R
RRKRs,/usr/local/lib/python2.5/compiler/pyassem.pyRs
cCs|itjptg|_}d}h}h}x|iD]~}|||<xa|iD]S}|i|t|djo|d}q`|ddjo|d}q`q`W|||<qCWd}xtt|D]}||}t|djo|d}n |ddjo|d}n|d}|i	i
|o,|d}	||	|}
||
f||<q|ii
|o|||df||<qqWt|_dS(s-Arrange the blocks in order and resolve jumpsiiRiN(
R}RfR0R;R+RYR)R!R/thasjrelthas_eltthasjabsRg(R
R;RtbeginRRR$R3Rtopargtoffset((s,/usr/local/lib/python2.5/compiler/pyassem.pyRs@







 cCs|itjpt|iid|i|ixtt|i	D]r}|i	|}t|djoL|\}}|i
i|d}|o ||||f|i	|<qqMqMWt
|_dS(s0Convert arguments from symbolic to concrete formiiN(R}RgR0RtR=Rnt
sort_cellvarsR/R!R;t_converterstgetRRh(R
R3RRRtconv((s,/usr/local/lib/python2.5/compiler/pyassem.pyRs

(cCsh}x|iD]}d||<qWg}|iD]!}|i|o||q2q2~|_x|iD]
}||=qiW|i|i|_|i|i|_dS(sHSort cellvars in the order of varnames and prune from freevars.
        iN(RwRzRJtkeysRvRx(R
tcellsRlR((s,/usr/local/lib/python2.5/compiler/pyassem.pyRs
'
cCsvt|}xJtt|D]6}|t||jo|||jo|SqqWt|}|i||S(sReturn index of name in list, appending if necessary

        This routine uses a list instead of a dictionary, because a
        dictionary can't store two different keys if the keys have the
        same value but different types, e.g. 2 and 2L.  The compiler
        must treat these two separately, so it does an explicit type
        comparison before comparing the values.
        (ttypeR/R!R)(R
RlRyRR3R((s,/usr/local/lib/python2.5/compiler/pyassem.pyt_lookupNames	(
cCs3t|do|i}n|i||iS(NR(RdRRRt(R
Ra((s,/usr/local/lib/python2.5/compiler/pyassem.pyt_convert_LOAD_CONSTscCs&|i||i|i||iS(N(RRuRz(R
Ra((s,/usr/local/lib/python2.5/compiler/pyassem.pyt_convert_LOAD_FASTscCs:|idjo|i||in|i||iS(N(RrRRRzRu(R
Ra((s,/usr/local/lib/python2.5/compiler/pyassem.pyt_convert_LOAD_NAMEscCs:|idjo|i||in|i||iS(N(RrRRRzRu(R
Ra((s,/usr/local/lib/python2.5/compiler/pyassem.pyt
_convert_NAME
scCs9|i||i|i||i|i||iS(N(RRuRzRx(R
Ra((s,/usr/local/lib/python2.5/compiler/pyassem.pyt_convert_DEREFscCs&|i||i|i||iS(N(RRzRx(R
Ra((s,/usr/local/lib/python2.5/compiler/pyassem.pyt_convert_LOAD_CLOSURE#scCs|ii|S(N(t_cmpR2(R
Ra((s,/usr/local/lib/python2.5/compiler/pyassem.pyt_convert_COMPARE_OP(si	t	_convert_cCs|itjptt|_}x|iD]}|d}t|djo|i|i|q1|d}|djo|i	|q1nt
|\}}y|i|i|||Wq1tj
o'|G|GH|i|G|G|GHq1Xq1Wt|_dS(NiiR(
R}RhR0t
LineAddrTabletlnotabR;R!taddCodetopnumtnextLinettwobyteR_Ri(R
RRRRthitlo((s,/usr/local/lib/python2.5/compiler/pyassem.pyR3s&




	cCs|itjpt|it@djo
d}nt|i}|i}|it@o|d}nt	i
|||i|i|ii
|it|it|i|i|i|ii|iit|it|iS(Nii(R}RiR0RsRR!RzRqRtnewtcodeRRRt	getConststtupleRuRmRlt	firstlinetgetTableRvRw(R
tnlocalsRq((s,/usr/local/lib/python2.5/compiler/pyassem.pyRMs
	cCsQg}x>|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.
        (RtR"RjRR)R(R
R8R7((s,/usr/local/lib/python2.5/compiler/pyassem.pyR]s
(N(>RHRIRRRkRRRRRRRRRRRR
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_DEREFRRytcmp_opRRtlocalstitemsRltobjRRR/R!tnumRR(((s,/usr/local/lib/python2.5/compiler/pyassem.pyRj9sv									!

		
								
			cCs|d djodSndS(NiRWi((R((s,/usr/local/lib/python2.5/compiler/pyassem.pytisJumpjsR{cBs)eZdZdZdZdZRS(s:Helper for marking func defs with nested tuples in arglistcCs||_||_dS(N(tcountRu(R
RRu((s,/usr/local/lib/python2.5/compiler/pyassem.pyRps	cCsd|i|ifS(NsTupleArg(%s, %s)(RRu(R
((s,/usr/local/lib/python2.5/compiler/pyassem.pyRRsscCsd|iS(Ns.%d(R(R
((s,/usr/local/lib/python2.5/compiler/pyassem.pyR|us(RHRIt__doc__RRRR|(((s,/usr/local/lib/python2.5/compiler/pyassem.pyR{ns		cCsbt|}|oKxH|D]<}t|to&tti|i}||}qqWn|S(N(R!R"R{RtflattenRu(RoRqRatnumNames((s,/usr/local/lib/python2.5/compiler/pyassem.pyRpxscCs$t|tptt|dS(s/Convert an int argument into high and low bytesi(R"tintR0tdivmod(tval((s,/usr/local/lib/python2.5/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(Rt
codeOffsetRtlastlinetlastoffR(R
((s,/usr/local/lib/python2.5/compiler/pyassem.pyRs					cGsAx$|D]}|iit|qW|it||_dS(N(RR)tchrRR!(R
RoRa((s,/usr/local/lib/python2.5/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/local/lib/python2.5/compiler/pyassem.pyRs.	










	cCsdi|iS(NRL(RUR(R
((s,/usr/local/lib/python2.5/compiler/pyassem.pyRscCsditt|iS(NRL(RURSRR(R
((s,/usr/local/lib/python2.5/compiler/pyassem.pyRs(RHRIRRRRRR(((s,/usr/local/lib/python2.5/compiler/pyassem.pyRs
			 	tStackDepthTrackercBseZddZhdd<dd<dd<dd<dd	<dd
<dd<dd<dd
<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd <dd!<dd"<dd#<dd$<dd%<d&d'<d&d(<dd)<dd*<Zd8d9gZd-Zd.Zd/Zd0Zd1Z	d2Z
d3Zd4Zd5Z
d6Zd7ZRS(:icCs#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/local/lib/python2.5/compiler/pyassem.pyRs2



	



itPOP_TOPitDUP_TOPitLIST_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_STMTtBUILD_CLASSt
STORE_NAMEt
STORE_ATTRtDELETE_ATTRtSTORE_GLOBALt	BUILD_MAPt
COMPARE_OPt
STORE_FASTtIMPORT_STARtIMPORT_NAMEtIMPORT_FROMt	LOAD_ATTRitSETUP_EXCEPTt
SETUP_FINALLYtFOR_ITERtWITH_CLEANUPtBINARY_tLOAD_cCs|dS(Ni((R
R((s,/usr/local/lib/python2.5/compiler/pyassem.pytUNPACK_SEQUENCEscCs	|dS(Ni((R
R((s,/usr/local/lib/python2.5/compiler/pyassem.pytBUILD_TUPLEscCs	|dS(Ni((R
R((s,/usr/local/lib/python2.5/compiler/pyassem.pyt
BUILD_LISTscCs"t|d\}}||dS(Nii(R(R
targcRR((s,/usr/local/lib/python2.5/compiler/pyassem.pyt
CALL_FUNCTIONscCs|i|dS(Ni(R(R
R((s,/usr/local/lib/python2.5/compiler/pyassem.pytCALL_FUNCTION_VARscCs|i|dS(Ni(R(R
R((s,/usr/local/lib/python2.5/compiler/pyassem.pytCALL_FUNCTION_KW!scCs|i|dS(Ni(R(R
R((s,/usr/local/lib/python2.5/compiler/pyassem.pytCALL_FUNCTION_VAR_KW#scCs|S(N((R
R((s,/usr/local/lib/python2.5/compiler/pyassem.pyt
MAKE_FUNCTION%scCs|S(N((R
R((s,/usr/local/lib/python2.5/compiler/pyassem.pytMAKE_CLOSURE'scCs.|djodSn|djodSndS(Niiii((R
R((s,/usr/local/lib/python2.5/compiler/pyassem.pytBUILD_SLICE*s

cCs|S(N((R
R((s,/usr/local/lib/python2.5/compiler/pyassem.pytDUP_TOPX/s(R	i(R
i(RHRIRRRRRR
RRRRRRRR(((s,/usr/local/lib/python2.5/compiler/pyassem.pyRsf																																														(RRRRtcompilerRtcompiler.constsRRRRRR&RRfRgRhRiRjRR{RpRRRR(((s,/usr/local/lib/python2.5/compiler/pyassem.pys<module>s*"	Y2	
			Bj

Man Man