[committed 84/88] gccrs: ast: Refactor TraitItem to keep Location info

2023-04-05 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast.h: Keep location in TraitItem base class * ast/rust-item.h (class TraitItemFunc): Use base class location instead. (class TraitItemMethod): Likewise. (class TraitItemConst): Likewise. (class

[committed 82/88] gccrs: rename rust-hir-full-tests.cc

2023-04-05 Thread arthur . cohen
From: SainiAditya1 gcc/rust/Changelog: * hir/tree/rust-hir-full-test.cc: Moved to... * hir/tree/rust-hir.cc: ...here. * Make-lang.in: Rename rust-hir-full-test. Signed-off-by: SainiAditya1 --- gcc/rust/Make-lang.in| 2 +- gcc/rust/hi

[committed 86/88] gccrs: Added AST Node AST::InlineAsm

2023-04-05 Thread arthur . cohen
From: M V V S Manoj Kumar Addresses #1567 Created a AST node InlineAsm similar to the one found in rustc. As there is no Symbol struct/class in gccrs I have made every instance of Symbol a string. gcc/rust/ChangeLog: * ast/rust-ast-full-decls.h (class InlineAsm):Added class declaration.

[committed 40/88] gccrs: Refactor BaseType, InferType and ErrorType impl into cc file

2023-04-05 Thread arthur . cohen
From: Philip Herron Signed-off-by: Philip Herron gcc/rust/ChangeLog: * typecheck/rust-tyty.cc (BaseType::BaseType): refactor (BaseType::~BaseType): likewise (BaseType::get_ref): likewise (BaseType::set_ref): likewise (BaseType::get_ty_ref): likewise

[committed 39/88] gccrs: Refactor all substitution mapper code implementation into its own CC file

2023-04-05 Thread arthur . cohen
From: Philip Herron Signed-off-by: Philip Herron gcc/rust/ChangeLog: * typecheck/rust-substitution-mapper.cc (SubstMapper::SubstMapper): refactor (SubstMapper::Resolve): likewise (SubstMapper::InferSubst): likewise (SubstMapper::have_generic_args): likewise

[committed 44/88] gccrs: Rename rust-tyctx.cc to rust-typecheck-context.cc

2023-04-05 Thread arthur . cohen
From: Philip Herron Signed-off-by: Philip Herron gcc/rust/ChangeLog: * Make-lang.in: update name * typecheck/rust-tyctx.cc: Moved to... * typecheck/rust-typecheck-context.cc: ...here. --- gcc/rust/Make-lang.in | 2 +- gcc/rust/

[committed 45/88] gccrs: Rename header rust-hir-trait-ref.h to rust-hir-trait-reference.h

2023-04-05 Thread arthur . cohen
From: Philip Herron Signed-off-by: Philip Herron gcc/rust/ChangeLog: * typecheck/rust-hir-trait-ref.h: Moved to... * typecheck/rust-hir-trait-reference.h: ...here. * typecheck/rust-hir-trait-resolve.cc: refactor * typecheck/rust-hir-trait-resolve.h (RUST_HIR_TRA

[committed 54/88] gccrs: Remove bad error message on checking function arguments

2023-04-05 Thread arthur . cohen
From: Philip Herron Signed-off-by: Philip Herron gcc/rust/ChangeLog: * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): remove error message gcc/testsuite/ChangeLog: * rust/compile/func3.rs: update test case --- gcc/rust/typecheck/rust-tyty-call.cc | 5 - gcc/tes

[committed 42/88] gccrs: Refactor PathProbeType code into CC file

2023-04-05 Thread arthur . cohen
From: Philip Herron Signed-off-by: Philip Herron gcc/rust/ChangeLog: * typecheck/rust-hir-path-probe.cc (PathProbeCandidate::Candidate::Candidate): refactor (PathProbeCandidate::PathProbeCandidate): likewise (PathProbeCandidate::as_string): likewise (PathProbeC

[committed 61/88] gccrs: expander: Add documentation for `expand_eager_invocations`

2023-04-05 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-macro-expand.cc (MacroExpander::expand_eager_invocations): Add documentation explaining the algorithm. --- gcc/rust/expand/rust-macro-expand.cc | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git

[committed 64/88] gccrs: Update copyright years.

2023-04-05 Thread arthur . cohen
From: Thomas Schwinge gcc/rust/ChangeLog: * ast/rust-ast-fragment.cc: Update copyright years. * ast/rust-ast-fragment.h: Likewise. * ast/rust-macro.cc: Likewise. * checks/errors/rust-feature-gate.cc: Likewise. * checks/errors/rust-feature-gate.h: Likewise.

[committed 50/88] gccrs: Refactor the type unification code

2023-04-05 Thread arthur . cohen
From: Philip Herron This refactors the unification systems to be a consistent interface using switch statements and simple functions instead of the old clunky visitor system. This is more maintainable as it is harder to miss cases when we can take advantages of switch statements. Signed-off-by:

[committed 59/88] gccrs: expansion: Add `get_token_slice` to `MacroInvocLexer` class

2023-04-05 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-macro-invoc-lexer.cc (MacroInvocLexer::get_token_slice): Add API to retrieve token slices when lexing macro expansions. * expand/rust-macro-invoc-lexer.h: Declare `get_token_slice`. --- gcc/rust/expand/rust-macro

[committed 73/88] gccrs: Extract query_type from TypeCheckBase to be a simple extern

2023-04-05 Thread arthur . cohen
From: Philip Herron Signed-off-by: Philip Herron gcc/rust/ChangeLog: * Make-lang.in: add new dependancy * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::query_type): refactor * typecheck/rust-hir-type-check-base.h: refactor * typecheck/rust-hir-type-chec

[committed 77/88] gccrs: Add trailing newline

2023-04-05 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * checks/errors/rust-feature-gate.h: Add trailing newline before EOF. Signed-off-by: Owen Avery --- gcc/rust/checks/errors/rust-feature-gate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rust/checks/errors/rust-feature-g

[committed 75/88] gccrs: Support for Sized builtin marker trait

2023-04-05 Thread arthur . cohen
From: Philip Herron When implementing general bounds checking as part of unify calls, we did not check associated types on bounds which lead to alot of missed error checking. This now recursively checks the bounds and the associated types with a decent error message. This also required us to impl

[committed 80/88] gccrs: Add AST::AltPattern class

2023-04-05 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * ast/rust-ast-dump.cc (Dump::visit): Add AltPattern visitor. * ast/rust-ast-dump.h: (Dump::visit): Add AltPattern visitor. * ast/rust-ast-full-decls.h (class AltPattern): Add declaration. * ast/rust-ast

[committed 83/88] gccrs: add test case to show our query-type system is working

2023-04-05 Thread arthur . cohen
From: Philip Herron Fixes #1361 Signed-off-by: Philip Herron gcc/testsuite/ChangeLog: * rust/compile/issue-1361.rs: New test. --- gcc/testsuite/rust/compile/issue-1361.rs | 8 1 file changed, 8 insertions(+) create mode 100644 gcc/testsuite/rust/compile/issue-1361.rs diff

[committed 85/88] gccrs: diagnostic: Refactor Error class

2023-04-05 Thread arthur . cohen
From: Arthur Cohen The class now allows for more variants including a `Hint` one which then gets emitted by calling `rust_inform`. This allows us to display hints/tips/notes in backtracking contexts such as the parser. gcc/rust/ChangeLog: * rust-diagnostics.h (struct Error): Add new

[committed 88/88] gccrs: Fix issue with parsing unsafe block expression statements

2023-04-05 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_stmt): Handle unsafe expression statements. gcc/testsuite/ChangeLog: * rust/compile/issue-1422.rs: New test. Signed-off-by: Owen Avery --- gcc/rust/parse/rust-parse-impl.h | 10

