mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
Patch #1550800: make exec a function.
This commit is contained in:
parent
4e472e05bd
commit
7cae87ca7b
105 changed files with 1246 additions and 1583 deletions
|
@ -1043,18 +1043,6 @@ class CodeGenerator:
|
|||
self.emit('ROT_THREE')
|
||||
self.emit('STORE_SUBSCR')
|
||||
|
||||
def visitExec(self, node):
|
||||
self.visit(node.expr)
|
||||
if node.locals is None:
|
||||
self.emit('LOAD_CONST', None)
|
||||
else:
|
||||
self.visit(node.locals)
|
||||
if node.globals is None:
|
||||
self.emit('DUP_TOP')
|
||||
else:
|
||||
self.visit(node.globals)
|
||||
self.emit('EXEC_STMT')
|
||||
|
||||
def visitCallFunc(self, node):
|
||||
pos = 0
|
||||
kw = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue