| Server IP : 217.160.0.135 / Your IP : 216.73.216.115 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/pythran/optimizations/__pycache__/ |
Upload File : |
�
cR�a� � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZm
Z
ddlmZ dd lmZ dd
lZ G d� de� � Zd
S )
z; Expand some builtins implementation when it is profitable.� )�Aliases)�PureExpressions)�Transformation)�MODULES)�FunctionIntr)�path_to_attr�path_to_node)�PythranSyntaxError)�deepcopyNc �Z � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� Zd� Z
d� Zd
� ZdS )�InlineBuiltinsa(
Replace some builtins by their bodies.
This may trigger some extra optimizations later on!
>>> import gast as ast
>>> from pythran import passmanager, backend
>>> pm = passmanager.PassManager("test")
>>> node = ast.parse('''
... def foo(a):
... return a + 1
... def bar(b):
... return builtins.map(bar, (1, 2))''')
>>> _, node = pm.apply(InlineBuiltins, node)
>>> print(pm.dump(backend.Python, node))
def foo(a):
return (a + 1)
def bar(b):
return [bar(1), bar(2)]
c �F � t j | t t � � d S �N)r �__init__r r )�selfs �G/usr/lib/python3/dist-packages/pythran/optimizations/inline_builtins.pyr zInlineBuiltins.__init__&