[committed 76/88] gccrs: Fix regression in testcase

2023-04-05 Thread arthur . cohen
From: Philip Herron Fixes #776 Signed-off-by: Philip Herron gcc/testsuite/ChangeLog: * rust/compile/torture/traits10.rs: Fix test-case --- .../rust/compile/torture/traits10.rs | 64 ++- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/gcc/testsu

[committed 67/88] gccrs: Add test

2023-04-05 Thread arthur . cohen
From: Owen Avery gcc/testsuite/ChangeLog: * rust/compile/variadic.rs: New test. Signed-off-by: Owen Avery --- gcc/testsuite/rust/compile/variadic.rs | 8 1 file changed, 8 insertions(+) create mode 100644 gcc/testsuite/rust/compile/variadic.rs diff --git a/gcc/testsuite/rus

[committed 70/88] gccrs: testsuite: Add empty string macro test

2023-04-05 Thread arthur . cohen
From: Pierre-Emmanuel Patry Add two new tests with empty string for include_str and include_bytes macros. gcc/testsuite/ChangeLog: * rust/compile/issue-1830_bytes.rs: New test. * rust/compile/issue-1830_str.rs: New test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/

[committed 60/88] gccrs: macros: Perform macro expansion in a fixed-point fashion.

2023-04-05 Thread arthur . cohen
From: Arthur Cohen This commit changes our macro expansion system from an eager and recursive macro expansion to a fixed-point like system. Instead of, when seeing a macro invocation, expanding it and all of the macros within it, we now perform multiple passes of expansion on the entire crate

[committed 71/88] gccrs: Add support for parsing empty tuple patterns.

2023-04-05 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_grouped_or_tuple_pattern): Add support for empty tuple patterns. gcc/testsuite/ChangeLog: * rust/compile/parse_empty_tuple_pattern.rs: New test. Signed-off-by: Owen Avery --- gcc/rust/pars

[committed 74/88] gccrs: Add new virtual function HIR::ImplItem::get_impl_item_name

2023-04-05 Thread arthur . cohen
From: Philip Herron Signed-off-by: Philip Herron gcc/rust/ChangeLog: * hir/tree/rust-hir-item.h: implement virtual function * hir/tree/rust-hir.h: add virtual function --- gcc/rust/hir/tree/rust-hir-item.h | 17 - gcc/rust/hir/tree/rust-hir.h | 2 ++ 2 fi

[committed 78/88] gccrs: builtins: Return empty list of tokens instead of nullptr

