aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.h
diff options
context:
space:
mode:
authorYizhe <yizhe@pku.edu.cn>2021-02-25 18:41:43 +0000
committerPhilip Herron <herron.philip@googlemail.com>2021-03-01 10:42:27 +0000
commit6c5b2a63268212f63ab04f17b71c2abcc6aecefc (patch)
treee2e2dccfa2d6b9fd1960b6d0fafbc356d8eda34c /gcc/rust/backend/rust-compile-expr.h
parent63dabd8161f5d5c22a796286fb0c366742444c6e (diff)
downloadgcc-6c5b2a63268212f63ab04f17b71c2abcc6aecefc.zip
gcc-6c5b2a63268212f63ab04f17b71c2abcc6aecefc.tar.gz
gcc-6c5b2a63268212f63ab04f17b71c2abcc6aecefc.tar.bz2
Rewrite backend to accept the new enum
Gcc_backend::unary_expression and Gcc_backend::binary_expression has been split into 4 smaller functions corresponding to the 4 enums. It turns out that keeping the 4 enums distinct helps simplify the logic a lot. A lot of if-else branches were eliminated just by inlining the type infomation. There were also some minor cleanup. `operator_to_tree_code` function has been modified to omit the `tree` parameter and offload floating-point check to the caller.
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
0 files changed, 0 insertions, 0 deletions