@@ -1763,7 +1763,7 @@ compiler_apply_decorators(struct compiler *c, asdl_expr_seq* decos)
1763
1763
}
1764
1764
1765
1765
static int
1766
- compiler_visit_kwonlydefaults (struct compiler * c , location loc ,
1766
+ compiler_kwonlydefaults (struct compiler * c , location loc ,
1767
1767
asdl_arg_seq * kwonlyargs , asdl_expr_seq * kw_defaults )
1768
1768
{
1769
1769
/* Push a dict of keyword-only default values.
@@ -1828,7 +1828,7 @@ compiler_visit_annexpr(struct compiler *c, expr_ty annotation)
1828
1828
}
1829
1829
1830
1830
static int
1831
- compiler_visit_argannotation (struct compiler * c , identifier id ,
1831
+ compiler_argannotation (struct compiler * c , identifier id ,
1832
1832
expr_ty annotation , Py_ssize_t * annotations_len , location loc )
1833
1833
{
1834
1834
if (!annotation ) {
@@ -1862,14 +1862,14 @@ compiler_visit_argannotation(struct compiler *c, identifier id,
1862
1862
}
1863
1863
1864
1864
static int
1865
- compiler_visit_argannotations (struct compiler * c , asdl_arg_seq * args ,
1866
- Py_ssize_t * annotations_len , location loc )
1865
+ compiler_argannotations (struct compiler * c , asdl_arg_seq * args ,
1866
+ Py_ssize_t * annotations_len , location loc )
1867
1867
{
1868
1868
int i ;
1869
1869
for (i = 0 ; i < asdl_seq_LEN (args ); i ++ ) {
1870
1870
arg_ty arg = (arg_ty )asdl_seq_GET (args , i );
1871
1871
RETURN_IF_ERROR (
1872
- compiler_visit_argannotation (
1872
+ compiler_argannotation (
1873
1873
c ,
1874
1874
arg -> arg ,
1875
1875
arg -> annotation ,
@@ -1880,39 +1880,39 @@ compiler_visit_argannotations(struct compiler *c, asdl_arg_seq* args,
1880
1880
}
1881
1881
1882
1882
static int
1883
- compiler_visit_annotations_in_scope (struct compiler * c , location loc ,
1884
- arguments_ty args , expr_ty returns ,
1885
- Py_ssize_t * annotations_len )
1883
+ compiler_annotations_in_scope (struct compiler * c , location loc ,
1884
+ arguments_ty args , expr_ty returns ,
1885
+ Py_ssize_t * annotations_len )
1886
1886
{
1887
1887
RETURN_IF_ERROR (
1888
- compiler_visit_argannotations (c , args -> args , annotations_len , loc ));
1888
+ compiler_argannotations (c , args -> args , annotations_len , loc ));
1889
1889
1890
1890
RETURN_IF_ERROR (
1891
- compiler_visit_argannotations (c , args -> posonlyargs , annotations_len , loc ));
1891
+ compiler_argannotations (c , args -> posonlyargs , annotations_len , loc ));
1892
1892
1893
1893
if (args -> vararg && args -> vararg -> annotation ) {
1894
1894
RETURN_IF_ERROR (
1895
- compiler_visit_argannotation (c , args -> vararg -> arg ,
1895
+ compiler_argannotation (c , args -> vararg -> arg ,
1896
1896
args -> vararg -> annotation , annotations_len , loc ));
1897
1897
}
1898
1898
1899
1899
RETURN_IF_ERROR (
1900
- compiler_visit_argannotations (c , args -> kwonlyargs , annotations_len , loc ));
1900
+ compiler_argannotations (c , args -> kwonlyargs , annotations_len , loc ));
1901
1901
1902
1902
if (args -> kwarg && args -> kwarg -> annotation ) {
1903
1903
RETURN_IF_ERROR (
1904
- compiler_visit_argannotation (c , args -> kwarg -> arg ,
1904
+ compiler_argannotation (c , args -> kwarg -> arg ,
1905
1905
args -> kwarg -> annotation , annotations_len , loc ));
1906
1906
}
1907
1907
1908
1908
RETURN_IF_ERROR (
1909
- compiler_visit_argannotation (c , & _Py_ID (return ), returns , annotations_len , loc ));
1909
+ compiler_argannotation (c , & _Py_ID (return ), returns , annotations_len , loc ));
1910
1910
1911
1911
return 0 ;
1912
1912
}
1913
1913
1914
1914
static int
1915
- compiler_visit_annotations (struct compiler * c , location loc ,
1915
+ compiler_annotations (struct compiler * c , location loc ,
1916
1916
arguments_ty args , expr_ty returns )
1917
1917
{
1918
1918
/* Push arg annotation names and values.
@@ -1938,7 +1938,7 @@ compiler_visit_annotations(struct compiler *c, location loc,
1938
1938
}
1939
1939
Py_DECREF (ste );
1940
1940
1941
- if (compiler_visit_annotations_in_scope (c , loc , args , returns , & annotations_len ) < 0 ) {
1941
+ if (compiler_annotations_in_scope (c , loc , args , returns , & annotations_len ) < 0 ) {
1942
1942
if (annotations_used ) {
1943
1943
compiler_exit_scope (c );
1944
1944
}
@@ -1956,7 +1956,7 @@ compiler_visit_annotations(struct compiler *c, location loc,
1956
1956
}
1957
1957
1958
1958
static int
1959
- compiler_visit_defaults (struct compiler * c , arguments_ty args ,
1959
+ compiler_defaults (struct compiler * c , arguments_ty args ,
1960
1960
location loc )
1961
1961
{
1962
1962
VISIT_SEQ (c , expr , args -> defaults );
@@ -1970,13 +1970,13 @@ compiler_default_arguments(struct compiler *c, location loc,
1970
1970
{
1971
1971
Py_ssize_t funcflags = 0 ;
1972
1972
if (args -> defaults && asdl_seq_LEN (args -> defaults ) > 0 ) {
1973
- RETURN_IF_ERROR (compiler_visit_defaults (c , args , loc ));
1973
+ RETURN_IF_ERROR (compiler_defaults (c , args , loc ));
1974
1974
funcflags |= MAKE_FUNCTION_DEFAULTS ;
1975
1975
}
1976
1976
if (args -> kwonlyargs ) {
1977
- int res = compiler_visit_kwonlydefaults (c , loc ,
1978
- args -> kwonlyargs ,
1979
- args -> kw_defaults );
1977
+ int res = compiler_kwonlydefaults (c , loc ,
1978
+ args -> kwonlyargs ,
1979
+ args -> kw_defaults );
1980
1980
RETURN_IF_ERROR (res );
1981
1981
if (res > 0 ) {
1982
1982
funcflags |= MAKE_FUNCTION_KWDEFAULTS ;
@@ -2342,7 +2342,7 @@ compiler_function(struct compiler *c, stmt_ty s, int is_async)
2342
2342
}
2343
2343
}
2344
2344
2345
- int annotations_flag = compiler_visit_annotations (c , loc , args , returns );
2345
+ int annotations_flag = compiler_annotations (c , loc , args , returns );
2346
2346
if (annotations_flag < 0 ) {
2347
2347
if (is_generic ) {
2348
2348
compiler_exit_scope (c );
@@ -6111,7 +6111,7 @@ compiler_with(struct compiler *c, stmt_ty s, int pos)
6111
6111
}
6112
6112
6113
6113
static int
6114
- compiler_visit_expr1 (struct compiler * c , expr_ty e )
6114
+ compiler_visit_expr (struct compiler * c , expr_ty e )
6115
6115
{
6116
6116
location loc = LOC (e );
6117
6117
switch (e -> kind ) {
@@ -6280,13 +6280,6 @@ compiler_visit_expr1(struct compiler *c, expr_ty e)
6280
6280
return SUCCESS ;
6281
6281
}
6282
6282
6283
- static int
6284
- compiler_visit_expr (struct compiler * c , expr_ty e )
6285
- {
6286
- int res = compiler_visit_expr1 (c , e );
6287
- return res ;
6288
- }
6289
-
6290
6283
static bool
6291
6284
is_two_element_slice (expr_ty s )
6292
6285
{
0 commit comments