2023-04-05 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-macro-builtins.cc (MacroBuiltin::include_handler): Do not return nullptr token in expansion of `include!()` gcc/testsuite/ChangeLog: * rust/compile/empty.in: New test. * rust/compile/include_empty.rs: New

[committed 72/88] gccrs: Implemented UTF-8 checking for include_str!()

2023-04-05 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * expand/rust-macro-builtins.cc (MacroBuiltin::include_str_handler): Add check for valid UTF-8. gcc/testsuite/ChangeLog: * rust/compile/builtin_macro_include_str.rs: Include test of invalid UTF-8. * rust/compile/inval

[committed 87/88] gccrs: Address unsafe with/without block handling ambiguity

2023-04-05 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_expr_stmt): Remove hypothetical unsafe + expr_stmt_without_block handling. Signed-off-by: Owen Avery --- gcc/rust/parse/rust-parse-impl.h | 15 +++ 1 file changed, 3 insertions(+), 12 de

Re: Rust front-end update 2023-04-05

2023-04-06 Thread Arthur Cohen
veryone who has helped us. All the best, Arthur - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht Münche

Invitation: gccrs May community call @ Mon 15 May 2023 11am - 12pm (CEST) (gcc-rust@gcc.gnu.org)

2023-05-02 Thread arthur . cohen
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VTIMEZONE TZID:Europe/Paris X-LIC-LOCATION:Europe/Paris BEGIN:DAYLIGHT TZOFFSETFROM:+0100 TZOFFSETTO:+0200 TZNAME:CEST DTSTART:19700329T02 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU

June Community Call

2023-06-05 Thread Arthur Cohen
Hi everyone! We'll be having our Monthly Community call on the 12th of June at 9am UTC. link: https://meet.jit.si/gccrs-community-call-june agenda: https://hackmd.io/@Rust-GCC/ry2ShhsLn Let me know if you'd like to join and there are schedule conflicts - the call can probably be moved around.

July Community Call

2023-07-03 Thread Arthur Cohen
Hi everyone, We will be having our next monthly community call on the 10th of July at 9am UTC. https://meet.jit.si/gccrs-community-call-july https://hackmd.io/Abr_eMmrRty8fJMsZQXB7Q Please feel free to join even if you'd just like to listen! Kindly, Arthur OpenPGP_0x1B3465B044AD9C65.asc D

Invitation: gccrs Community Call @ Mon 14 Aug 2023 11am - 12pm (CEST) (gcc-rust@gcc.gnu.org)

2023-08-01 Thread arthur . cohen
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP= TRUE;CN=Arthur Cohen;X-NUM-GUESTS=0:mailto:arthur.co...@embecosm.com X-MICROSOFT-CDO-OWNERAPPTID:-697346875 CREATED:20230801T153451Z DESCRIPTION:meet.jit.si/gccrs-community-call-august LAST-MODIFIED:20230801T153451Z LOCATION

Invitation with note: gccrs community call @ Mon 11 Sept 2023 11am - 11:30am (CEST) (gcc-rust@gcc.gnu.org)

2023-09-05 Thread arthur . cohen
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VTIMEZONE TZID:Europe/Paris X-LIC-LOCATION:Europe/Paris BEGIN:DAYLIGHT TZOFFSETFROM:+0100 TZOFFSETTO:+0200 TZNAME:CEST DTSTART:19700329T02 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU

[PATCHSET] Add error metadata to diagnostics

2023-09-06 Thread Arthur Cohen
This short patchset from David Malcolm enables errors to contain extra metadata - this is particularly useful for the Rust frontend, which will rely on that implementation to emit standard Rust error codes [1]. This series of patches is necessary for much of our more recent additions to the fronte

[PATCH 1/2] diagnostics: add error_meta

2023-09-06 Thread Arthur Cohen
From: David Malcolm --- gcc/diagnostic-core.h | 3 +++ gcc/diagnostic.cc | 15 +++ 2 files changed, 18 insertions(+) diff --git a/gcc/diagnostic-core.h b/gcc/diagnostic-core.h index 7334c79e8e6..c9e27fd2e6e 100644 --- a/gcc/diagnostic-core.h +++ b/gcc/diagnostic-core.h @@ -92,6

[PATCH 2/2] Experiment with adding an error code to an error

2023-09-06 Thread Arthur Cohen
From: David Malcolm --- gcc/rust/rust-diagnostics.cc | 11 +++ gcc/rust/rust-diagnostics.h | 18 ++ gcc/rust/rust-gcc-diagnostics.cc | 33 +++ gcc/rust/typecheck/rust-casts.cc | 2 +- .../rust/compile/bad_a

Re: [PATCH 1/2] diagnostics: add error_meta

2023-09-06 Thread Arthur Cohen
On 9/6/23 16:12, David Malcolm wrote: On Wed, 2023-09-06 at 15:53 +0200, Arthur Cohen wrote: From: David Malcolm I guess I can review this patch :) Needs a ChangeLog entry, so here's one: gcc/ChangeLog * diagnostic-core.h (error_meta): New decl. * diagnostic.cc (error

Re: [PATCHSET] Add error metadata to diagnostics

