]> gcc.gnu.org Git - gcc.git/commit
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)
commit63fc39600ce2640e9c4d07e00e162c2529b1820a
tree7bd431f6cd496e67e3ac8947f975a636093a1485
parent5514d9cec51d5ec7cc30dd6cdbfadfdddbe0aab3
parent5c87e61f96e0b394ce406bf9967c92708a16becc
Merge #805

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>
This page took 0.085538 seconds and 6 git commands to generate.