]> gcc.gnu.org Git - gcc.git/commitdiff
Merge #805
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Wed, 17 Nov 2021 21:22:20 +0000 (21:22 +0000)
committerGitHub <noreply@github.com>
Wed, 17 Nov 2021 21:22:20 +0000 (21:22 +0000)
805: Remove Btype, Bexpression, etc. abstractions over gcc trees r=CohenArthur a=dafaust

As discussed in #412, the Rust front end inherits an abstraction over gcc from the initial bootstrap via GCCGO.
This is a cool idea, but adds overhead for the primary goal of gcc compiling Rust. It's not clear that the benefits of maintaining the abstraction are worth the potential extra headaches of maintaining it.

I figured for the sake of discussion, I'd draft an initial step towards removing this abstraction.

The implementations of classes `Bytpe`, `Bexpression`, `Bstatement`, `Bfunction`, and `Bblock` are only wrappers around gcc's GENERIC `tree` structure, with no added functionality. This PR removes them, and changes all the functions for creating and manipulating these abstract types to just use/return `tree` instead. I also deleted a few functions that are vestiges from GCCGO port and aren't used.

Personally, I think the abstraction should be removed in favor of using `tree`s. This is more in line with the other gcc front ends and makes the interface between the frontend and the rest of gcc simpler.

I'm curious to hear other opinions on the matter :)

Addresses: #412

Co-authored-by: David Faust <david.faust@oracle.com>

Trivial merge
This page took 0.079836 seconds and 5 git commands to generate.