2023-09-07 Thread Arthur Cohen
Pushed to trunk this morning with Changelogs and SoB lines. Thanks for the review David! All the best, Arthur On 9/6/23 15:53, Arthur Cohen wrote: This short patchset from David Malcolm enables errors to contain extra metadata - this is particularly useful for the Rust frontend, which will

[PATCH 02/14] rust: Reintroduce TARGET_RUST_CPU_INFO hook

2023-09-07 Thread arthur . cohen
From: Iain Buclaw gcc/ChangeLog: * doc/tm.texi: Regenerate. * doc/tm.texi.in: Add @node for Rust language and ABI, and document TARGET_RUST_CPU_INFO. gcc/rust/ChangeLog: * rust-lang.cc (rust_add_target_info): Remove sorry. * rust-session-manager.cc: Repl

[PATCH 01/14] rust: Add skeleton support and documentation for targetrustm hooks.

2023-09-07 Thread arthur . cohen
From: Iain Buclaw gcc/ChangeLog: * Makefile.in (tm_rust_file_list, tm_rust_include_list, TM_RUST_H, RUST_TARGET_DEF, RUST_TARGET_H, RUST_TARGET_OBJS): New variables. (tm_rust.h, cs-tm_rust.h, default-rust.o, rust/rust-target-hooks-def.h, s-rust-target-hooks-def-h)

[PATCH 04/14] rust: Implement TARGET_RUST_CPU_INFO for i[34567]86-*-* and x86_64-*-*

2023-09-07 Thread arthur . cohen
From: Iain Buclaw There are still quite a lot of the previously reverted i386-rust.cc missing, so it's only a partial reimplementation. gcc/ChangeLog: * config/i386/t-i386 (i386-rust.o): New rule. * config/i386/i386-rust.cc: New file. * config/i386/i386-rust.h: New file.

[PATCH 06/14] rust: Implement TARGET_RUST_OS_INFO for *-*-freebsd*

2023-09-07 Thread arthur . cohen
From: Iain Buclaw gcc/ChangeLog: * config.gcc (*-*-freebsd*): Set rust_target_objs and target_has_targetrustm. * config/t-freebsd (freebsd-rust.o): New rule. * config/freebsd-rust.cc: New file. --- gcc/config.gcc | 2 ++ gcc/config/freebsd-rust.cc |

[PATCH 08/14] rust: Implement TARGET_RUST_OS_INFO for *-*-openbsd*

2023-09-07 Thread arthur . cohen
From: Iain Buclaw gcc/ChangeLog: * config.gcc (*-*-openbsd*): Set rust_target_objs and target_has_targetrustm. * config/t-openbsd (openbsd-rust.o): New rule. * config/openbsd-rust.cc: New file. --- gcc/config.gcc | 2 ++ gcc/config/openbsd-rust.cc |

[PATCH 09/14] rust: Implement TARGET_RUST_OS_INFO for *-*-solaris2*.

2023-09-07 Thread arthur . cohen
From: Iain Buclaw gcc/ChangeLog: * config.gcc (*-*-solaris2*): Set rust_target_objs and target_has_targetrustm. * config/t-sol2 (sol2-rust.o): New rule. * config/sol2-rust.cc: New file. --- gcc/config.gcc | 2 ++ gcc/config/sol2-rust.cc | 40 +++

[PATCH 11/14] rust: Implement TARGET_RUST_OS_INFO for *-*-vxworks*

2023-09-07 Thread arthur . cohen
From: Iain Buclaw gcc/ChangeLog: * config.gcc (*-*-vxworks*): Set rust_target_objs and target_has_targetrustm. * config/t-vxworks (vxworks-rust.o): New rule. * config/vxworks-rust.cc: New file. --- gcc/config.gcc | 3 +++ gcc/config/t-vxworks |

[PATCH 14/14] rust: Implement TARGET_RUST_OS_INFO for *-*-*linux*.

2023-09-07 Thread arthur . cohen
From: Iain Buclaw gcc/ChangeLog: * config.gcc (*linux*): Set rust target_objs, and target_has_targetrustm, * config/t-linux (linux-rust.o): New rule. * config/linux-rust.cc: New file. --- gcc/config.gcc | 2 ++ gcc/config/linux-rust.cc | 57 +++

[PATCH 10/14] rust: Implement TARGET_RUST_OS_INFO for *-*-dragonfly*

2023-09-07 Thread arthur . cohen
From: Iain Buclaw gcc/ChangeLog: * config.gcc (*-*-dragonfly*): Set rust_target_objs and target_has_targetrustm. * config/t-dragonfly (dragonfly-rust.o): New rule. * config/dragonfly-rust.cc: New file. --- gcc/config.gcc | 2 ++ gcc/config/dragonfl

[PATCH 03/14] rust: Reintroduce TARGET_RUST_OS_INFO hook

2023-09-07 Thread arthur . cohen
From: Iain Buclaw gcc/ChangeLog: * doc/tm.texi: Regenerate. * doc/tm.texi.in: Document TARGET_RUST_OS_INFO. gcc/rust/ChangeLog: * rust-session-manager.cc (Session::init): Call targetrustm.rust_os_info. * rust-target.def (rust_os_info): New hook. --- gcc

