@@ -141,7 +141,7 @@ def visit_ModuleT(self, node):
141
141
env = self .append (ir .Alloc ([], ir .TEnvironment (node .typing_env ), name = "env" ))
142
142
old_env , self .current_env = self .current_env , env
143
143
144
- priv_env = self .append (ir .Alloc ([], ir .TEnvironment ({ ". return" : typ .ret }),
144
+ priv_env = self .append (ir .Alloc ([], ir .TEnvironment ({ "$ return" : typ .ret }),
145
145
name = "privenv" ))
146
146
old_priv_env , self .current_private_env = self .current_private_env , priv_env
147
147
@@ -181,7 +181,7 @@ def visit_function(self, node, is_lambda, is_internal):
181
181
for arg_name , default_node in zip (typ .optargs , node .args .defaults ):
182
182
default = self .visit (default_node )
183
183
env_default_name = \
184
- self .current_env .type .add ("default. " + arg_name , default .type )
184
+ self .current_env .type .add ("default$ " + arg_name , default .type )
185
185
self .append (ir .SetLocal (self .current_env , env_default_name , default ))
186
186
defaults .append (env_default_name )
187
187
@@ -217,11 +217,11 @@ def visit_function(self, node, is_lambda, is_internal):
217
217
old_env , self .current_env = self .current_env , env
218
218
219
219
if not is_lambda :
220
- priv_env = self .append (ir .Alloc ([], ir .TEnvironment ({ ". return" : typ .ret }),
220
+ priv_env = self .append (ir .Alloc ([], ir .TEnvironment ({ "$ return" : typ .ret }),
221
221
name = "privenv" ))
222
222
old_priv_env , self .current_private_env = self .current_private_env , priv_env
223
223
224
- self .append (ir .SetLocal (env , ". outer" , env_arg ))
224
+ self .append (ir .SetLocal (env , "$ outer" , env_arg ))
225
225
for index , arg_name in enumerate (typ .args ):
226
226
self .append (ir .SetLocal (env , arg_name , args [index ]))
227
227
for index , (arg_name , env_default_name ) in enumerate (zip (typ .optargs , defaults )):
@@ -267,7 +267,7 @@ def visit_Return(self, node):
267
267
if self .return_target is None :
268
268
self .append (ir .Return (return_value ))
269
269
else :
270
- self .append (ir .SetLocal (self .current_private_env , ". return" , return_value ))
270
+ self .append (ir .SetLocal (self .current_private_env , "$ return" , return_value ))
271
271
self .append (ir .Branch (self .return_target ))
272
272
273
273
def visit_Expr (self , node ):
@@ -516,30 +516,30 @@ def visit_Try(self, node):
516
516
517
517
if any (node .finalbody ):
518
518
# k for continuation
519
- final_state = self .append (ir .Alloc ([], ir .TEnvironment ({ ". k" : ir .TBasicBlock () })))
519
+ final_state = self .append (ir .Alloc ([], ir .TEnvironment ({ "$ k" : ir .TBasicBlock () })))
520
520
final_targets = []
521
521
522
522
if self .break_target is not None :
523
523
break_proxy = self .add_block ("try.break" )
524
524
old_break , self .break_target = self .break_target , break_proxy
525
- break_proxy .append (ir .SetLocal (final_state , ". k" , old_break ))
525
+ break_proxy .append (ir .SetLocal (final_state , "$ k" , old_break ))
526
526
final_targets .append (old_break )
527
527
if self .continue_target is not None :
528
528
continue_proxy = self .add_block ("try.continue" )
529
529
old_continue , self .continue_target = self .continue_target , continue_proxy
530
- continue_proxy .append (ir .SetLocal (final_state , ". k" , old_continue ))
530
+ continue_proxy .append (ir .SetLocal (final_state , "$ k" , old_continue ))
531
531
final_targets .append (old_continue )
532
532
533
533
return_proxy = self .add_block ("try.return" )
534
534
old_return , self .return_target = self .return_target , return_proxy
535
535
if old_return is not None :
536
- return_proxy .append (ir .SetLocal (final_state , ". k" , old_return ))
536
+ return_proxy .append (ir .SetLocal (final_state , "$ k" , old_return ))
537
537
final_targets .append (old_return )
538
538
else :
539
539
return_action = self .add_block ("try.doreturn" )
540
- value = return_action .append (ir .GetLocal (self .current_private_env , ". return" ))
540
+ value = return_action .append (ir .GetLocal (self .current_private_env , "$ return" ))
541
541
return_action .append (ir .Return (value ))
542
- return_proxy .append (ir .SetLocal (final_state , ". k" , return_action ))
542
+ return_proxy .append (ir .SetLocal (final_state , "$ k" , return_action ))
543
543
final_targets .append (return_action )
544
544
545
545
body = self .add_block ("try.body" )
@@ -607,19 +607,19 @@ def visit_Try(self, node):
607
607
return_proxy .append (ir .Branch (finalizer ))
608
608
609
609
if not body .is_terminated ():
610
- body .append (ir .SetLocal (final_state , ". k" , tail ))
610
+ body .append (ir .SetLocal (final_state , "$ k" , tail ))
611
611
body .append (ir .Branch (finalizer ))
612
612
613
- cleanup .append (ir .SetLocal (final_state , ". k" , reraise ))
613
+ cleanup .append (ir .SetLocal (final_state , "$ k" , reraise ))
614
614
cleanup .append (ir .Branch (finalizer ))
615
615
616
616
for handler , post_handler in handlers :
617
617
if not post_handler .is_terminated ():
618
- post_handler .append (ir .SetLocal (final_state , ". k" , tail ))
618
+ post_handler .append (ir .SetLocal (final_state , "$ k" , tail ))
619
619
post_handler .append (ir .Branch (finalizer ))
620
620
621
621
if not post_finalizer .is_terminated ():
622
- dest = post_finalizer .append (ir .GetLocal (final_state , ". k" ))
622
+ dest = post_finalizer .append (ir .GetLocal (final_state , "$ k" ))
623
623
post_finalizer .append (ir .IndirectBranch (dest , final_targets ))
624
624
else :
625
625
if not body .is_terminated ():
@@ -961,7 +961,7 @@ def visit_ListCompT(self, node):
961
961
env = self .append (ir .Alloc ([], env_type , name = "env.gen" ))
962
962
old_env , self .current_env = self .current_env , env
963
963
964
- self .append (ir .SetLocal (env , ". outer" , old_env ))
964
+ self .append (ir .SetLocal (env , "$ outer" , old_env ))
965
965
966
966
def body_gen (index ):
967
967
elt = self .iterable_get (iterable , index )
@@ -1483,7 +1483,7 @@ def instrument_assert(self, node, value):
1483
1483
for (subexpr , name ) in self .current_assert_subexprs ]):
1484
1484
return # don't display the same subexpression twice
1485
1485
1486
- name = self .current_assert_env .type .add (". subexpr" , ir .TOption (node .type ))
1486
+ name = self .current_assert_env .type .add ("$ subexpr" , ir .TOption (node .type ))
1487
1487
value_opt = self .append (ir .Alloc ([value ], ir .TOption (node .type )),
1488
1488
loc = node .loc )
1489
1489
self .append (ir .SetLocal (self .current_assert_env , name , value_opt ),
0 commit comments