public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #805
@ 2022-06-08 11:52 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 11:52 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:63fc39600ce2640e9c4d07e00e162c2529b1820a

commit 63fc39600ce2640e9c4d07e00e162c2529b1820a
Merge: 5514d9cec51 5c87e61f96e
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date:   Wed Nov 17 21:22:20 2021 +0000

    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>

Diff:

 gcc/rust/backend/rust-compile-base.h              |   18 +-
 gcc/rust/backend/rust-compile-block.h             |   15 +-
 gcc/rust/backend/rust-compile-context.h           |  191 ++-
 gcc/rust/backend/rust-compile-expr.cc             |   45 +-
 gcc/rust/backend/rust-compile-expr.h              |  187 ++-
 gcc/rust/backend/rust-compile-extern.h            |   12 +-
 gcc/rust/backend/rust-compile-fnparam.h           |   16 +-
 gcc/rust/backend/rust-compile-implitem.h          |   71 +-
 gcc/rust/backend/rust-compile-intrinsic.cc        |    4 +-
 gcc/rust/backend/rust-compile-intrinsic.h         |    2 +-
 gcc/rust/backend/rust-compile-item.h              |   37 +-
 gcc/rust/backend/rust-compile-resolve-path.cc     |    8 +-
 gcc/rust/backend/rust-compile-resolve-path.h      |   21 +-
 gcc/rust/backend/rust-compile-stmt.h              |   14 +-
 gcc/rust/backend/rust-compile-struct-field-expr.h |    4 +-
 gcc/rust/backend/rust-compile-tyty.h              |   16 +-
 gcc/rust/backend/rust-compile-var-decl.h          |    9 +-
 gcc/rust/backend/rust-compile.cc                  |  107 +-
 gcc/rust/rust-backend.h                           |  454 +++----
 gcc/rust/rust-gcc.cc                              | 1442 ++++++++-------------
 gcc/rust/typecheck/rust-hir-const-fold-ctx.h      |    6 +-
 gcc/rust/typecheck/rust-hir-const-fold.cc         |   20 +-
 gcc/rust/typecheck/rust-hir-const-fold.h          |   38 +-
 gcc/rust/typecheck/rust-hir-type-check-expr.h     |    7 +-
 gcc/rust/typecheck/rust-tyty.h                    |    8 +-
 25 files changed, 1088 insertions(+), 1664 deletions(-)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-08 11:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 11:52 [gcc/devel/rust/master] Merge #805 Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).