[PATCH 07/14] rust: Implement TARGET_RUST_OS_INFO for *-*-netbsd*

2023-09-07 Thread arthur . cohen
From: Iain Buclaw gcc/ChangeLog: * config.gcc (*-*-netbsd*): Set rust_target_objs and target_has_targetrustm. * config/t-netbsd (netbsd-rust.o): New rule. * config/netbsd-rust.cc: New file. --- gcc/config.gcc| 2 ++ gcc/config/netbsd-rust.cc | 40 +++

[PATCH 05/14] rust: Implement TARGET_RUST_OS_INFO for *-*-darwin*

2023-09-07 Thread arthur . cohen
From: Iain Buclaw gcc/ChangeLog: * config.gcc (*-*-darwin*): Set rust_target_objs and target_has_targetrustm. * config/t-darwin (darwin-rust.o): New rule. * config/darwin-rust.cc: New file. --- gcc/config.gcc| 2 ++ gcc/config/darwin-rust.cc | 44 +++

[PATCH 12/14] rust: Implement TARGET_RUST_OS_INFO for *-*-fuchsia*.

2023-09-07 Thread arthur . cohen
From: Iain Buclaw gcc/ChangeLog: * config.gcc (*-*-fuchsia): Set tmake_rule, rust_target_objs, and target_has_targetrustm. * config/fuchsia-rust.cc: New file. * config/t-fuchsia: New file. --- gcc/config.gcc | 3 +++ gcc/config/fuchsia-rust.cc | 40 +

[PATCH 13/14] rust: Implement TARGET_RUST_OS_INFO for i[34567]86-*-mingw* and x86_64-*-mingw*.

2023-09-07 Thread arthur . cohen
From: Iain Buclaw gcc/ChangeLog: * config.gcc (i[34567]86-*-mingw* | x86_64-*-mingw*): Set rust_target_objs and target_has_targetrustm. * config/t-winnt (winnt-rust.o): New rule. * config/winnt-rust.cc: New file. --- gcc/config.gcc | 2 ++ gcc/config/t

[PATCHSET] Reintroduce targetrustm hooks

2023-09-07 Thread Arthur Cohen
Alright, was not expecting to mess up this patchset so bad so here we go: This patchset reintroduces proper targetrustm hooks without the old problematic mess of macros we had, which had been removed for the first merge of gccrs upstream. Tested on x86-64 GNU Linux, and has also been present in

[PATCH] libcpp: add function to check XID properties

2023-09-08 Thread Arthur Cohen
From: Raiki Tamura libcpp/ChangeLog: * charset.cc (check_xid_property):new function to check XID_Start and XID_Continue * include/cpplib.h (check_xid_property):add enum representing XID properties Signed-off-by: Raiki Tamura --- libcpp/charset.cc | 36 +

[PATCH v2] libcpp: add function to check XID properties

2023-09-08 Thread Arthur Cohen
From: Raiki Tamura This commit adds a new function intended for checking the XID properties of a possibly unicode character, as well as the accompanying enum describing the possible properties. libcpp/ChangeLog: * charset.cc (cpp_check_xid_property): New. * include/cpplib.h

[PATCH v3] libcpp: add function to check XID properties

2023-09-08 Thread Arthur Cohen
From: Raiki Tamura Fixed to include the enum's name which I had forgotten to commit. Thanks This commit adds a new function intended for checking the XID properties of a possibly unicode character, as well as the accompanying enum describing the possible properties. libcpp/ChangeLog:

[COMMITTED] gccrs: move functions from rust-gcc-diagnostics to rust-diagnostics.cc

2023-09-11 Thread Arthur Cohen
From: Parthib <94271200+parthib...@users.noreply.github.com> gcc/rust/ChangeLog: * Make-lang.in: Removed rust-gcc-diagnostics object file. * rust-diagnostics.cc (rust_be_get_quotechars): Added from original file. (rust_be_internal_error_at): Likewise.

Re: [PATCHSET] Reintroduce targetrustm hooks

2023-09-14 Thread Arthur Cohen
On 9/14/23 12:12, Richard Biener wrote: On Wed, Sep 13, 2023 at 10:14 PM Iain Buclaw via Gcc-patches wrote: Excerpts from Arthur Cohen's message of September 7, 2023 3:41 pm: Alright, was not expecting to mess up this patchset so bad so here we go: This patchset reintroduces proper targetr

[PATCH 1/3] librust: Add libproc_macro and build system

2023-09-20 Thread Arthur Cohen
From: Pierre-Emmanuel Patry This patch series adds the build system changes to allow the Rust frontend to develop and distribute its own libraries. The first library we have been working on is the `proc_macro` library, comprised of a C++ library as well as a user-facing Rust library. Follow up c

[PATCH 2/3] build: Add libgrust as compilation modules

2023-09-20 Thread Arthur Cohen
From: Pierre-Emmanuel Patry Define the libgrust directory as a host compilation module as well as for targets. ChangeLog: * Makefile.def: Add libgrust as host & target module. * configure.ac: Add libgrust to host tools list. gcc/rust/ChangeLog: * config-lang.in: Add li

[PATCH 3/3] build: Regenerate build files

