mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Get rid of last vestiges of BINARY_DIVIDE.
This commit is contained in:
parent
e4993c7ac7
commit
c6d210ca76
6 changed files with 3 additions and 29 deletions
|
@ -206,14 +206,12 @@ class CodeGenerator:
|
|||
self.setups = misc.Stack()
|
||||
self.last_lineno = None
|
||||
self._setupGraphDelegation()
|
||||
self._div_op = "BINARY_DIVIDE"
|
||||
|
||||
# XXX set flags based on future features
|
||||
futures = self.get_module().futures
|
||||
for feature in futures:
|
||||
if feature == "division":
|
||||
self.graph.setFlag(CO_FUTURE_DIVISION)
|
||||
self._div_op = "BINARY_TRUE_DIVIDE"
|
||||
elif feature == "absolute_import":
|
||||
self.graph.setFlag(CO_FUTURE_ABSIMPORT)
|
||||
elif feature == "with_statement":
|
||||
|
@ -1177,7 +1175,7 @@ class CodeGenerator:
|
|||
return self.binaryOp(node, 'BINARY_MULTIPLY')
|
||||
|
||||
def visitDiv(self, node):
|
||||
return self.binaryOp(node, self._div_op)
|
||||
return self.binaryOp(node, 'BINARY_TRUE_DIVIDE')
|
||||
|
||||
def visitFloorDiv(self, node):
|
||||
return self.binaryOp(node, 'BINARY_FLOOR_DIVIDE')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue