³ò
Ï‘RMc        E   @   s¼	  d  d k  Z  d  d k Z d  d k Z d  d k Z d  d k l Z l Z l Z l Z d  d k l	 Z	 l
 Z
 l Z l Z d  d k l Z d  d k l Z e i i e ƒ i ƒ  i ƒ  i d ƒ Z g  Z e i ƒ  D]W Z e i d e d e ƒ o8 e i d	 ƒ i ƒ  o" e i i d
 ƒ o e e i qÌ qÌ [ Z e i  d d d d d d g ƒ Z! e! i" ƒ  Z# e# i$ e i  d d d d d d d d d d d d d d d d  d! d" d# g ƒ ƒ e# i" ƒ  Z% e% i$ e i  d$ d% d& d' d( d) d* d+ d, d- d d. d/ d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d: d; d< d= d> d? d@ dA g ƒ ƒ e# i" ƒ  Z& e& i$ e i  d' d) d* d d. d0 d2 dB d7 d= g
 ƒ ƒ e# i" ƒ  Z' e' i$ e i  d4 d5 d7 d9 g ƒ ƒ e i( dC j o4 d e% dD <e% d- =e% d' =e% d/ =e% d6 =d e# d( <n e i( dE j o. e% d& =e% d) =e% d =e% d' =e% d6 =e% d/ =n h  dF e f dG e f g d@ <Z* h  dH e f g d. <dç dJ e i( dC j f g d< <dK e f g dL <Z+ h  dM g d. <dM g dL <dN g d0 <dO g d1 <dP g d: <dQ g d; <dQ g d3 <dR g d6 <Z, dS „  Z- e dT dU e	 dV dW dX dY dZ d[ d\ g dX d] d^ ƒe d_ d` e da db dc e dd de e f g ƒe df dg dc e ƒg ƒ e dh di dc e dd dj e f dk e f dl e f g d] dm ƒe dn do g  Z. e D]r Z/ e. e e/ dp e/ f dc e/ e# j d] dq e/ f dd e* i0 e/ g  ƒ dr e+ i0 e/ g  ƒ ds e/ e! j dt e- e/ ƒ ƒq®[. ƒ e du dv dc e d] dw ds e ƒe dx dy dc e d] dz dr d{ e f g ƒe d| d} dc e ƒe d~ d dc e ƒe d€ d dc e ƒe d‚ dƒ dc e dd d„ e f g ƒe
 d… d† d] d‡ dc d ƒe dˆ d‰ dc e ƒe dŠ d‹ dc e ƒe dŒ d dc e ƒe dX dŽ e d d dc e ƒe d‘ d’ dc e dd d“ e f d” e f g ƒe d• d– dc e ƒe d— d˜ dc d™ d] dš ƒe d› dœ dc d d] dž ƒe dŸ d  dc e dd d¡ e f g ƒe d¢ d£ dc e ƒe d¤ d¥ dc e ƒe d¦ d§ dc e ƒe d¨ d© dc e ƒe dª d« dc e ƒe d¬ d­ dc e dd d® e f d¯ e f d° e f g dr d± e f d² e f g ƒe d³ d´ dc e dd dµ e f g ƒe d¶ d· dc e dd d¸ e f d¹ e f g ƒe dº d» dc e ƒe d¼ d½ dc e dd d¾ e f d¿ e f g ƒe dÀ dÁ dc e ƒe dÂ dÃ d] d dc e dd dÄ e f g ƒe dÅ dÆ dc e dd d¿ e f dÄ e f g ƒe dÇ dÈ dc e dd dÉ e f g ƒe dÊ dË dc dÌ ƒe dÍ dÎ dc e ƒe dÏ dÐ dc e ƒe dÑ dÒ dc e ƒe dÓ dÔ dc e ƒe dÕ dÖ dc e ƒe d× dØ dc e ƒe dÙ dÚ dc e ƒe	 dÛ dÜ dÝ dÞ g dc dÞ ƒe dß dà dc e dd dá e f g ƒg ƒ g ƒ Z1 d e dâ „ Z2 dã „  Z3 dä „  Z4 då „  Z5 e6 dæ j o; e2 ƒ  Z7 e7 i8 ƒ  GHe e7 ƒ Z9 e9 i: ƒ  \ Z; Z< e7 GHn d S(è   iÿÿÿÿN(   t   OptionDescriptiont
   BoolOptiont	   IntOptiont   ArbitraryOption(   t   ChoiceOptiont	   StrOptiont   to_optparset   Config(   t   ConflictConfigError(   t
   IS_64_BITSt   modulet   dirt   dotfiles   __init__.pyt   testt
   exceptionst   _filet   syst   __builtin__t   posixt   signalt   _codecst   gct   _weakreft   marshalt   errnot   impt   matht   cmatht   _sret   _pickle_supportt   operatort   parsert   symbolt   tokent   _astt   _iot   _randomt   __pypy__t   _testingt   _sockett   unicodedatat   mmapt   fcntlt   _localet   rctimet   selectt	   zipimportt   _lsproft   cryptt   _rawffit   termiost   zlibt   bz2t   structt   _hashlibt   _md5t   _shat   _minimal_cursest	   cStringIOt   threadt	   itertoolst   pyexpatt   _sslt   cpyextt   arrayt   _bisectt   binasciit   _multiprocessingt	   _warningst   md5t   win32t   _winregt   sunos5s   objspace.usemodules.rctimes   objspace.usemodules.threads   objspace.usemodules.structs    translation.secondaryentrypointss   translation.shareds   translation.jit_ffit   _ffis   pypy.rlib.clibffis   pypy.rlib.rzlibs   pypy.module.bz2.interp_bz2s"   pypy.module.pyexpat.interp_pyexpats   pypy.module._ssl.interp_ssls%   pypy.module._minimal_curses.fficursesc            s9   ˆ  t  j o$ t  ˆ  ‰ ‡  ‡ f d †  } | Sn d  Sd  S(   Nc            sŸ   d d k  l } y x ˆ D] } t | ƒ q WWni t | f j
 oW } | i i } |  i d ˆ  f d | | f t | ƒ ƒ t d ˆ  | f ƒ ‚ n Xd  S(   Niÿÿÿÿ(   t   CompilationErrors   The module %r is disabled
s   because importing %s raised %s
s   --withmod-%s: %s(	   t   pypy.rpython.tool.rffi_platformRJ   t
   __import__t   ImportErrort	   __class__t   __name__t   add_warningt   strR   (   t   configRJ   t   namet   et   errcls(   t   modnamet   modlist(    s*   /64/home/arigo/u/pypy/config/pypyoption.pyt	   validatorf   s     	(   t   module_import_dependenciest   None(   RV   RX   (    (   RV   RW   s*   /64/home/arigo/u/pypy/config/pypyoption.pyt   get_module_validatorc   s
    
t   objspaces   Object Space OptionsRS   s   Object Space namet   stdt   flowt   thunkt   dumpt   taintt   cmdlines   --objspace -ot   opcodess$   opcodes to enable in the interpretert   CALL_LIKELY_BUILTINs=   emit a special bytecode for likely calls to builtin functionst   defaultt   requiress   translation.stacklesst   CALL_METHODs'   emit a special bytecode for expr.name()t   nofakings#   disallow faking in the object spaces   objspace.usemodules.posixs   objspace.usemodules.times   objspace.usemodules.errnos
   --nofakingt
   usemoduless   Which Modules should be useds   use module %ss   --withmod-%st   suggestst   negationRX   t   allworkingmoduless'   use as many working modules as possibles   --allworkingmodulest   translationmodulessB   use only those modules that are needed to run translate.py on pypys   --translationmoduless   objspace.allworkingmodulest	   geninterps(   specify whether geninterp should be usedt   logbytecodess   keep track of bytecode usaget   usepycfiless'   Write and read pyc files when importingt   lonepycfiless)   Import pyc files with no matching py files   objspace.usepycfilest   soabisN   Tag to differentiate extension modules built for different Python interpreterss   --soabit   honor__builtins__s1   Honor the __builtins__ key of a module dictionaryt   disable_call_speedhackss3   make sure that all calls go through space.call_argst   timings=   timing of various parts of the interpreter (simple profiling)s   Standard Object Space Optionst
   withtproxys   support transparent proxiest   withsmallints   use tagged integerss   objspace.std.withprebuiltints   translation.taggedpointerst   withprebuiltints"   prebuild commonly used int objectst   prebuiltintfroms    lowest integer which is prebuiltiûÿÿÿs   --prebuiltintfromt   prebuiltinttos!   highest integer which is prebuiltid   s   --prebuiltinttot   withsmalllongs(   use a version of 'long' in a C long longs   objspace.std.withsmallintt   withstrjoins"   use strings optimized for additiont   withstrslices!   use strings optimized for slicingt
   withstrbufs*   use strings optimized for addition (ver 2)t   withprebuiltchars,   use prebuilt single-character string objectst   sharesmallstrs_   always reuse the prebuilt string objects (the empty string and potentially single-char strings)t   withropes&   use ropes as the string implementations   objspace.std.withstrslices   objspace.std.withstrjoins   objspace.std.withstrbufs   objspace.std.withprebuiltchars   objspace.std.sharesmallstrt   withropeunicodes(   use ropes for the unicode implementations   objspace.std.withropet   withcelldictsB   use dictionaries that are optimized for being used as module dictss$   objspace.opcodes.CALL_LIKELY_BUILTINs   objspace.honor__builtins__t   withdictmeasurements?   create huge files with masses of information about dictionariest   withmapdicts4   make instances really small but slow without the JITs!   objspace.std.getattributeshortcuts   objspace.std.withtypeversiont   withrangelistsx   enable special range list implementation that does not actually create the full list until the resulting list is mutatedt   withtypeversions'   version type objects when changing thems   translation.rweakreft   withmethodcaches   try to cache method lookupst   withmethodcachecountersR   try to cache methods and provide a counter in __pypy__. for testing purposes only.s   objspace.std.withmethodcachet   methodcachesizeexps@    2 ** methodcachesizeexp is the size of the of the method cache i   t   optimized_int_adds7   special case the addition of two integers in BINARY_ADDt   optimized_comparison_ops'   special case the comparison of integerst   optimized_list_getitems,   special case the 'list[integer]' expressionst   builtinshortcuts0   a shortcut for operations between built-in typest   getattributeshortcuts*   track types that override __getattribute__t   newshortcuts5   cache and shortcut calling __new__ from builtin typest   logspaceoptypessX   a instrumentation option: before exit, print the types seen by certain simpler bytecodest   multimethodss%   the multimethod implementation to uset   doubledispatcht   mrdt   mutable_builtintypess#   Allow the changing of builtin typess   objspace.std.builtinshortcutc         C   s&   d d k  l } | t d |  d | ƒS(   Niÿÿÿÿ(   t   get_combined_translation_configt	   overridest   translating(   t   pypy.config.translationoptionR–   t   pypy_optiondescription(   R—   R˜   R–   (    (    s*   /64/home/arigo/u/pypy/config/pypyoption.pyt   get_pypy_configH  s    c         C   s‡  |  i  i } |  i  i } | d j o |  i i i d t ƒ n | d j oÕ |  i i i d t ƒ |  i i i d t ƒ |  i i i d t ƒ |  i i i d t ƒ |  i i i d	 t ƒ |  i i i d
 t ƒ |  i i i d t ƒ |  i i i d t ƒ t p |  i i i d t ƒ q!n | d j o |  i  i d d ƒ n | d j o© |  i i i d t ƒ |  i i i d t ƒ |  i i i d t ƒ |  i i i d t ƒ |  i i i d t ƒ |  i i i d t ƒ t p |  i i i d t ƒ qûn | d j o |  i i d t	 ƒ n | d j o |  i i i d d ƒ n | d j o0 |  i i i d t ƒ |  i i i d t ƒ n d S(   s’   Apply PyPy-specific optimization suggestions on the 'config'.
    The optimizations depend on the selected level and possibly on the backend.
    t   2t   3Rd   t   jitRg   R†   Rˆ   R   RŽ   R   R   R   R{   t   profoptsO   -c 'from richards import main;main(); from test import pystone; pystone.main()'t   memRx   R…   R}   R|   t   0Rn   t   ootypeR’   R“   Rƒ   N(   Rœ   R   (   Rœ   R   s   jit(
   t   translationt   type_systemt   backendR\   Rc   t   suggestt   TrueR]   R	   t   False(   RR   t   levelR¤   R¥   (    (    s*   /64/home/arigo/u/pypy/config/pypyoption.pyt   set_pypy_opt_levelN  sD    c         C   s   |  i  i d j o
 t } n t } |  i  i o
 t } n g  } | D] } | t j o | | qE qE ~ } |  i i i	 t
 i | t ƒ   d  S(   NR¢   (   R£   R¤   t   working_oo_modulest   working_modulest   sandboxt   default_modulest   essential_modulesR\   Ri   R¦   t   dictt   fromkeysR§   (   RR   t   modulest   _[1]RS   (    (    s*   /64/home/arigo/u/pypy/config/pypyoption.pyt   enable_allworkingmodules†  s    

2c         C   s[   t  } g  } | D] } | t j o | | q q ~ } |  i i i t i | t ƒ   d  S(   N(   t   translation_modulesR¯   R\   Ri   R¦   R°   R±   R§   (   RR   R²   R³   RS   (    (    s*   /64/home/arigo/u/pypy/config/pypyoption.pyt   enable_translationmodules’  s    2t   __main__(   s    translation.secondaryentrypointss   cpyext(=   t   autopatht   pyt   osR   t   pypy.config.configR    R   R   R   R   R   R   R   R   R™   R	   t   patht   localt   __file__t   dirpatht   joint
   modulepathR³   t   listdirt   pt   checkR§   R¨   t   basenamet
   startswitht   all_modulesR°   R±   R¯   t   copyR®   t   updateR¬   Rµ   R«   t   platformRZ   t   module_dependenciest   module_suggestsRY   R[   t   _[2]RV   t   getRš   R›   Rª   R´   R¶   RO   RR   t   getpathsR   t
   parse_argst   optiont   args(    (    (    s*   /64/home/arigo/u/pypy/config/pypyoption.pys   <module>   sÄ  ""'+
																		8			
