NL ilB UdZddlmZddlmZddlmZddlmZm Z m Z m Z m Z m Z mZddlmZddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%erddl&m'Z'dd l(m)Z)dd l*m+Z+m,Z,e d Z-eGd d Z.dZ/de0d<dZ1de0d<dZ2de0d<dZ3de0d<dZ4de0d<dZ5GddZ6eGdde6Z7eGdde6Z8eGdd e6Z9eGd!d"e6Z:eGd#d$e6Z;Gd%d&e6Z<Gd'd(e<Z=eGd)d*e=Z>eGd+d,e=Z?Gd-d.e<Z@eGd/d0e@ZAeGd1d2e@ZBeGd3d4e@ZCeGd5d6e@ZDGd7d8e<ZEeGd9d:eEZFeGd;deEZHeGd?d@eEZIeGdAdBZJeGdCdDeEZKeGdEdFeEZLeGdGdHeEZMeGdIdJeEZNeGdKdLeEZOdMZPde0dN<dOZQde0dP<dQZRde0dR<dSZSde0dT<eGdUdVeEZTeGdWdXeEZUeGdYdZeEZVeGd[d\eEZWeGd]d^eEZXeGd_d`eEZYeGdadbeEZZeGdcddeEZ[e e\e]e\fZ^eGdedfeEZ_eGdgdheEZ`eGdidjeEZaeGdkdleEZbeGdmdneEZcecjjDcic]\}}|| c}}Zfde0do<eGdpdqeEZgeGdrdseEZhehjjDcic]\}}|| c}}Zide0dt<eGdudveEZjeGdwdxeEZkekjjDcic]\}}|| c}}Zlde0dy<eGdzd{eEZmeGd|d}e<ZneGd~deEZoeGddeEZpeGddeEZqeGddeEZreGddeEZseGdde e-ZtGdde Zuycc}}wcc}}wcc}}w)acLow-level opcodes for compiler intermediate representation (IR). Opcodes operate on abstract values (Value) in a register machine. Each value has a type (RType). A value can hold various things, such as: - local variables or temporaries (Register) - intermediate values of expressions (RegisterOp subclasses) - condition flags (true/false) - literals (integer literals, True, False, etc.) NOTE: As a convention, we don't create subclasses of concrete Value/Op subclasses (e.g. you shouldn't define a subclass of Integer, which is a concrete class). If you want to introduce a variant of an existing class, you'd typically add an attribute (e.g. a flag) to an existing concrete class to enable the new behavior. Sometimes adding a new abstract base class is also an option, or just creating a new subclass without any inheritance relationship (some duplication of code is preferred over introducing complex implementation inheritance). This makes it possible to use isinstance(x, ) checks without worrying about potential subclasses. ) annotations)abstractmethod)Sequence) TYPE_CHECKINGFinalGeneric NamedTupleTypeVarUnionfinal)trait)RArray RInstanceRStructRTupleRTypeRVoidbit_rprimitivebool_rprimitivecstring_rprimitivefloat_rprimitiveint_rprimitiveis_bool_or_bit_rprimitiveis_int_rprimitiveis_none_rprimitiveis_pointer_rprimitiveis_short_int_rprimitiveobject_rprimitivepointer_rprimitiveshort_int_rprimitive void_rtype) LiteralValue)ClassIR)FuncDeclFuncIRTc>eZdZdZdddZeddZed dZy) BasicBlockaIR basic block. Contains a sequence of Ops and ends with a ControlOp (Goto, Branch, Return or Unreachable). Only the last op can be a ControlOp. All generated Ops live in basic blocks. Basic blocks determine the order of evaluation and control flow within a function. A basic block is always associated with a single function/method (FuncIR). When building the IR, ops that raise exceptions can be included in the middle of a basic block, but the exceptions aren't checked. Afterwards we perform a transform that inserts explicit checks for all error conditions and splits basic blocks accordingly to preserve the invariant that a jump, branch or return can only ever appear as the final op in a block. Manually inserting error checking ops would be boring and error-prone. BasicBlocks have an error_handler attribute that determines where to jump if an error occurs. If none is specified, an error will propagate up out of the function. This is compiled away by the `exceptions` module. Block labels are used for pretty printing and emitting C code, and get filled in by those passes. Ops that may terminate the program aren't treated as exits. c<||_g|_d|_d|_yNF)labelops error_handler referenced)selfr+s R/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/mypyc/ir/ops.py__init__zBasicBlock.__init__`s 04cjt|jxrt|jdtS)zDoes the block end with a jump, branch or return? This should always be true after the basic block has been fully built, but this is false during construction. boolr, isinstance ControlOpr/s r0 terminatedzBasicBlock.terminatedfs&DHH~E*TXXb\9"EEr2ct|jrt|jdtsJ|jdS)z&The terminator operation of the block.r4r5r9s r0 terminatorzBasicBlock.terminatoros4DHH~*TXXb\9"EEExx|r2Nr4)r+intreturnNoner?r6)r?r8)__name__ __module__ __qualname____doc__r1propertyr:r<r2r0r(r(As6: FFr2r(r ERR_NEVER ERR_MAGIC ERR_FALSE ERR_ALWAYSERR_MAGIC_OVERLAPPINGic:eZdZUdZdZeZded<dZe ddZ y) ValueaAbstract base class for all IR values. These include references to registers, literals, and all operations (Ops), such as assignments, calls and branches. Values are often used as inputs of Ops. Register can be used as an assignment target. A Value is part of the IR being compiled if it's included in a BasicBlock that is reachable from a FuncIR (i.e., is part of a function). See also: Op is a subclass of Value that is the base class of all operations. r4rtypeFc6t|jtSN)r7rSrr9s r0is_voidz Value.is_voids$))U++r2NrA) rBrCrDrEliner!rS__annotations__ is_borrowedrFrVrGr2r0rRrRs/  DD%K ,,r2rRc4eZdZdZdddZeddZd dZy) RegisteravA Register holds a value of a specific type, and it can be read and mutated. A Register is always local to a function. Each local variable maps to a Register, and they are also used for some (but not all) temporary values. Note that the term 'register' is overloaded and is sometimes used to refer to arbitrary Values (for example, in RegisterOp). cJ||_||_||_||_||_yrU)rSnameis_argrYrW)r/rSr]r^rWs r0r1zRegister.__init__s&   ! r2cyr*rGr9s r0rVzRegister.is_voidsr2cLd|jdtt|dS)Nz )r]hexidr9s r0__repr__zRegister.__repr__s#DII=SD]O1==r2N)Fr4) rSrr]strr^r6rWr>r?r@rAr?rf)rBrCrDrEr1rFrVrdrGr2r0r[r[s%>r2r[c&eZdZdZedfddZddZy)Integera9Short integer literal. Integer literals are treated as constant values and are generally not included in data flow analyses and such, unlike Register and Op subclasses. Integer can represent multiple types: * Short tagged integers (short_int_primitive type; the tag bit is clear) * Ordinary fixed-width integers (e.g., int32_rprimitive) * Values of other unboxed primitive types that are represented as integers (none_rprimitive, bool_rprimitive) * Null pointers (value 0) of various types, including object_rprimitive r4cpt|s t|r |dz|_n||_||_||_yNrK)rrvaluerSrW)r/rlrtyperWs r0r1zInteger.__init__s2 "5 )->u-EDJDJ  r2ct|jst|jr|jdzS|jSrk)rrSrrlr9s r0 numeric_valuezInteger.numeric_values2 "499 -1B4991M::? "zzr2N)rlr>rmrrWr>r?r@)r?r>)rBrCrDrEr r1rorGr2r0riris 3GTVr2riceZdZdZdddZy)FloatzFloat literal. Floating point literals are treated as constant values and are generally not included in data flow analyses and such, unlike Register and Op subclasses. c6||_t|_||_yrU)rlrrSrWr/rlrWs r0r1zFloat.__init__s $  r2Nr=)rlfloatrWr>r?r@rBrCrDrEr1rGr2r0rqrqs r2rqceZdZdZdddZy)CStringzC string literal (zero-terminated). You can also include zero values in the value, but then you'll need to track the length of the string separately. c6||_t|_||_yrU)rlrrSrWrss r0r1zCString.__init__s &  r2Nr=)rlbytesrWr>r?r@rurGr2r0rwrws  r2rwceZdZdZddZy)UndefaAn undefined value. Use Undef() as the initial value followed by one or more SetElement ops to initialize a struct. Pseudocode example: r0 = set_element undef MyStruct, "field1", f1 r1 = set_element r0, "field2", f2 # r1 now has new struct value with two fields set Warning: Always initialize undefined values before using them, as otherwise the values are garbage. You shouldn't expect that undefined values are zeroed, in particular. c||_yrU)rS)r/rms r0r1zUndef.__init__s  r2N)rmrr?r@rurGr2r0r{r{s  r2r{cfeZdZdZd dZd dZed dZed dZd dZ d dZ eddZ y )OpaAbstract base class for all IR operations. Each operation must be stored in a BasicBlock (in 'ops') to be active in the IR. This is different from non-Op values, including Register and Integer, where a reference from an active Op is sufficient to be considered active. In well-formed IR an active Op has no references to inactive ops or ops used in another function. c||_yrU)rW)r/rWs r0r1z Op.__init__s  r2cyr*rGr9s r0 can_raisez Op.can_raisesr2cy)zAll the values the op may read.NrGr9s r0sourcesz Op.sources r2cy)zRewrite the sources of an opNrGr/news r0 set_sourceszOp.set_sources$rr2cgS)z>Return arguments that have a reference count stolen by this oprGr9s r0stolenz Op.stolen(s r2c`g}|jD]}||vs|j||SrU)rappend)r/resultregs r0unique_sourceszOp.unique_sources,s7 <<> #C&  c" # r2cyrUrGr/visitors r0acceptz Op.accept3s r2NrWr>r?r@rAr? list[Value]rrr?r@rz OpVisitor[T]r?r&) rBrCrDrEr1rrrrrrrrGr2r0r~r~ sW  ..++  r2r~c&eZdZdZddfd ZxZS) BaseAssignz6Abstract base class for ops that assign to a register.c2t||||_yrU)superr1dest)r/rrW __class__s r0r1zBaseAssign.__init__;s  r2r=)rr[rWr>r?r@)rBrCrDrEr1 __classcell__rs@r0rr8s@r2rcJeZdZdZeZddfd Zd dZd dZd dZ d dZ xZ S) Assignz*Assign a value to a Register (dest = src).c4t|||||_yrU)rr1srcr/rrrWrs r0r1zAssign.__init__Fs t$r2c|jgSrUrr9s r0rzAssign.sourcesJzr2c|\|_yrUrrs r0rzAssign.set_sourcesM  r2c|jgSrUrr9s r0rz Assign.stolenPrr2c$|j|SrU) visit_assignrs r0rz Assign.acceptS##D))r2r=)rr[rrRrWr>r?r@rrr rBrCrDrErH error_kindr1rrrrrrs@r0rr@s$4J*r2rcJeZdZdZeZddfd Zd dZd dZd dZ d dZ xZ S) AssignMultiaWAssign multiple values to a Register (dest = src1, src2, ...). This is used to initialize RArray values. It's provided to avoid very verbose IR for common vectorcall operations. Note that this interacts atypically with reference counting. We assume that each RArray register is initialized exactly once with this op. ct||||sJt|jtsJ|jj t |k(sJ||_yrU)rr1r7rSrlengthlenrrs r0r1zAssignMulti.__init__esP t$ s$))V,,,yy3s8+++r2c6|jjSrUrcopyr9s r0rzAssignMulti.sourceslxx}}r2c|dd|_yrUrrs r0rzAssignMulti.set_sourceso q6r2cgSrUrGr9s r0rzAssignMulti.stolenr r2c$|j|SrU)visit_assign_multirs r0rzAssignMulti.acceptu))$//r2r=)rr[rrrWr>r?r@rrrrrs@r0rrWs(J0r2rc eZdZdZddZddZy)r8z0Abstract base class for control flow operations.cy)z5Get all basic block targets of the control operation.rGrGr9s r0targetszControlOp.targets|sr2c&td|d|d)zUpdate a basic block target.zInvalid set_target(z, ))AssertionErrorr/irs r0 set_targetzControlOp.set_targets24&1#Q?@@r2Nr?zSequence[BasicBlock]rr>rr(r?r@)rBrCrDrErrrGr2r0r8r8ys:Ar2r8cZeZdZdZeZd d fd Zd dZd dZd dZ ddZ ddZ ddZ xZ S)GotozUnconditional jump.c2t||||_yrU)rr1r+)r/r+rWrs r0r1z Goto.__init__s  r2c|jfSrUr+r9s r0rz Goto.targetss }r2c |dk(sJ||_y)Nrrrs r0rzGoto.set_targetsAv v r2c4d|jjzS)Nz rr9s r0rdz Goto.__repr__sTZZ----r2cgSrUrGr9s r0rz Goto.sourcesrr2c |rJyrUrGrs r0rzGoto.set_sources w3r2c$|j|SrU) visit_gotors r0rz Goto.accept!!$''r2r=)r+r(rWr>r?r@rrrgrrr)rBrCrDrErHrr1rrrdrrrrrs@r0rrs.J.(r2rceZdZUdZeZdZded<dZded< ddd dfd Z dd Z dd Z dd Z dd Z ddZddZxZS)BranchzBranch based on a value. If op is BOOL, branch based on a bit/bool value: if [not] r1 goto L1 else goto L2 If op is IS_ERROR, branch based on whether there is an error value: if [not] is_error(r1) goto L1 else goto L2 drBOOLeIS_ERRORF)rarect||||_||_||_||_d|_d|_||_yr*) rr1rltruefalseopnegatedtraceback_entryr)r/rl true_label false_labelrrWrrs r0r1zBranch.__init__sF      7; r2c2|j|jfSrUrrr9s r0rzBranch.targetss 4::&&r2cD|dk(s|dk(sJ|dk(r||_y||_yNrrIrrs r0rzBranch.set_targets*Ava 6DIDJr2c|jgSrUrlr9s r0rzBranch.sources |r2c|\|_yrUrrs r0rzBranch.set_sources  r2c(|j |_yrU)rr9s r0invertz Branch.inverts<<' r2c$|j|SrU) visit_branchrs r0rz Branch.acceptrr2r=)rlrRrr(rr(rr>rWr>rr6r?r@rrrrr?r@r)rBrCrDrErHrrrXrr1rrrrrrrrs@r0rrsJD%He       6'(*r2rc`eZdZdZeZ d dd d fdZd dZd dZd dZ d dZ xZ S)ReturnzReturn a value from a function.N) yield_targetc@t||||_||_yrU)rr1rlr)r/rlrWrrs r0r1zReturn.__init__s#  )r2c|jgSrUrr9s r0rzReturn.sourcesrr2c|\|_yrUrrs r0rzReturn.set_sourcesrr2c|jgSrUrr9s r0rz Return.stolenrr2c$|j|SrU) visit_returnrs r0rz Return.acceptrr2r=)rlrRrWr>rzBasicBlock | Noner?r@rrrrrs@r0rrsQ)J)+ )QU ) )"% )=N )  )*r2rcBeZdZdZeZddfd ZddZd dZd dZ xZ S) Unreachablea5Mark the end of basic block as unreachable. This is sometimes necessary when the end of a basic block is never reached. This can also be explicitly added to the end of non-None returning functions (in None-returning function we can just return None). Mypy statically guarantees that the end of the function is not unreachable if there is not a return statement. This prevents the block formatter from being confused due to lack of a leave and also leaves a nifty note in the IR. It is not generally processed by visitors. c$t||yrU)rr1r/rWrs r0r1zUnreachable.__init__s r2cgSrUrGr9s r0rzUnreachable.sourcesrr2c |rJyrUrGrs r0rzUnreachable.set_sourcesrr2c$|j|SrU)visit_unreachablers r0rzUnreachable.accept ((..r2r=rrrr rBrCrDrErHrr1rrrrrs@r0rrs# J/r2rc@eZdZUdZdZdZded<dfd Zd dZxZ S) RegisterOpaAbstract base class for operations that can be written as r1 = f(r2, ..., rn). Takes some values, performs an operation, and generates an output (unless the 'type' attribute is void_rtype, which is the default). Other ops can refer to the result of the Op by referring to the Op instance. This doesn't do any explicit control flow, but can raise an error. Note that the operands can be arbitrary Values, not just Register instances, even though the naming may suggest otherwise. r4N RType | None_typecPt|||jdk7sJdy)Nr4zerror_kind not defined)rr1rrs r0r1zRegisterOp.__init__5s( "$>&>>$r2c(|jtk7SrU)rrHr9s r0rzRegisterOp.can_raise9s)++r2rrA) rBrCrDrErr rXr1rrrs@r0r r $s# JE<?,r2r cBeZdZdZeZddfd ZddZd dZd dZ xZ S) IncRefz'Increase reference count (inc_ref src).cb|jjsJt| |||_yrU)rS is_refcountedrr1rr/rrWrs r0r1zIncRef.__init__Cs*xx%%%% r2c|jgSrUrr9s r0rzIncRef.sourcesHrr2c|\|_yrUrrs r0rzIncRef.set_sourcesKrr2c$|j|SrU) visit_inc_refrs r0rz IncRef.acceptN$$T**r2r=rrRrWr>r?r@rrrrrs@r0rr=s1J +r2rcJeZdZdZeZddfd Zd dZd dZd dZ d dZ xZ S) DecRefzDecrease reference count and free object if zero (dec_ref src). The is_xdec flag says to use an XDECREF, which checks if the pointer is NULL first. cp|jjsJt| |||_||_yrU)rSrrr1ris_xdec)r/rrrWrs r0r1zDecRef.__init__\s1xx%%%%  r2ctdj|jrd|jSd|jS)Nz<{}DecRef {!r}>Xre)formatrrr9s r0rdzDecRef.__repr__bs- ''t||TXXNNTXXNNr2c|jgSrUrr9s r0rzDecRef.sourceserr2c|\|_yrUrrs r0rzDecRef.set_sourceshrr2c$|j|SrU) visit_dec_refrs r0rz DecRef.acceptkrr2)Fr4)rrRrr6rWr>r?r@rgrrr) rBrCrDrErHrr1rdrrrrrs@r0rrRs) J O+r2rc<eZdZdZdfd ZddZddZd dZxZS) Callz]Native call f(arg, ...). The call target can be a module-level function or a class. ch||_t||_t|jt|jjk(sJ|jj |_|jj }|js t|_ n t|_ t|1|yrU) fnlistargsrsigret_typerS error_overlaprJrrPrr1)r/r(r*rWr,rs r0r1z Call.__init__vsxJ 499~RVV[[!1111FFOO 66??%%'DO3DO r2cHt|jjSrU)r)r*rr9s r0rz Call.sourcessDIINN$%%r2c|dd|_yrUr*rs r0rzCall.set_sources F r2c$|j|SrU) visit_callrs r0rz Call.acceptrr2)r(r$r*zSequence[Value]rWr>r?r@rrr rBrCrDrEr1rrrrrs@r0r&r&os &(r2r&c>eZdZdZddfd ZddZd dZd dZxZS) MethodCallz'Native method call obj.method(arg, ...)c||_||_||_t|jt sJd|j|_|j jj|}|+Jdj|j j||j}||_|js t|_n t|_t |E|y)Nz'Methods can only be called on instancesz{} doesn't have method {})objmethodr*r7rSr receiver_typeclass_ir method_sigr r]r,r-rJrrPrr1)r/r8r9r*rW method_irr,rs r0r1zMethodCall.__init__s  #((I.Y0YY. XX&&//::6B $ &A&H&H    # #V'  $%% %%'DO3DO r2cR|jj|jgzSrU)r*rr8r9s r0rzMethodCall.sourcessyy~~488*,,r2c"|^|_|_yrU)r*r8rs r0rzMethodCall.set_sourcess"DHr2c$|j|SrU)visit_method_callrs r0rzMethodCall.acceptrr2r=) r8rRr9rfr*rrWr>r?r@rrrr4rs@r0r6r6s1$-#/r2r6cXeZdZdZ ddZddZy)PrimitiveDescriptiona*Description of a primitive op. Primitives get lowered into lower-level ops before code generation. If c_function_name is provided, a primitive will be lowered into a CallC op. Otherwise custom logic will need to be implemented to transform the primitive into lower-level ops. c||_||_||_||_||_||_||_||_| |_| |_ | |_ | |_ | |_ | r |tk(sJyyrU)r] arg_types return_type var_arg_typetruncated_typec_function_namerstealsrYorderingextra_int_constantspriorityis_purerH)r/r]rErFrGrHrIrrJrYrKrLrMrNs r0r1zPrimitiveDescription.__init__s"  )"-#/%3'6!+# "-' *= ' & * ** r2c<d|jd|jdS)NzrJStealsDescriptionrYr6rKzlist[int] | NonerLzlist[tuple[int, RType]]rMr>rNr6r?r@rg)rBrCrDrEr1rdrGr2r0rCrCs$+$+$+ $+ # $+ % $+$$+$+"$+$+#$+5$+$+$+ $+LIr2rCc:eZdZdZdd dZd dZd dZd dZd dZy) PrimitiveOpaA higher-level primitive operation. Some of these have special compiler support. These will be lowered (transformed) into lower-level IR ops before code generation, and after reference counting op insertion. Others will be transformed into CallC ops. Tagged integer equality is a typical primitive op with non-trivial lowering. It gets transformed into a tag check, followed by different code paths for short and long representations. cd||_|j|_|j|_||_yrU)r*rFrSrdesc)r/r*rUrWs r0r1zPrimitiveOp.__init__s( $$ // r2c|jSrUr0r9s r0rzPrimitiveOp.sourcess yyr2c|dd|_yrUr0rs r0rzPrimitiveOp.set_sourcesr1r2c |jj}t|trOt |t |j k(sJt |j |Dcgc] \}}|s | c}}S|sgS|jScc}}wrU)rUrJr7r)rr*zipr)r/rJargsteals r0rzPrimitiveOp.stolensp!! fd #v;#dii.0 00*-dii*@JJCECJ J#2 7 7Ks # B .B c$|j|SrU)visit_primitive_oprs r0rzPrimitiveOp.acceptrr2Nr=)r*rrUrCrWr>r?r@rrr) rBrCrDrEr1rrrrrGr2r0rSrSs   80r2rScVeZdZdZeZ d dfd ZddZd dZd dZ xZ S) LoadErrorValuezLoad an error value. Each type has one reserved value that signals an error (exception). This loads the error value for a specific type. cNt||||_||_||_yrU)rr1rSrY undefines)r/rmrWrYrars r0r1zLoadErrorValue.__init__s*  &#r2cgSrUrGr9s r0rzLoadErrorValue.sourcesrr2c |rJyrUrGrs r0rzLoadErrorValue.set_sourcesrr2c$|j|SrU)visit_load_error_valuers r0rzLoadErrorValue.accept"s--d33r2)r4FF) rmrrWr>rYr6rar6r?r@rrrrrs@r0r_r_sR JZ_ # #"% #9= #RV #  #4r2r_c8eZdZdZeZdZddZd dZd dZ d dZ y) LoadLiteralaLoad a Python literal object (dest = 'foo' / b'foo' / ...). This is used to load a static PyObject * value corresponding to a literal of one of the supported types. Tuple / frozenset literals must contain only valid literal values as items. NOTE: You can use this to load boxed (Python) int objects. Use Integer to load unboxed, tagged integers or fixed-width, low-level integers. For int literals, both int_rprimitive (CPyTagged) and object_primitive (PyObject *) are supported as rtype. However, when using int_rprimitive, the value must *not* be small enough to fit in an unboxed integer. Tc ||_||_yrU)rlrS)r/rlrms r0r1zLoadLiteral.__init__<s  r2cgSrUrGr9s r0rzLoadLiteral.sources@rr2c |rJyrUrGrs r0rzLoadLiteral.set_sourcesCrr2c$|j|SrU)visit_load_literalrs r0rzLoadLiteral.acceptFrr2N)rlr"rmrr?r@rrr) rBrCrDrErHrrYr1rrrrGr2r0rgrg&s'"JK0r2rgc^eZdZdZeZddd dfdZd dZd dZd dZ xZ S) GetAttrzobj.attr (for a native object)F)borrowallow_error_valuect||||_||_||_t |j tsJd|j z|j |_|j j|}||_|r t|_ n|jr t|_ |xr |j|_y)N"Attribute access not supported: %s)rr1r8attrrpr7rSr class_type attr_typerHrr-rPrrY)r/r8rsrWrorprurs r0r1zGetAttr.__init__Ps  !2#((I._0TWZW_W_0__.((HH&&t,  'DO  $ $3DO!=i&=&=r2c|jgSrUr8r9s r0rzGetAttr.sourcesgrr2c|\|_yrUrwrs r0rzGetAttr.set_sourcesjrr2c$|j|SrU)visit_get_attrrs r0rzGetAttr.acceptm%%d++r2) r8rRrsrfrWr>ror6rpr6r?r@rrr) rBrCrDrErJrr1rrrrrs@r0rnrnJsa(J"'> >> >  > > >.,r2rncPeZdZdZeZdfd Zd dZd dZd dZ d dZ d dZ xZ S) SetAttrzKobj.attr = src (for a native object) Steals the reference to src. ct||||_||_||_t |j tsJd|j z|j |_t|_d|_ y)NrrF) rr1r8rsrr7rSrrtris_init)r/r8rsrrWrs r0r1zSetAttr.__init__zsf  #((I._0TWZW_W_0__.((#  r2c>d|_t|_t|_yNT)rrHrr!rSr9s r0mark_as_initializerzSetAttr.mark_as_initializers # r2c2|j|jgSrUr8rr9s r0rzSetAttr.sources$((##r2c"|\|_|_yrUrrs r0rzSetAttr.set_sources $(r2c|jgSrUrr9s r0rzSetAttr.stolenrr2c$|j|SrU)visit_set_attrrs r0rzSetAttr.acceptr{r2) r8rRrsrfrrRrWr>r?r@rrrr) rBrCrDrErLrr1rrrrrrrs@r0r}r}qs- J  $!,r2r}staticNAMESPACE_STATICrSNAMESPACE_TYPEmoduleNAMESPACE_MODULEtypevarNAMESPACE_TYPE_VARcheZdZdZeZdZdeddf d fd Zd dZ d dZ d dZ xZ S) LoadStaticaLoad a static name (name :: static). Load a C static variable/pointer. The namespace for statics is shared for the entire compilation group. You can optionally provide a module name and a sub-namespace identifier for additional namespacing to avoid name conflicts. The static namespace does not overlap with other C names, since the final C name will get a prefix, so conflicts only must be avoided with other statics. TNr4cjt||||_||_||_||_||_yrU)rr1 identifier module_name namespacerSann)r/rSrrrrWrrs r0r1zLoadStatic.__init__s6 $&" r2cgSrUrGr9s r0rzLoadStatic.sourcesrr2c |rJyrUrGrs r0rzLoadStatic.set_sourcesrr2c$|j|SrU)visit_load_staticrs r0rzLoadStatic.acceptrr2)rSrrrfrrPrrfrWr>robjectr?r@rrr) rBrCrDrErHrrYrr1rrrrrs@r0rrszJK #')       /r2rc^eZdZdZeZdedf dfd Zd dZd dZ d dZ xZ S) InitStaticzhstatic = value :: static Initialize a C static variable/pointer. See everything in LoadStatic. Nr4c\t||||_||_||_||_yrU)rr1rrrrl)r/rlrrrrWrs r0r1zInitStatic.__init__s/ $&" r2c|jgSrUrr9s r0rzInitStatic.sourcesrr2c|\|_yrUrrs r0rzInitStatic.set_sourcesrr2c$|j|SrU)visit_init_staticrs r0rzInitStatic.acceptrr2) rlrRrrfrrPrrfrWr>r?r@rrr) rBrCrDrErHrrr1rrrrrs@r0rrsh J #')          /r2rcHeZdZdZeZdfd ZddZddZd dZ d dZ xZ S) TupleSetz*dest = (reg, ...) (for fixed-length tuple)ct||||_t|Dcgc])}t |j s |j nt +c}|_|j|_ycc}wrU)rr1itemsrrrSr tuple_type)r/rrWrZrs r0r1zTupleSet.__init__sc  !! !8 A~U   OO  s.A-c6|jjSrUrrr9s r0rzTupleSet.sourceszz  r2c6|jjSrUrr9s r0rzTupleSet.stolenrr2c|dd|_yrU)rrs r0rzTupleSet.set_sources s V r2c$|j|SrU)visit_tuple_setrs r0rzTupleSet.accept &&t,,r2)rrrWr>r?r@rrr) rBrCrDrErHrr1rrrrrrs@r0rrs$4J $!!-r2rcHeZdZdZeZdddd fdZd dZd dZd dZ xZ S) TupleGetz.Get item of a fixed-length tuple (src[index]).Froct||||_||_t |j t sJd|dk\sJ|j j||_||_y)Nz TupleGet only operates on tuplesr) rr1rindexr7rSrtypesrY)r/rrrWrors r0r1zTupleGet.__init__s`  #((F+O-OO+zzHHNN5) !r2c|jgSrUrr9s r0rzTupleGet.sourcesrr2c|\|_yrUrrs r0rzTupleGet.set_sources"rr2c$|j|SrU)visit_tuple_getrs r0rzTupleGet.accept%rr2r=) rrRrr>rWr>ror6r?r@rrrrrs@r0rrs'8J"QV"-r2rcfeZdZdZeZddd d fdZd dZd dZd dZ d dZ xZ S) Castzcast(type, src) Perform a runtime type check (no representation or value conversion). DO NOT increment reference counts. F)ro uncheckedcxt||||_||_||_||_|r t |_yyrU)rr1rrSrY is_uncheckedrHr)r/rtyprWrorrs r0r1z Cast.__init__4sA  !& 'DO r2c|jgSrUrr9s r0rz Cast.sourcesBrr2c|\|_yrUrrs r0rzCast.set_sourcesErr2c8|jrgS|jgSrU)rYrr9s r0rz Cast.stolenHs   Izr2c$|j|SrU) visit_castrs r0rz Cast.acceptMrr2) rrRrrrWr>ror6rr6r?r@rrr) rBrCrDrErJrr1rrrrrrs@r0rr)sbJDI\a ( ($ (,/ (<@ (UY (  ( (r2rcJeZdZdZeZddfd Zd dZd dZd dZ d dZ xZ S) Boxzbox(type, src) This converts from a potentially unboxed representation to a straight Python object. Only supported for types with an unboxed representation. ct||||_t|_t |jjst |jjrd|_yyr)rr1rrrSrrrYrs r0r1z Box.__init__[sL % dhhmm ,0I$((--0X#D 1Yr2c|jgSrUrr9s r0rz Box.sourcescrr2c|\|_yrUrrs r0rzBox.set_sourcesfrr2c|jgSrUrr9s r0rz Box.stolenirr2c$|j|SrU) visit_boxrs r0rz Box.acceptls  &&r2r=rrrrrrs@r0rrQs( J$'r2rc<eZdZdZdfd ZddZddZd dZxZS) Unboxzunbox(type, src) This is similar to a cast, but it also changes to a (potentially) unboxed runtime representation. Only supported for types with an unboxed representation. c||_||_|js t|_n t |_t ||yrU)rrSr-rJrrPrr1)r/rrrWrs r0r1zUnbox.__init__xs5   'DO3DO r2c|jgSrUrr9s r0rz Unbox.sourcesrr2c|\|_yrUrrs r0rzUnbox.set_sourcesrr2c$|j|SrU) visit_unboxrs r0rz Unbox.accepts""4((r2)rrRrrrWr>r?r@rrrr4rs@r0rrps )r2rceZdZUdZeZdZded<dZded<dZ ded<d Z ded <d Z ded <d Z ded<dZ ded<dfd ZddZddZddZxZS)RaiseStandardErrorzRaise built-in exception with an optional error string. We have a separate opcode for this for convenience and to generate smaller, more idiomatic C code. ValueErrorr VALUE_ERRORrASSERTION_ERROR StopIterationSTOP_ITERATIONUnboundLocalErrorUNBOUND_LOCAL_ERROR RuntimeError RUNTIME_ERROR NameError NAME_ERRORZeroDivisionErrorZERO_DIVISION_ERRORcVt||||_||_t|_yrU)rr1 class_namerlrrS)r/rrlrWrs r0r1zRaiseStandardError.__init__s% $ # r2cgSrUrGr9s r0rzRaiseStandardError.sourcesrr2c |rJyrUrGrs r0rzRaiseStandardError.set_sourcesrr2c$|j|SrU)visit_raise_standard_errorrs r0rzRaiseStandardError.accepts11$77r2)rrfrlzstr | Value | NonerWr>r?r@rrr)rBrCrDrErLrrrXrrrrrrr1rrrrrs@r0rrskJ%K%-OU-+NE+!44)M5)#J#!44$ 8r2rcteZdZdZ d dd d fdZd dZd dZd dZd dZxZ S)CallCzresult = function(arg0, arg1, ...) Call a C function that is not a compiled/native function (for example, a Python C API function). Use Call to call native functions. F)rNc ||_t | |||_||_||_||_||_||_| |_ | r |tk(sJyyrU) rrr1 function_namer*rSrJrY var_arg_idxrNrH) r/rr*r,rJrYrrWrrNrs r0r1zCallC.__init__se% *   && * ** r2c |jddSrUr0r9s r0rz CallC.sourcessyy|r2c|dd|_yrUr0rs r0rzCallC.set_sourcesr1r2cDt|jtrct|jt|jk(sJt |j|jDcgc] \}}|s | c}}S|jsgS|j Scc}}wrU)r7rJr)rr*rYr)r/rZr[s r0rz CallC.stolensr dkk4 (t{{#s499~5 55*-dii*EOJCCO O![[2 rWr>rr>rNr6r?r@rrr) rBrCrDrEr1rrrrrrs@r0rrs ++++ + " +  +++++ +:=*r2rcJeZdZdZeZddfd Zd dZd dZd dZ d dZ xZ S) Truncatearesult = truncate src from src_type to dst_type Truncate a value from type with more bits to type with less bits. dst_type and src_type can be native integer types, bools or tagged integers. Tagged integers should have the tag bit unset. cbt||||_||_|j|_yrU)rr1rrSsrc_type)r/rdst_typerWrs r0r1zTruncate.__init__s)   r2c|jgSrUrr9s r0rzTruncate.sourcesrr2c|\|_yrUrrs r0rzTruncate.set_sourcesrr2cgSrUrGr9s r0rzTruncate.stolenrr2c$|j|SrU)visit_truncaters r0rzTruncate.acceptr{r2r=)rrRrrrWr>r?r@rrrrrs@r0rrs(J! ,r2rcJeZdZdZeZddfd Zd dZd dZd dZ d dZ xZ S) Extendadresult = extend src from src_type to dst_type Extend a value from a type with fewer bits to a type with more bits. dst_type and src_type can be native integer types, bools or tagged integers. Tagged integers should have the tag bit unset. If 'signed' is true, perform sign extension. Otherwise, the result will be zero extended. cpt||||_||_|j|_||_yrU)rr1rrSrsigned)r/rrrrWrs r0r1zExtend.__init__s0    r2c|jgSrUrr9s r0rzExtend.sourcesrr2c|\|_yrUrrs r0rzExtend.set_sources"rr2cgSrUrGr9s r0rz Extend.stolen%rr2c$|j|SrU) visit_extendrs r0rz Extend.accept(rr2r=) rrRrrrr6rWr>r?r@rrrrrs@r0rr s( J*r2rcFeZdZdZeZdZddfd Zd dZd dZ d dZ xZ S) LoadGlobalzLoad a low-level global variable/pointer. Note that can't be used to directly load Python module-level global variable, since they are stored in a globals dictionary and accessed using dictionary operations. TcNt||||_||_||_yrU)rr1rrSr)r/rSrrWrrs r0r1zLoadGlobal.__init__8s% $ r2cgSrUrGr9s r0rzLoadGlobal.sources>rr2c |rJyrUrGrs r0rzLoadGlobal.set_sourcesArr2c$|j|SrU)visit_load_globalrs r0rzLoadGlobal.acceptDrr2)r4N) rSrrrfrWr>rrr?r@rrr rBrCrDrErHrrYr1rrrrrs@r0r r ,s(JK /r2r ceZdZUdZeZdZded<dZded<dZ ded<d Z ded <d Z ded <d Z ded<dZ ded<dZded<dZded<dZded<edede de de de de dededed i Zded!<d&d'fd" Zd(d#Zd)d$Zd*d%ZxZS)+IntOpaBinary arithmetic or bitwise op on integer operands (e.g., r1 = r2 + r3). These ops are low-level and are similar to the corresponding C operations. The left and right values must have low-level integer types with compatible representations. Fixed-width integers, short_int_rprimitive, bool_rprimitive and bit_rprimitive are supported. For tagged (arbitrary-precision) integer ops look at mypyc.primitives.int_ops. rrADDrISUBrKMULrMDIVrOMODANDORXOR LEFT_SHIFT RIGHT_SHIFT+-*/%&|^z<>op_strc\t||||_||_||_||_yrU)rr1rSlhsrhsr)r/rSr+r,rrWrs r0r1zIntOp.__init__ss,  r2c2|j|jgSrUr+r,r9s r0rz IntOp.sourceszrr2c"|\|_|_yrUr.rs r0rzIntOp.set_sources}rr2c$|j|SrU) visit_int_oprs r0rz IntOp.acceptrr2r=) rSrr+rRr,rRrr>rWr>r?r@rrr)rBrCrDrErHrrrXrrrrrrrrr r)r1rrrrrs@r0rrHs JCNCNCNCNCNCBOCJK S S S S S S C SDT FE $!*r2r int_op_to_idc>eZdZUdZeZdZded<dZded<dZ ded<d Z ded <d Z ded <d Z ded<dZ ded<dZded<dZded<dZded<edede de de de de dedededi Zded<eee e e e dZded<eee eeedZded <d%d&fd! Zd'd"Zd(d#Zd)d$ZxZS)* ComparisonOpagLow-level comparison op for integers and pointers. Both unsigned and signed comparisons are supported. Supports comparisons between fixed-width integer types and pointer types. The operands should have matching sizes. The result is always a bit (representing a boolean). Python semantics, such as calling __eq__, are not supported. rrEQrNEQfSLTgSGThSLEiSGEjULTkUGTlULEmUGE==!==r))rGrHrIrarJrK signed_ops unsigned_opscdt||t|_||_||_||_yrUrr1rrSr+r,rr/r+r,rrWrs r0r1zComparisonOp.__init__, " r2c2|j|jgSrUr.r9s r0rzComparisonOp.sourcesrr2c"|\|_|_yrUr.rs r0rzComparisonOp.set_sourcesrr2c$|j|SrU)visit_comparison_oprs r0rzComparisonOp.accepts**400r2r= r+rRr,rRrr>rWr>r?r@rrr)rBrCrDrErHrr5rXr6r8r:r<r>r@rBrDrFr)rLrMr1rrrrrs@r0r4r4s JBOCCCCCCCCC D T S S T T S S T T FE  "3SSVWJW!#3Ss#UXYL%Y$!1r2r4c eZdZUdZeZdZded<dZded<dZ ded<d Z ded <d Z ded <ed ede de de diZ ded<ddfd Z ddZddZddZxZS)FloatOpzBinary float arithmetic op (e.g., r1 = r2 + r3). These ops are low-level and are similar to the corresponding C operations (and somewhat different from Python operations). The left and right values must be floats. rrrrIrrKrrMrrOrr!r"r#r$r%r)cdt||t|_||_||_||_yrU)rr1rrSr+r,rrPs r0r1zFloatOp.__init__s, $ r2c2|j|jgSrUr.r9s r0rzFloatOp.sourcesrr2c"|\|_|_yrUr.rs r0rzFloatOp.set_sources"48r2c$|j|SrU)visit_float_oprs r0rzFloatOp.acceptr{r2r=rVrrr)rBrCrDrErHrrrXrrrrr)r1rrrrrs@r0rXrXsoJCNCNCNCNCN#sCc3S#FFEF$#,r2rXfloat_op_to_idcBeZdZdZeZddfd ZddZd dZd dZ xZ S) FloatNegzFloat negation op (r1 = -r2).cHt||t|_||_yrU)rr1rrSrrs r0r1zFloatNeg.__init__s $ r2c|jgSrUrr9s r0rzFloatNeg.sourcesrr2c|\|_yrUrrs r0rzFloatNeg.set_sourcesrr2c$|j|SrU)visit_float_negrs r0rzFloatNeg.acceptrr2r=rrrrrrs@r0raras'J -r2rac eZdZUdZeZdZded<dZded<dZ ded<d Z ded <d Z ded <d Z ded<edede de de de diZ ded<ddfd ZddZddZddZxZS)FloatComparisonOpz#Low-level comparison op for floats.rrr5rr6rLTrGTrLEGErGrHrIrarJrKr)cdt||t|_||_||_||_yrUrOrPs r0r1zFloatComparisonOp.__init__rQr2c2|j|jgSrUr.r9s r0rzFloatComparisonOp.sourcesrr2c"|\|_|_yrUr.rs r0rzFloatComparisonOp.set_sourcesr\r2c$|j|SrU)visit_float_comparison_oprs r0rzFloatComparisonOp.accept"s0066r2r=rVrrr)rBrCrDrErHrr5rXr6rirjrkrmr)r1rrrrrs@r0rhrhsy-JBOCBOBOBOBOsD"c2sBb$OFEO$#7r2rhfloat_comparison_op_to_idcHeZdZdZeZdddd fdZd dZd dZd dZ xZ S) LoadMemzRead a memory location: result = *(type *)src. Attributes: type: Type of the read value src: Pointer to memory to read Frct||||_t|jsJ||_|xr |j |_yrU)rr1rSrrrrY)r/rSrrWrors r0r1zLoadMem.__init__6sC  $SXX...!8d&8&8r2c|jgSrUrr9s r0rzLoadMem.sources>rr2c|\|_yrUrrs r0rzLoadMem.set_sourcesArr2c$|j|SrU)visit_load_memrs r0rzLoadMem.acceptDr{r2r=) rSrrrRrWr>ror6r?r@rrrrrs@r0ruru+s+J9RW9,r2rucJeZdZdZeZddfd Zd dZd dZd dZ d dZ xZ S) SetMemzWrite to a memory location: *(type *)dest = src Attributes: type: Type of the written value dest: Pointer to memory to write src: Source value cdt||t|_||_||_||_yrU)rr1r!rS dest_typerr)r/rSrrrWrs r0r1zSetMem.__init__Ts,   r2c2|j|jgSrUrrr9s r0rzSetMem.sources[s$))$$r2c"|\|_|_yrUrrs r0rzSetMem.set_sources^s!$)r2c|jgSrUrr9s r0rz SetMem.stolenarr2c$|j|SrU) visit_set_memrs r0rz SetMem.acceptdrr2r=) rSrrrRrrRrWr>r?r@rrrrrs@r0r|r|Hs(J%"+r2r|cBeZdZdZeZddfd ZddZd dZd dZ xZ S) GetElementPtrzGet the address of a struct element. Note that you may need to use KeepAlive to avoid the struct being freed, if it's reference counted, such as PyObject *. cdt||t|_||_||_||_yrU)rr1rrSrrfield)r/rrrrWrs r0r1zGetElementPtr.__init__rs, &    r2c|jgSrUrr9s r0rzGetElementPtr.sourcesyrr2c|\|_yrUrrs r0rzGetElementPtr.set_sources|rr2c$|j|SrU)visit_get_element_ptrrs r0rzGetElementPtr.accepts,,T22r2r=) rrRrrrrfrWr>r?r@rrrrrs@r0rrhs# J3r2rcJeZdZdZeZddfd Zd dZd dZd dZ d dZ xZ S) SetElementzSet the value of a struct element. This evaluates to a new struct with the changed value. Use together with Undef to initialize a fresh struct value (see Undef for more details). ct||t|jtsJ|j|j|_||_||_||_yrU)rr1r7rSrritemr)r/rrrrWrs r0r1zSetElement.__init__sM #((G,6chh6,HH   r2c|jgSrUrr9s r0rzSetElement.sourcesrr2c|\|_yrUrrs r0rzSetElement.set_sourcesrr2c|jgSrUrr9s r0rzSetElement.stolenrr2c$|j|SrU)visit_set_elementrs r0rzSetElement.acceptrr2r=) rrRrrfrrRrWr>r?r@rrrrrs@r0rrs(J/r2rcFeZdZdZeZdZddfd Zd dZd dZ d dZ xZ S) LoadAddressaGet the address of a value: result = (type)&src Attributes: type: Type of the loaded address(e.g. ptr/object_ptr) src: Source value (str for globals like 'PyList_Type', Register for temporary values or locals, LoadStatic for statics.) Tc@t||||_||_yrU)rr1rSr)r/rSrrWrs r0r1zLoadAddress.__init__s  r2cTt|jtr |jgSgSrU)r7rr[r9s r0rzLoadAddress.sourcess! dhh )HH: Ir2ch|r0t|dtsJt|dk(sJ|d|_yyr)r7r[rrrs r0rzLoadAddress.set_sourcess9 c!fh/ //s8q= =1vDH r2c$|j|SrU)visit_load_addressrs r0rzLoadAddress.acceptrr2r=)rSrrzstr | Register | LoadStaticrWr>r?r@rrrrrs@r0rrs(JK   0r2rcBeZdZdZeZddd dZd dZd dZd dZ d dZ y ) KeepAliveaA no-op operation that ensures source values aren't freed. This is sometimes useful to avoid decref when a reference is still being held but not seen by the compiler. A typical use case is like this (C-like pseudocode): ptr = &x.item r = *ptr keep_alive x # x must not be freed here # x may be freed here If we didn't have "keep_alive x", x could be freed immediately after taking the address of 'item', resulting in a read after free on the second line. If 'steal' is true, the value is considered to be stolen at this op, i.e. it won't be decref'd. You need to ensure that the value is freed otherwise, perhaps by using borrowing followed by Unborrow. Be careful with steal=True -- this can cause memory leaks. F)r[c(|sJ||_||_yrU)rr[)r/rr[s r0r1zKeepAlive.__init__s s r2c6|jjSrUrr9s r0rzKeepAlive.sourcesrr2cR|jr|jjSgSrU)r[rrr9s r0rzKeepAlive.stolens ::88==? " r2c|dd|_yrUrrs r0rzKeepAlive.set_sourcesrr2c$|j|SrU)visit_keep_alivers r0rzKeepAlive.accepts''--r2N)rrr[r6r?r@rrr) rBrCrDrErHrr1rrrrrGr2r0rrs*0J:?  .r2rcJeZdZdZeZddfd Zd dZd dZd dZ d dZ xZ S) UnborrowaA no-op op to create a regular reference from a borrowed one. Borrowed references can only be used temporarily and the reference counts won't be managed. This value will be refcounted normally. This is mainly useful if you split an aggregate value, such as a tuple, into components using borrowed values (to avoid increfs), and want to treat the components as sharing the original managed reference. You'll also need to use KeepAlive with steal=True to "consume" the original tuple reference: # t is a 2-tuple r0 = borrow t[0] r1 = borrow t[1] keep_alive steal t r2 = unborrow r0 r3 = unborrow r1 # now (r2, r3) represent the tuple as separate items, that are # managed again. (Note we need to steal before unborrow, to avoid # refcount briefly touching zero if r2 or r3 are unused.) Be careful with this -- this can easily cause double freeing. cpt|||jsJ||_|j|_yrU)rr1rYrrSrs r0r1zUnborrow.__init__s. HH r2c|jgSrUrr9s r0rzUnborrow.sourcesrr2c|\|_yrUrrs r0rzUnborrow.set_sourcesrr2cgSrUrGr9s r0rzUnborrow.stolenrr2c$|j|SrU)visit_unborrowrs r0rzUnborrow.accept"r{r2r=rrrrrrs@r0rrs(0J ,r2rceZdZdZed*dZed+dZed,dZed-dZed.dZ ed/dZ ed0dZ ed1d Z ed2d Z ed3d Zed4d Zed5d Zed6dZed7dZd8dZd9dZed:dZed;dZeddZed?dZed@dZedAdZedBdZedCdZedDdZedEdZ edFdZ!edGdZ"edHd Z#edId!Z$edJd"Z%edKd#Z&edLd$Z'edMd%Z(edNd&Z)edOd'Z*edPd(Z+y))Q OpVisitorz;Generic visitor over ops (uses the visitor design pattern).ctrUNotImplementedErrorr/rs r0rzOpVisitor.visit_goto*!!r2ctrUrrs r0rzOpVisitor.visit_branch.rr2ctrUrrs r0rzOpVisitor.visit_return2rr2ctrUrrs r0rzOpVisitor.visit_unreachable6rr2ctrUrrs r0rzOpVisitor.visit_assign:rr2ctrUrrs r0rzOpVisitor.visit_assign_multi>rr2ctrUrrs r0rez OpVisitor.visit_load_error_valueBrr2ctrUrrs r0rlzOpVisitor.visit_load_literalFrr2ctrUrrs r0rzzOpVisitor.visit_get_attrJrr2ctrUrrs r0rzOpVisitor.visit_set_attrNrr2ctrUrrs r0rzOpVisitor.visit_load_staticRrr2ctrUrrs r0rzOpVisitor.visit_init_staticVrr2ctrUrrs r0rzOpVisitor.visit_tuple_getZrr2ctrUrrs r0rzOpVisitor.visit_tuple_set^rr2ctrUrrs r0rzOpVisitor.visit_inc_refb!!r2ctrUrrs r0r$zOpVisitor.visit_dec_referr2ctrUrrs r0r3zOpVisitor.visit_callhrr2ctrUrrs r0rAzOpVisitor.visit_method_calllrr2ctrUrrs r0rzOpVisitor.visit_castprr2ctrUrrs r0rzOpVisitor.visit_boxtrr2ctrUrrs r0rzOpVisitor.visit_unboxxrr2ctrUrrs r0rz$OpVisitor.visit_raise_standard_error|rr2ctrUrrs r0rzOpVisitor.visit_call_crr2ctrUrrs r0r]zOpVisitor.visit_primitive_oprr2ctrUrrs r0rzOpVisitor.visit_truncaterr2ctrUrrs r0rzOpVisitor.visit_extendrr2ctrUrrs r0rzOpVisitor.visit_load_globalrr2ctrUrrs r0r1zOpVisitor.visit_int_oprr2ctrUrrs r0rUzOpVisitor.visit_comparison_oprr2ctrUrrs r0r^zOpVisitor.visit_float_oprr2ctrUrrs r0rfzOpVisitor.visit_float_negrr2ctrUrrs r0rrz#OpVisitor.visit_float_comparison_oprr2ctrUrrs r0rzzOpVisitor.visit_load_memrr2ctrUrrs r0rzOpVisitor.visit_set_memrr2ctrUrrs r0rzOpVisitor.visit_get_element_ptrrr2ctrUrrs r0rzOpVisitor.visit_set_elementrr2ctrUrrs r0rzOpVisitor.visit_load_addressrr2ctrUrrs r0rzOpVisitor.visit_keep_aliverr2ctrUrrs r0rzOpVisitor.visit_unborrowrr2N)rrr?r&)rrr?r&)rrr?r&)rrr?r&)rrr?r&)rrr?r&)rr_r?r&)rrgr?r&)rrnr?r&)rr}r?r&)rrr?r&)rrr?r&)rrr?r&)rrr?r&)rrr?r&)rrr?r&)rr&r?r&)rr6r?r&)rrr?r&)rrr?r&)rrr?r&)rrr?r&)rrr?r&)rrSr?r&)rrr?r&)rrr?r&)rr r?r&)rrr?r&)rr4r?r&)rrXr?r&)rrar?r&)rrhr?r&)rrur?r&)rr|r?r&)rrr?r&)rrr?r&)rrr?r&)rrr?r&)rrr?r&),rBrCrDrErrrrrrrrerlrzrrrrrrr$r3rArrrrrr]rrrr1rUr^rfrrrzrrrrrrrGr2r0rr&sE""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""r2rc"eZdZUded<ded<y) DeserMapszdict[str, ClassIR]classeszdict[str, FuncIR] functionsN)rBrCrDrXrGr2r0rrs   r2rN)vrE __future__rabcrcollections.abcrtypingrrrr r r r mypy_extensionsr mypyc.ir.rtypesrrrrrrrrrrrrrrrrrrr r!mypyc.codegen.literalsr"mypyc.ir.class_irr#mypyc.ir.func_irr$r%r&r(rHrXrJrLrNrPNO_TRACEBACK_LINE_NOrRr[rirqrwr{r~rrrr8rrrrr rrr&r6rCrSr_rgrnr}rrrrrrrrrrrrr6r)rQrrrr rr)rr2r4rXr_rarhrsrur|rrrrrrr)op_idrs00r0rs2#$SSS!.3)1 CL111j 5 5 5 E !u ,,6>u>>4e< E   e  E&) ) X*Z**,0*00B A A(9((:?*Y?*?*D*Y**:/)//>,,2+Z++(+Z++8(:((8///>1I1I1Ih"0*"0"0J4Z44< 0* 0 0F#,j#,#,L#,j#,#,N#%"#%"&E%%/%/%/P///@-z--@-z--0$(:$($(N'*''<)J))4 8 8 8H$T *+3*J3*3*l,z,,<*Z**D///68*J8*8*z38,,2D2D2FGYUBr5yG eG:1::1:1z!,j!,!,L53J334///@0*00D,. ,.,.^+,z+,+,\[" ["["n! !qHPLt$as R R* R