2023-09-21 Thread Arthur Cohen
From: Pierre-Emmanuel Patry Resending this patch without most of the diff so it fits on the ML. - Regenerate all build files. ChangeLog: * Makefile.in: * configure: Regenerate. * libgrust/Makefile.in: New file. * libgrust/aclocal.m4: New file. * lib

Invitation: gccrs community call @ Mon 16 Oct 2023 11am - 11:30am (CEST) (gcc-rust@gcc.gnu.org)

2023-10-09 Thread arthur . cohen
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VTIMEZONE TZID:Europe/Paris X-LIC-LOCATION:Europe/Paris BEGIN:DAYLIGHT TZOFFSETFROM:+0100 TZOFFSETTO:+0200 TZNAME:CEST DTSTART:19700329T02 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU

Updated invitation: gccrs community call @ lun. 16 oct. 2023 1pm - 1:30pm (CEST) (gcc-rust@gcc.gnu.org)

2023-10-16 Thread Arthur Cohen
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VTIMEZONE TZID:Europe/Paris X-LIC-LOCATION:Europe/Paris BEGIN:DAYLIGHT TZOFFSETFROM:+0100 TZOFFSETTO:+0200 TZNAME:CEST DTSTART:19700329T02 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU

Re: [PATCH v3] libcpp: add function to check XID properties

2023-10-16 Thread Arthur Cohen
Ping? Best, Arthur On 9/8/23 16:59, Arthur Cohen wrote: From: Raiki Tamura Fixed to include the enum's name which I had forgotten to commit. Thanks This commit adds a new function intended for checking the XID properties of a possibly unicode character, as well as the accompa

[PATCH v2 1/4] libgrust: Add entry for maintainers and stub changelog file.

2023-10-25 Thread Arthur Cohen
ChangeLog: * MAINTAINERS: Add maintainers for libgrust. contrib/ChangeLog: * gcc-changelog/git_commit.py: Add libgrust. * gcc_update: Add libgrust file dependencies Co-authored-by: Pierre-Emmanuel Patry --- MAINTAINERS | 1 + contrib/gcc-changel

[PATCH v2 2/4] libgrust: Add libproc_macro and build system

2023-10-25 Thread Arthur Cohen
From: Pierre-Emmanuel Patry Add some dummy files in libproc_macro along with its build system. libgrust/Changelog: * Makefile.am: New file. * configure.ac: New file. * libproc_macro/Makefile.am: New file. * libproc_macro/proc_macro.cc: New file. * libproc

[PATCH v2 3/4] build: Add libgrust as compilation modules

2023-10-25 Thread Arthur Cohen
From: Pierre-Emmanuel Patry Define the libgrust directory as a host compilation module as well as for targets. ChangeLog: * Makefile.def: Add libgrust as host & target module. * configure.ac: Add libgrust to host tools list. gcc/rust/ChangeLog: * config-lang.in: Add li

[PATCH v2 4/4] build: Regenerate build files

2023-10-25 Thread Arthur Cohen
From: Pierre-Emmanuel Patry Regenerate all build files. ChangeLog: * Makefile.in: * configure: Regenerate. libgrust/ChangeLog: * Makefile.in: New file. * aclocal.m4: New file. * configure: New file. * libproc_macro/Makefile.in: New file. libgm2

Re: [PATCH v2 3/4] build: Add libgrust as compilation modules

2023-10-26 Thread Arthur Cohen
Hi Thomas, On 10/25/23 23:40, Thomas Schwinge wrote: Hi! On 2023-10-25T13:06:48+0200, Arthur Cohen wrote: From: Pierre-Emmanuel Patry Define the libgrust directory as a host compilation module as well as for targets. I don't see a response to Richard's commen

Invitation: gccrs Community Call @ Mon 13 Nov 2023 11am - 11:30am (CET) (gcc-rust@gcc.gnu.org)

2023-11-06 Thread Arthur Cohen
=ACCEPTED;RSVP=TRUE ;CN=Arthur Cohen;X-NUM-GUESTS=0:mailto:arthur.co...@embecosm.com X-GOOGLE-CONFERENCE:https://meet.google.com/edi-hozr-vzh X-MICROSOFT-CDO-OWNERAPPTID:-90989743 CREATED:20231106T113044Z DESCRIPTION:Agenda: https://hackmd.io/X1XfpWwwReuazd62txPyew";>http s://h

Re: GCC/Rust libgrust-v2/to-submit branch

2023-11-21 Thread Arthur Cohen
Hi Thomas! A newer version of the library has been force-pushed to the branch `libgrust-v2/to-submit`. On 11/20/23 15:55, Thomas Schwinge wrote: Hi! Arthur and Pierre-Emmanuel have prepared a GCC/Rust libgrust-v2/to-submit branch:

Invitation: gccrs community call @ lun. 18 déc. 2023 11am - 11:30am (CET) (gcc-rust@gcc.gnu.org)

2023-12-14 Thread Arthur Cohen
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VTIMEZONE TZID:Europe/Paris X-LIC-LOCATION:Europe/Paris BEGIN:DAYLIGHT TZOFFSETFROM:+0100 TZOFFSETTO:+0200 TZNAME:CEST DTSTART:19700329T02 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU

[COMMITTED] Initial libgrust build patches

2023-12-14 Thread Arthur Cohen
Hi, This patchset contains the initial changes to add the libgrust folder to gcc, which will later contain libraries used by our Rust frontend. This work was done by Pierre-Emmanuel Patry as part of his work on supporting procedural macros in our frontend. It was then tested by Thomas Schwinge, a

[COMMITTED 1/4] libgrust: Add ChangeLog file

2023-12-14 Thread Arthur Cohen
From: Pierre-Emmanuel Patry libgrust/ChangeLog: * ChangeLog: New file. Signed-off-by: Pierre-Emmanuel Patry --- libgrust/ChangeLog | 6 ++ 1 file changed, 6 insertions(+) create mode 100644 libgrust/ChangeLog diff --git a/libgrust/ChangeLog b/libgrust/ChangeLog new file mode 100

[COMMITTED 2/4] libgrust: Add entry for maintainers

2023-12-14 Thread Arthur Cohen
From: Pierre-Emmanuel Patry ChangeLog: * MAINTAINERS: Add maintainers for libgrust. contrib/ChangeLog: * gcc-changelog/git_commit.py: Add libgrust. Co-authored-by: Arthur Cohen Signed-off-by: Pierre-Emmanuel Patry --- MAINTAINERS | 1 + contrib/gcc

[COMMITTED 4/4] build: Add libgrust as compilation modules

2023-12-14 Thread Arthur Cohen
From: Pierre-Emmanuel Patry Define the libgrust directory as a host compilation module as well as for targets. Disable target libgrust if we're not building target libstdc++. ChangeLog: * Makefile.def: Add libgrust as host & target module. * configure.ac: Add libgrust to host to

Re: [PATCH v3] libcpp: add function to check XID properties

2024-01-04 Thread Arthur Cohen
Hi Joseph, Thanks for the review! On 12/18/23 20:00, Joseph Myers wrote: On Fri, 8 Sep 2023, Arthur Cohen wrote: + if (c < 0x80) + { +if (('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z')) + return CPP_XID_START | C

[COMMITTED] libcpp: add function to check XID properties

2024-01-04 Thread Arthur Cohen
From: Raiki Tamura This commit adds a new function intended for checking the XID properties of a possibly unicode character, as well as the accompanying enum describing the possible properties. libcpp/ChangeLog: * charset.cc (cpp_check_xid_property): New. * include/cpplib.h

[PATCHSET] Fix Rust bootstrap for future libgrust changes

2024-01-11 Thread Arthur Cohen
Hi everyone, Sorry about this - two simple changes to Makefile.def we had missed during our first libgrust/ patchset, plus the associated regen of Makefile.in in each commit. Let me know if I should squash them together. I'll follow them up with our entire patchset. Best, Arthur

[PATCH 1/2] gccrs: fixup: Fix bootstrap build

2024-01-11 Thread Arthur Cohen
From: Pierre-Emmanuel Patry The bootstrap was failing due to a missing target which was not available during the bootstrap. ChangeLog: * Makefile.def: Add libgrust target to bootstrap. * Makefile.in: Regenerate. Signed-off-by: Pierre-Emmanuel Patry --- Makefile.def | 2 +-

[PATCH 2/2] gccrs: fixup: Fix missing build dependency

2024-01-11 Thread Arthur Cohen
From: Pierre-Emmanuel Patry Fix the missing dependency between the gcc and libgrust. ChangeLog: * Makefile.def: Add a dependency to libgrust for all-gcc. * Makefile.in: Regenerate the file. Signed-off-by: Pierre-Emmanuel Patry --- Makefile.def | 1 + Makefile.in | 10 ++

Re: [PATCH 2/2] gccrs: fixup: Fix missing build dependency

2024-01-11 Thread Arthur Cohen
Hi Richard, On 1/11/24 15:23, Richard Biener wrote: On Thu, 11 Jan 2024, Arthur Cohen wrote: From: Pierre-Emmanuel Patry Fix the missing dependency between the gcc and libgrust. ChangeLog: * Makefile.def: Add a dependency to libgrust for all-gcc. * Makefile.in: Regenerate

[COMMITTED] rust_debug: Cast size_t values to unsigned long before printing.

2024-01-18 Thread Arthur Cohen
Using %lu to format size_t values breaks 32 bit targets, and %zu is not supported by one of the hosts GCC aims to support - HPUX gcc/rust/ChangeLog: * backend/rust-compile-base.cc (HIRCompileBase::resolve_method_address): Cast size_t value to unsigned long. * expand/rust-p

Re: [COMMITTED] rust_debug: Cast size_t values to unsigned long before printing.

2024-01-18 Thread Arthur Cohen
Hi Rainer, On 1/18/24 10:13, Rainer Orth wrote: Arthur Cohen writes: Using %lu to format size_t values breaks 32 bit targets, and %zu is not supported by one of the hosts GCC aims to support - HPUX But we do have uses of %zu in gcc/rust already! diff --git a/gcc/rust/expand/rust-proc

Re: [COMMITTED] rust_debug: Cast size_t values to unsigned long before printing.

2024-01-18 Thread Arthur Cohen
Hi Rainer, On 1/18/24 10:34, Rainer Orth wrote: Hi Arthur, Yes, I was talking about this on IRC the other day - if we do run in a situation where we have more than UINT32_MAX procedural macros in memory we have big issues. These debug prints will probably end up getting removed soon as they cl

Re: [COMMITTED] rust_debug: Cast size_t values to unsigned long before printing.

2024-01-18 Thread Arthur Cohen
Hi Iain, On 1/18/24 12:02, Iain Sandoe wrote: Hi Arthur, On 18 Jan 2024, at 10:30, Arthur Cohen wrote: On 1/18/24 10:13, Rainer Orth wrote: Arthur Cohen writes: Using %lu to format size_t values breaks 32 bit targets, and %zu is not supported by one of the hosts GCC aims to support

Re: GCC GSoC 2024: Call for project ideas and mentors

2024-01-19 Thread Arthur Cohen
ps://google.github.io/gsocguides/mentor/defining-a-project-ideas-list Thank you very much for your participation and help. Let's hope we attract some great contributors again this year. Martin -- Arthur Cohen Toolchain Engineer Embecosm GmbH Geschäftsführer: Jeremy Bennett Niede

[PATCHSET] Update of GCC upstream with gccrs development repository

2024-01-19 Thread Arthur Cohen
Hi everyone, This patchset updates trunk with all of 2023's commits concerning the Rust GCC frontend. We apologize for the large amount of changes - we will change our upstreaming process for 2024 and will update upstream on a more regular basis. This patchset contains multiple improvement

[PATCHSET] Update Rust frontend January 2024

2024-01-30 Thread arthur . cohen
Hi everyone, This is our first upstream of 2024. It includes commits up to the 25th of January, including fixes for some of the issues reported after our previous patchset. The fixes for little-endian platforms have yet to land as we are investigating a weird scan-assembler regression on our OSX

[COMMITTED 002/101] gccrs: Add a test to highlight public trait type parsing

2024-01-30 Thread arthur . cohen
From: Pierre-Emmanuel Patry This new test highlight the parser's behavior around public trait types. gcc/testsuite/ChangeLog: * rust/compile/trait_pub_type.rs: New test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/trait_pub_type.rs | 6 ++ 1 file changed,

[COMMITTED 001/101] gccrs: Add visibility to trait item

2024-01-30 Thread arthur . cohen
From: Pierre-Emmanuel Patry The compiler shall parse visibility modifiers on trait items and reject those at a later stage (ast validation). gcc/rust/ChangeLog: * ast/rust-item.h (struct Visibility): Move Visibility from here... * ast/rust-ast.h (struct Visibility): ...to here.

[COMMITTED 003/101] gccrs: Fix error emission for self pointers

2024-01-30 Thread arthur . cohen
From: Pierre-Emmanuel Patry Self pointer checking loop condition was inverted, the latter was therefore never executed. gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_self_param): Fix the loop exit condition. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/par

[COMMITTED 005/101] gccrs: Add new test for parsing errors on self pointers

2024-01-30 Thread arthur . cohen
From: Pierre-Emmanuel Patry Add new tests to highlight the behavior of errors thrown when meeting a self pointer. gcc/testsuite/ChangeLog: * rust/compile/self_const_ptr.rs: New test. * rust/compile/self_mut_ptr.rs: New test. * rust/compile/self_ptr.rs: New test. Signed-

[COMMITTED 008/101] gccrs: forever-stack: Fix basic get logic

2024-01-30 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-forever-stack.h: Improve resolve_path API. * resolve/rust-forever-stack.hxx: Likewise and fix implementation. --- gcc/rust/resolve/rust-forever-stack.h | 19 +++-- gcc/rust/resolve/rust-forever-stack.hxx | 38

[COMMITTED 010/101] gccrs: forever stack: Fix resolve_path signature

2024-01-30 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-forever-stack.h: Fix `ForeverStack::resolve_path` signature. * resolve/rust-forever-stack.hxx: Likewise. * resolve/rust-early-name-resolver-2.0.cc (Early::visit): Use new API. (Early::visit_attributes

[COMMITTED 016/101] gccrs: Reject auto traits with generic parameters

2024-01-30 Thread arthur . cohen
From: Pierre-Emmanuel Patry Generic parameters are not allowed on auto traits, the compiler should emit an error. gcc/rust/ChangeLog: * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add check for generics on auto traits. * checks/errors/rust-ast-validation

[COMMITTED 012/101] gccrs: foreverstack: Add `to_canonical_path` method

2024-01-30 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-forever-stack.h: New method. * resolve/rust-forever-stack.hxx: Likewise. --- gcc/rust/resolve/rust-forever-stack.h | 25 ++- gcc/rust/resolve/rust-forever-stack.hxx | 90 - 2 files changed, 110

[COMMITTED 017/101] gccrs: Add regression test for generic auto traits

2024-01-30 Thread arthur . cohen
From: Pierre-Emmanuel Patry Generics are forbidden on auto traits and an error should be emitted. This commit highlight this behavior. gcc/testsuite/ChangeLog: * rust/compile/generic_auto_trait.rs: New test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/generic_

<    1   2   3   4   5   6   7   8   9   10   >