Skip to content
Snippets Groups Projects
Commit afa987d3 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Issue operator/ for integer division

parent e47c7a01
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,14 @@ class DuneExpressionToCExpressionMapper(ExpressionToCExpressionMapper): ...@@ -38,6 +38,14 @@ class DuneExpressionToCExpressionMapper(ExpressionToCExpressionMapper):
else: else:
return ExpressionToCExpressionMapper.map_subscript(self, expr, type_context) return ExpressionToCExpressionMapper.map_subscript(self, expr, type_context)
def map_floor_div(self, expr, enclosing_prec):
# Loopy generates floor divs via a macro int_floor_div_pos_b
# I have no idea why it does this and would like to generate
# operator/ instead. At some point, I should ask Andreas about
# the intention of that macro. Returning expr will pass this into
# the CExpressionToCodeMapper as is => operator/.
return expr
class DuneCExpressionToCodeMapper(CExpressionToCodeMapper): class DuneCExpressionToCodeMapper(CExpressionToCodeMapper):
def map_remainder(self, expr, enclosing_prec): def map_remainder(self, expr, enclosing_prec):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment