Re: [PATCH] rust: Do not link with libdl and libpthread unconditionally

2024-05-31 Thread Arthur Cohen
Hi Richard, On 4/30/24 09:55, Richard Biener wrote: On Fri, Apr 19, 2024 at 11:49 AM Arthur Cohen wrote: Hi everyone, This patch checks for the presence of dlopen and pthread_create in libc. If that is not the case, we check for the existence of -ldl and -lpthread, as these libraries

Re: [PATCH] rust: Do not link with libdl and libpthread unconditionally

2024-05-31 Thread Arthur Cohen
Hi Richard, On 4/30/24 09:55, Richard Biener wrote: On Fri, Apr 19, 2024 at 11:49 AM Arthur Cohen wrote: Hi everyone, This patch checks for the presence of dlopen and pthread_create in libc. If that is not the case, we check for the existence of -ldl and -lpthread, as these libraries

gcc-wwwdocs branch master updated. b55eb49edaf67eb671102a3ed8069cb9c9a3d108

2024-05-17 Thread Arthur Cohen via Gcc-cvs-wwwdocs
--- commit b55eb49edaf67eb671102a3ed8069cb9c9a3d108 Author: Arthur Cohen Date: Tue May 14 10:34:16 2024 +0200 gcc-14/changes: Add Rust section to New languages diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index 924e045a..dd3fea8d 100644 --- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/ch

[PATCH wwwdocs] gcc-14/changes: Add Rust section to New languages

2024-05-14 Thread Arthur Cohen
--- htdocs/gcc-14/changes.html | 13 + 1 file changed, 13 insertions(+) diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index 924e045a..dd3fea8d 100644 --- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/changes.html @@ -626,6 +626,19 @@ You may also want to

[PATCH wwwdocs] gcc-14/changes: Add Rust section to New languages

2024-05-14 Thread Arthur Cohen
--- htdocs/gcc-14/changes.html | 13 + 1 file changed, 13 insertions(+) diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index 924e045a..dd3fea8d 100644 --- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/changes.html @@ -626,6 +626,19 @@ You may also want to

Invitation: gccrs May community call @ Mon 13 May 2024 11am - 12pm (GMT+2) (gcc-rust@gcc.gnu.org)

2024-05-06 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

Re: [PATCH] rust: Add rust.install-dvi and rust.install-html rules

2024-05-02 Thread Arthur Cohen
On 4/29/24 15:30, Christophe Lyon wrote: On Mon, 29 Apr 2024 at 15:24, Arthur Cohen wrote: Thanks Christophe! I've added your patch as part of a documentation pull-request I'm adding to our dev repo: https://github.com/Rust-GCC/gccrs/pull/2966 It'll be upstreamed with the next batch

Re: [PATCH] rust: Add rust.install-dvi and rust.install-html rules

2024-04-29 Thread Arthur Cohen
Thanks Christophe! I've added your patch as part of a documentation pull-request I'm adding to our dev repo: https://github.com/Rust-GCC/gccrs/pull/2966 It'll be upstreamed with the next batch of commits we send, as soon as trunk reopens fully for 15.1. Best, Arthur On 4/4/24 18:27,

Re: [PATCH] Fix rust on *-w64-mingw32

2024-04-26 Thread Arthur Cohen
Hello, Thanks a lot for the patch :) I agree with Jakub that we should be using the GNU coding style in our call to std::replace - this is what we try to enforce in the rest of the Rust frontend. Regarding the changes to `mkdir_wrapped`, the function now looks a bit odd: void mkdir_wrapped

Re: [PATCH] Add rvalue::get_name method (and its C equivalent)

2024-04-22 Thread Arthur Cohen
Hey Guillaume :) On 4/20/24 01:05, Guillaume Gomez wrote: Hi, I just encountered the need to retrieve the name of an `rvalue` (if there is one) while working on the Rust GCC backend. This patch adds a getter to retrieve the information. Cordially. virtual bool get_wide_int (wide_int *)

[PATCH] rust: Do not link with libdl and libpthread unconditionally

2024-04-19 Thread Arthur Cohen
Hi everyone, This patch checks for the presence of dlopen and pthread_create in libc. If that is not the case, we check for the existence of -ldl and -lpthread, as these libraries are required to link the Rust runtime to our Rust frontend. If these libs are not present on the system, then we

[PATCH] rust: Do not link with libdl and libpthread unconditionally

2024-04-19 Thread Arthur Cohen
Hi everyone, This patch checks for the presence of dlopen and pthread_create in libc. If that is not the case, we check for the existence of -ldl and -lpthread, as these libraries are required to link the Rust runtime to our Rust frontend. If these libs are not present on the system, then we

Re: [PATCH] build: Check for cargo when building rust language

2024-04-17 Thread Arthur Cohen
Hi Rainer! On 4/17/24 10:13, Rainer Orth wrote: Andrew Pinski writes: On Mon, Apr 8, 2024 at 9:39 AM wrote: From: Pierre-Emmanuel Patry Hello, The rust frontend requires cargo to build some of it's components, it's presence was not checked during configuration. WHY did this go in

Re: [PATCH] build: Check for cargo when building rust language

2024-04-17 Thread Arthur Cohen
Hi Rainer! On 4/17/24 10:13, Rainer Orth wrote: Andrew Pinski writes: On Mon, Apr 8, 2024 at 9:39 AM wrote: From: Pierre-Emmanuel Patry Hello, The rust frontend requires cargo to build some of it's components, it's presence was not checked during configuration. WHY did this go in

Re: [gcc r14-7544] gccrs: libproc_macro: Build statically

2024-04-16 Thread Arthur Cohen
Morning Thomas, On 4/15/24 13:07, Thomas Schwinge wrote: Hi! On 2024-01-16T17:43:10+, Arthur Cohen via Gcc-cvs wrote: https://gcc.gnu.org/g:71180a9eed367667e7b2c3f6aea1ee1bba15e9b3 commit r14-7544-g71180a9eed367667e7b2c3f6aea1ee1bba15e9b3 Author: Pierre-Emmanuel Patry Date: Wed Apr

Re: [gcc r14-7544] gccrs: libproc_macro: Build statically

2024-04-16 Thread Arthur Cohen
Morning Thomas, On 4/15/24 13:07, Thomas Schwinge wrote: Hi! On 2024-01-16T17:43:10+, Arthur Cohen via Gcc-cvs wrote: https://gcc.gnu.org/g:71180a9eed367667e7b2c3f6aea1ee1bba15e9b3 commit r14-7544-g71180a9eed367667e7b2c3f6aea1ee1bba15e9b3 Author: Pierre-Emmanuel Patry Date: Wed Apr

Re: build: Use of cargo not yet supported here in Canadian cross configurations

2024-04-16 Thread Arthur Cohen
Hi Thomas, On 4/15/24 14:44, Thomas Schwinge wrote: Hi! On 2024-04-15T13:14:42+0200, I wrote: On 2024-04-08T18:33:38+0200, pierre-emmanuel.pa...@embecosm.com wrote: The rust frontend requires cargo to build some of it's components, In GCC upstream still: 's%requires%is going to require'.

Re: build: Use of cargo not yet supported here in Canadian cross configurations

2024-04-16 Thread Arthur Cohen
Hi Thomas, On 4/15/24 14:44, Thomas Schwinge wrote: Hi! On 2024-04-15T13:14:42+0200, I wrote: On 2024-04-08T18:33:38+0200, pierre-emmanuel.pa...@embecosm.com wrote: The rust frontend requires cargo to build some of it's components, In GCC upstream still: 's%requires%is going to require'.

Re: [PATCH] build: Check for cargo when building rust language

2024-04-09 Thread Arthur Cohen
Hi Andrew, On 4/9/24 16:12, Andrew Pinski wrote: On Mon, Apr 8, 2024 at 9:39 AM wrote: From: Pierre-Emmanuel Patry Hello, The rust frontend requires cargo to build some of it's components, it's presence was not checked during configuration. NOTE cargo itself is a huge security hole. If

Re: [PATCH] build: Check for cargo when building rust language

2024-04-09 Thread Arthur Cohen
Hi Andrew, On 4/9/24 16:12, Andrew Pinski wrote: On Mon, Apr 8, 2024 at 9:39 AM wrote: From: Pierre-Emmanuel Patry Hello, The rust frontend requires cargo to build some of it's components, it's presence was not checked during configuration. NOTE cargo itself is a huge security hole. If

Re: [PATCH] build: Check for cargo when building rust language

2024-04-09 Thread Arthur Cohen
On 4/9/24 12:09, Iain Sandoe wrote: Hi Arthur, On 9 Apr 2024, at 13:01, Arthur Cohen wrote: On 4/9/24 10:55, Iain Sandoe wrote: Hi Arthur, On 9 Apr 2024, at 11:40, Arthur Cohen wrote: On 4/9/24 09:47, John Paul Adrian Glaubitz wrote: Hello, On Mon, 2024-04-08 at 18:33 +0200, pierre

Re: [PATCH] build: Check for cargo when building rust language

2024-04-09 Thread Arthur Cohen
On 4/9/24 12:09, Iain Sandoe wrote: Hi Arthur, On 9 Apr 2024, at 13:01, Arthur Cohen wrote: On 4/9/24 10:55, Iain Sandoe wrote: Hi Arthur, On 9 Apr 2024, at 11:40, Arthur Cohen wrote: On 4/9/24 09:47, John Paul Adrian Glaubitz wrote: Hello, On Mon, 2024-04-08 at 18:33 +0200, pierre

Re: [PATCH] build: Check for cargo when building rust language

2024-04-09 Thread Arthur Cohen
Hi Iain! On 4/9/24 10:55, Iain Sandoe wrote: Hi Arthur, On 9 Apr 2024, at 11:40, Arthur Cohen wrote: On 4/9/24 09:47, John Paul Adrian Glaubitz wrote: Hello, On Mon, 2024-04-08 at 18:33 +0200, pierre-emmanuel.pa...@embecosm.com wrote: The rust frontend requires cargo to build some

Re: [PATCH] build: Check for cargo when building rust language

2024-04-09 Thread Arthur Cohen
Hi Iain! On 4/9/24 10:55, Iain Sandoe wrote: Hi Arthur, On 9 Apr 2024, at 11:40, Arthur Cohen wrote: On 4/9/24 09:47, John Paul Adrian Glaubitz wrote: Hello, On Mon, 2024-04-08 at 18:33 +0200, pierre-emmanuel.pa...@embecosm.com wrote: The rust frontend requires cargo to build some

Re: [PATCH] build: Check for cargo when building rust language

2024-04-09 Thread Arthur Cohen
Morning all, On 4/9/24 09:47, John Paul Adrian Glaubitz wrote: Hello, On Mon, 2024-04-08 at 18:33 +0200, pierre-emmanuel.pa...@embecosm.com wrote: The rust frontend requires cargo to build some of it's components, it's presence was not checked during configuration. Isn't this creating a

Re: [PATCH] build: Check for cargo when building rust language

2024-04-09 Thread Arthur Cohen
Morning all, On 4/9/24 09:47, John Paul Adrian Glaubitz wrote: Hello, On Mon, 2024-04-08 at 18:33 +0200, pierre-emmanuel.pa...@embecosm.com wrote: The rust frontend requires cargo to build some of it's components, it's presence was not checked during configuration. Isn't this creating a

Re: I want to join Rust GCC

2024-04-04 Thread Arthur Cohen
Hi there! On 4/1/24 05:39, ali omer wrote: Hi , My name is ali omar I hope to contribute to Rust GCC , but it is my first time to contribute to open source projects , so maybe I need help and I want to know how to start contributing Thanks in advance Nice, thanks for being interested in

Re: Frontend access to target features (was Re: [PATCH] libgccjit: Add ability to get CPU features)

2024-03-19 Thread Arthur Cohen
Hi, On 3/5/24 16:09, David Malcolm wrote: On Thu, 2023-11-09 at 19:33 -0500, Antoni Boucher wrote: Hi. See answers below. On Thu, 2023-11-09 at 18:04 -0500, David Malcolm wrote: On Thu, 2023-11-09 at 17:27 -0500, Antoni Boucher wrote: Hi. This patch adds support for getting the CPU features

Updated invitation: gccrs weekly @ Mon 18 Mar 2024 11am - 11:30am (GMT+1) (gcc-rust@gcc.gnu.org)

2024-03-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

Invitation: gccrs weekly @ Mon 18 Mar 2024 11am - 11:15am (GMT+1) (gcc-rust@gcc.gnu.org)

2024-03-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

Re: ☠ Buildbot (Sourceware): gccrust - failed compile (failure) (master)

2024-03-01 Thread Arthur Cohen
Hi both, On 2/29/24 21:22, Mark Wielaard wrote: Hi, On Thu, Feb 29, 2024 at 09:00:13PM +0100, Thomas Schwinge wrote: Three 'cargo' ('command not found') as well as one 'rustc' ('error[E0658]: `let...else` statements are unstable') errors: Yeah, I noticed those earlier, but oddly the tree

Re: ☠ Buildbot (Sourceware): gccrust - failed compile (failure) (master)

2024-03-01 Thread Arthur Cohen
Hi Jakub, On 2/29/24 23:08, Jakub Dupak wrote: Hi, please keep me in the loop for this one. I need cargo for the borrow checker as well (the external Polonius engine). Will do :) Best Jakub On Thu, 29 Feb 2024, at 21:22, Mark Wielaard wrote: Hi, On Thu, Feb 29, 2024 at 09:00:13PM

[COMMITTED 4/9] gccrs: expand: Fix formatting for "macro not found" error

2024-02-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-macro-expand.h (struct MacroExpander): Nitpick: fix formatting of emitted error. --- gcc/rust/expand/rust-macro-expand.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/rust/expand/rust-macro

[COMMITTED 4/9] gccrs: expand: Fix formatting for "macro not found" error

2024-02-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-macro-expand.h (struct MacroExpander): Nitpick: fix formatting of emitted error. --- gcc/rust/expand/rust-macro-expand.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/rust/expand/rust-macro

[COMMITTED 3/9] gccrs: Fix rebinding imports

2024-02-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-ast-resolve-item.cc (flatten_glob): Use Import class. (flatten_rebind): Likewise. (flatten_list): Likewise. (flatten): Likewise. (flatten_use_dec_to_paths): Likewise.

[COMMITTED 9/9] Update copyright years.

2024-02-21 Thread arthur . cohen
From: Sahil Yeole Signed-off-by: Sahil Yeole --- gcc/rust/ast/rust-ast-builder.cc | 2 +- gcc/rust/ast/rust-ast-builder.h | 2 +- gcc/rust/ast/rust-ast-collector.cc| 2 +- gcc/rust/ast/rust-ast-collector.h

[COMMITTED 5/9] gccrs: Add testcase for #[rustc_const_stable]

2024-02-21 Thread arthur . cohen
From: Arthur Cohen To ensure we don't introduce regressions back to issue #2314 gcc/testsuite/ChangeLog: * rust/compile/rustc_const_stable.rs: New test. --- gcc/testsuite/rust/compile/rustc_const_stable.rs | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 gcc/testsuite/rust

[COMMITTED 6/9] gccrs: add powi intrinsics

2024-02-21 Thread arthur . cohen
From: Marc Poulhiès gcc/rust/ChangeLog: * backend/rust-builtins.cc (BuiltinsContext::register_rust_mappings): Add powi and reformat. * backend/rust-builtins.h: Add missing copyright header. gcc/testsuite/ChangeLog: * rust/compile/torture/intrinsics-math.rs:

[COMMITTED 7/9] gccrs: Fix lookup of TuplePattern sub-pattern types

2024-02-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * backend/rust-compile-pattern.cc (CompilePatternLet::visit): Lookup type of sub-pattern, not tuple pattern itself. gcc/testsuite/ChangeLog: * rust/compile/issue-2847-b.rs: New test. Signed-off-by: Owen Avery ---

[COMMITTED 7/9] gccrs: Fix lookup of TuplePattern sub-pattern types

2024-02-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * backend/rust-compile-pattern.cc (CompilePatternLet::visit): Lookup type of sub-pattern, not tuple pattern itself. gcc/testsuite/ChangeLog: * rust/compile/issue-2847-b.rs: New test. Signed-off-by: Owen Avery ---

[COMMITTED 1/9] gccrs: Fix typo in RegionConstraints instance

2024-02-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-implitem.h: Fix typo in field (region_costraints -> region_constraints). --- gcc/rust/typecheck/rust-hir-type-check-implitem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/r

[PATCHSET] Update Rust frontend 21/02/2024

2024-02-21 Thread arthur . cohen
Hey everyone, Here is the latest patchset of the Rust frontend, taken directly from our development branch. The patches have been built, tested and bootstrapped on x86-64. [COMMITTED 1/9] gccrs: Fix typo in RegionConstraints instance [COMMITTED 2/9] gccrs: Add testcase for matches!() macro

[COMMITTED 8/9] gccrs: Add variadic check on function params

2024-02-21 Thread arthur . cohen
From: 0xn4utilus gcc/rust/ChangeLog: * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add variadic check on all parameters. gcc/testsuite/ChangeLog: * rust/compile/issue-2850.rs: New test. Signed-off-by: 0xn4utilus ---

[COMMITTED 6/9] gccrs: add powi intrinsics

2024-02-21 Thread arthur . cohen
From: Marc Poulhiès gcc/rust/ChangeLog: * backend/rust-builtins.cc (BuiltinsContext::register_rust_mappings): Add powi and reformat. * backend/rust-builtins.h: Add missing copyright header. gcc/testsuite/ChangeLog: * rust/compile/torture/intrinsics-math.rs:

[COMMITTED 9/9] Update copyright years.

2024-02-21 Thread arthur . cohen
From: Sahil Yeole Signed-off-by: Sahil Yeole --- gcc/rust/ast/rust-ast-builder.cc | 2 +- gcc/rust/ast/rust-ast-builder.h | 2 +- gcc/rust/ast/rust-ast-collector.cc| 2 +- gcc/rust/ast/rust-ast-collector.h

[COMMITTED 3/9] gccrs: Fix rebinding imports

2024-02-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-ast-resolve-item.cc (flatten_glob): Use Import class. (flatten_rebind): Likewise. (flatten_list): Likewise. (flatten): Likewise. (flatten_use_dec_to_paths): Likewise.

[COMMITTED 8/9] gccrs: Add variadic check on function params

2024-02-21 Thread arthur . cohen
From: 0xn4utilus gcc/rust/ChangeLog: * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add variadic check on all parameters. gcc/testsuite/ChangeLog: * rust/compile/issue-2850.rs: New test. Signed-off-by: 0xn4utilus ---

[COMMITTED 5/9] gccrs: Add testcase for #[rustc_const_stable]

2024-02-21 Thread arthur . cohen
From: Arthur Cohen To ensure we don't introduce regressions back to issue #2314 gcc/testsuite/ChangeLog: * rust/compile/rustc_const_stable.rs: New test. --- gcc/testsuite/rust/compile/rustc_const_stable.rs | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 gcc/testsuite/rust

[COMMITTED 2/9] gccrs: Add testcase for matches!() macro

2024-02-21 Thread arthur . cohen
From: Arthur Cohen This adds a testcase for issue #2129. gcc/testsuite/ChangeLog: * rust/execute/torture/matches_macro.rs: New test. --- .../rust/execute/torture/matches_macro.rs | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 gcc/testsuite/rust

[COMMITTED 2/9] gccrs: Add testcase for matches!() macro

2024-02-21 Thread arthur . cohen
From: Arthur Cohen This adds a testcase for issue #2129. gcc/testsuite/ChangeLog: * rust/execute/torture/matches_macro.rs: New test. --- .../rust/execute/torture/matches_macro.rs | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 gcc/testsuite/rust

[COMMITTED 1/9] gccrs: Fix typo in RegionConstraints instance

2024-02-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-implitem.h: Fix typo in field (region_costraints -> region_constraints). --- gcc/rust/typecheck/rust-hir-type-check-implitem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/r

[PATCHSET] Update Rust frontend 21/02/2024

2024-02-21 Thread arthur . cohen
Hey everyone, Here is the latest patchset of the Rust frontend, taken directly from our development branch. The patches have been built, tested and bootstrapped on x86-64. [COMMITTED 1/9] gccrs: Fix typo in RegionConstraints instance [COMMITTED 2/9] gccrs: Add testcase for matches!() macro

Re: [PATCH] gccrs: Avoid *.bak suffixed tests - use dg-skip-if instead

2024-02-15 Thread Arthur Cohen
Hi Jakub, On 2/15/24 10:10, Jakub Jelinek wrote: On Fri, Feb 09, 2024 at 11:03:38AM +0100, Jakub Jelinek wrote: On Wed, Feb 07, 2024 at 12:43:59PM +0100, arthur.co...@embecosm.com wrote: From: Philip Herron This patch introduces one regression because generics are getting better understood

Re: [PATCH] gccrs: Avoid *.bak suffixed tests - use dg-skip-if instead

2024-02-15 Thread Arthur Cohen
Hi Jakub, On 2/15/24 10:10, Jakub Jelinek wrote: On Fri, Feb 09, 2024 at 11:03:38AM +0100, Jakub Jelinek wrote: On Wed, Feb 07, 2024 at 12:43:59PM +0100, arthur.co...@embecosm.com wrote: From: Philip Herron This patch introduces one regression because generics are getting better understood

Invitation: gccrs community call January @ Mon 19 Feb 2024 11am - 11:30am (CET) (gcc-rust@gcc.gnu.org)

2024-02-12 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

Re: [COMMITTED 07/25] gccrs: TyTy: Store region constraints

2024-02-07 Thread Arthur Cohen
On 2/7/24 16:26, Bernhard Reutner-Fischer wrote: On Wed, 7 Feb 2024 12:43:53 +0100 arthur.co...@embecosm.com wrote: diff --git a/gcc/rust/typecheck/rust-hir-type-check-implitem.h b/gcc/rust/typecheck/rust-hir-type-check-implitem.h index 067465ec77a..4d178440775 100644 ---

Re: [COMMITTED 07/25] gccrs: TyTy: Store region constraints

2024-02-07 Thread Arthur Cohen
On 2/7/24 16:26, Bernhard Reutner-Fischer wrote: On Wed, 7 Feb 2024 12:43:53 +0100 arthur.co...@embecosm.com wrote: diff --git a/gcc/rust/typecheck/rust-hir-type-check-implitem.h b/gcc/rust/typecheck/rust-hir-type-check-implitem.h index 067465ec77a..4d178440775 100644 ---

[COMMITTED 23/25] gccrs: Parse trait functions as `AST::Function`.

2024-02-07 Thread arthur . cohen
From: Kushal Pal To use AST::Function for trait functions, we can parse trait functions using available parse_function(). gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_trait_item): Use parse_function() to parse trait functions. Signed-off-by: Kushal Pal ---

[COMMITTED 25/25] gccrs: Fix macro parsing for trait items.

2024-02-07 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_trait_item): Handle macros in trait items similar to how its handled for trait implementation items. Signed-off-by: Kushal Pal --- gcc/rust/parse/rust-parse-impl.h | 37

[COMMITTED 20/25] gccrs: Add checks for Trait functions

2024-02-07 Thread arthur . cohen
From: Kushal Pal Since we want to use AST::Function class for trait functions as well, we need to check against specific conditions in ASTValidation phase. gcc/rust/ChangeLog: * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add checks for Trait functions.

[COMMITTED 24/25] gccrs: Remove obsolete classes and functions.

2024-02-07 Thread arthur . cohen
From: Kushal Pal Trait functions now use AST::Function class, so classes AST::TraitItemFunc, AST::TraitItemMethod, AST::TraitFunctionDecl, AST::TraitMethodDecl and their related functions can be removed. gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit):

[COMMITTED 19/25] gccrs: Use AssociatedItem in place of TraitItem

2024-02-07 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * ast/rust-ast.h: Replace TraitItem with AssociatedItem. * ast/rust-item.h (class Trait): Likewise. * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Likewise. * parse/rust-parse-impl.h (Parser::parse_trait):

[COMMITTED 22/25] gccrs: Fix inconsistent formatting.

2024-02-07 Thread arthur . cohen
From: Kushal Pal gcc/testsuite/ChangeLog: * rust/compile/issue-2040.rs: Enclose 'const' in single quotes. Signed-off-by: Kushal Pal --- gcc/testsuite/rust/compile/issue-2040.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[COMMITTED 14/25] gccrs: remove similar hack in type paths as we had in path expressions

2024-02-07 Thread arthur . cohen
From: Philip Herron This keeps the resolution code in line with paths. Addresses #2723 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-type.cc: remove hack --- gcc/rust/typecheck/rust-hir-type-check-type.cc | 16 1 file changed, 16 deletions(-) diff --git

[COMMITTED 08/25] gccrs: TyTy: Store reference to type before any substitutions

2024-02-07 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * typecheck/rust-tyty.cc (BaseType::BaseType): Store orig ref. (BaseType::get_orig_ref): Add getter. * typecheck/rust-tyty.h: Store orig ref. Signed-off-by: Jakub Dupak --- gcc/rust/typecheck/rust-tyty.cc | 10 --

[COMMITTED 15/25] gccrs: refactor inference variable computation into a seperate method

2024-02-07 Thread arthur . cohen
From: Philip Herron gcc/rust/ChangeLog: * typecheck/rust-hir-type-check.cc (TypeResolution::Resolve): refactor * typecheck/rust-hir-type-check.h: new prototype * typecheck/rust-typecheck-context.cc (TypeCheckContext::compute_inference_variables): x ---

[COMMITTED 12/25] gccrs: Fix ICE accessing empty vector without check

2024-02-07 Thread arthur . cohen
From: Philip Herron Fixes #2747 gcc/rust/ChangeLog: * typecheck/rust-tyty-subst.cc (SubstitutionRef::get_mappings_from_generic_args): fix gcc/testsuite/ChangeLog: * rust/compile/issue-2747.rs: New test. --- gcc/rust/typecheck/rust-tyty-subst.cc| 3 ++-

[COMMITTED 13/25] gccrs: remove old generics hack to reuse generic symbols from previous seg

2024-02-07 Thread arthur . cohen
From: Philip Herron This patch introduces one regression because generics are getting better understood over time. The code here used to apply generics with the same symbol from previous segments which was a bit of a hack with out limited inference variable support. The regression looks like it

[COMMITTED 25/25] gccrs: Fix macro parsing for trait items.

2024-02-07 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_trait_item): Handle macros in trait items similar to how its handled for trait implementation items. Signed-off-by: Kushal Pal --- gcc/rust/parse/rust-parse-impl.h | 37

[COMMITTED 21/25] gccrs: Add missing visitors for AST::Function.

2024-02-07 Thread arthur . cohen
From: Kushal Pal To use AST::Function instead of AST::TraitItemFunc and AST::TraitItemMethod, we need to provide similar visitors during lowering and resolving phase. gcc/rust/ChangeLog: * hir/rust-ast-lower-implitem.cc (ASTLowerTraitItem::visit): Provide visitor for

[COMMITTED 05/25] gccrs: HIR: Add mising getter

2024-02-07 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * hir/tree/rust-hir-item.h: Add missing getter Signed-off-by: Jakub Dupak --- gcc/rust/hir/tree/rust-hir-item.h | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/rust/hir/tree/rust-hir-item.h b/gcc/rust/hir/tree/rust-hir-item.h index

[COMMITTED 10/25] gccrs: add testcase to prove issue has already been fixed

2024-02-07 Thread arthur . cohen
From: Philip Herron Fixes #1483 gcc/testsuite/ChangeLog: * rust/compile/issue-1483.rs: New test. --- gcc/testsuite/rust/compile/issue-1483.rs | 28 1 file changed, 28 insertions(+) create mode 100644 gcc/testsuite/rust/compile/issue-1483.rs diff --git

[COMMITTED 08/25] gccrs: TyTy: Store reference to type before any substitutions

2024-02-07 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * typecheck/rust-tyty.cc (BaseType::BaseType): Store orig ref. (BaseType::get_orig_ref): Add getter. * typecheck/rust-tyty.h: Store orig ref. Signed-off-by: Jakub Dupak --- gcc/rust/typecheck/rust-tyty.cc | 10 --

[COMMITTED 16/25] gccrs: Move the Implementation of implitem lowering into its own file.

2024-02-07 Thread arthur . cohen
From: Nobel Singh This patch moves the implementation of the implitem lowering from rust-ast-lower-implitem.h into the rust-ast-lower-implitem.cc file. gcc/rust/ChangeLog: * Make-lang.in: Add rust-ast-lower-implitem.cc to list of objects. * hir/rust-ast-lower-implitem.h

[COMMITTED 22/25] gccrs: Fix inconsistent formatting.

2024-02-07 Thread arthur . cohen
From: Kushal Pal gcc/testsuite/ChangeLog: * rust/compile/issue-2040.rs: Enclose 'const' in single quotes. Signed-off-by: Kushal Pal --- gcc/testsuite/rust/compile/issue-2040.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[COMMITTED 21/25] gccrs: Add missing visitors for AST::Function.

2024-02-07 Thread arthur . cohen
From: Kushal Pal To use AST::Function instead of AST::TraitItemFunc and AST::TraitItemMethod, we need to provide similar visitors during lowering and resolving phase. gcc/rust/ChangeLog: * hir/rust-ast-lower-implitem.cc (ASTLowerTraitItem::visit): Provide visitor for

[COMMITTED 09/25] gccrs: Set the default ABI to C for extern blocks and extern functions

2024-02-07 Thread arthur . cohen
From: Nobel Singh Previously, the default ABI was set to Rust, which is not correct for extern blocks and extern functions. This patch changes the default ABI to C for these cases. gcc/rust/ChangeLog: * hir/rust-ast-lower-base.cc (ASTLoweringBase::lower_qualifiers): Change

[COMMITTED 17/25] gccrs: Add testcase to show issue is already fixed

2024-02-07 Thread arthur . cohen
From: Philip Herron Fixes #2782 gcc/testsuite/ChangeLog: * rust/compile/issue-2782.rs: New test. Signed-off-by: Philip Herron --- gcc/testsuite/rust/compile/issue-2782.rs | 12 1 file changed, 12 insertions(+) create mode 100644 gcc/testsuite/rust/compile/issue-2782.rs

[COMMITTED 14/25] gccrs: remove similar hack in type paths as we had in path expressions

2024-02-07 Thread arthur . cohen
From: Philip Herron This keeps the resolution code in line with paths. Addresses #2723 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-type.cc: remove hack --- gcc/rust/typecheck/rust-hir-type-check-type.cc | 16 1 file changed, 16 deletions(-) diff --git

[COMMITTED 18/25] gccrs: fix bug in pattern check for tuples

2024-02-07 Thread arthur . cohen
From: Philip Herron We can point to generic parent types which means we need to do the shallow resolve thing that rustc does. We have destructure which is similar to get what the parameter type points to. Fixes #2775 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-pattern.cc

[COMMITTED 11/25] gccrs: add test cases to prove type inference is working

2024-02-07 Thread arthur . cohen
From: Philip Herron Fixes #2772 gcc/testsuite/ChangeLog: * rust/compile/issue-2772-1.rs: New test. * rust/compile/issue-2772-2.rs: New test. --- gcc/testsuite/rust/compile/issue-2772-1.rs | 20 gcc/testsuite/rust/compile/issue-2772-2.rs | 20

[COMMITTED 04/25] gccrs: TyTy: Region (lifetime) representation

2024-02-07 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * typecheck/rust-tyty-region.h: New file. Signed-off-by: Jakub Dupak --- gcc/rust/typecheck/rust-tyty-region.h | 110 ++ 1 file changed, 110 insertions(+) create mode 100644 gcc/rust/typecheck/rust-tyty-region.h diff

[COMMITTED 03/25] gccrs: Typecheck: lifetime interning and resolution tool

2024-02-07 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * typecheck/rust-hir-type-check.h (class Lifetime): add interned lifetime class * typecheck/rust-typecheck-context.cc (TypeCheckContext::TypeCheckContext): add resolution tool (TypeCheckContext::intern_lifetime): add method

[COMMITTED 24/25] gccrs: Remove obsolete classes and functions.

2024-02-07 Thread arthur . cohen
From: Kushal Pal Trait functions now use AST::Function class, so classes AST::TraitItemFunc, AST::TraitItemMethod, AST::TraitFunctionDecl, AST::TraitMethodDecl and their related functions can be removed. gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit):

[COMMITTED 15/25] gccrs: refactor inference variable computation into a seperate method

2024-02-07 Thread arthur . cohen
From: Philip Herron gcc/rust/ChangeLog: * typecheck/rust-hir-type-check.cc (TypeResolution::Resolve): refactor * typecheck/rust-hir-type-check.h: new prototype * typecheck/rust-typecheck-context.cc (TypeCheckContext::compute_inference_variables): x ---

[COMMITTED 23/25] gccrs: Parse trait functions as `AST::Function`.

2024-02-07 Thread arthur . cohen
From: Kushal Pal To use AST::Function for trait functions, we can parse trait functions using available parse_function(). gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_trait_item): Use parse_function() to parse trait functions. Signed-off-by: Kushal Pal ---

[COMMITTED 20/25] gccrs: Add checks for Trait functions

2024-02-07 Thread arthur . cohen
From: Kushal Pal Since we want to use AST::Function class for trait functions as well, we need to check against specific conditions in ASTValidation phase. gcc/rust/ChangeLog: * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add checks for Trait functions.

[COMMITTED 17/25] gccrs: Add testcase to show issue is already fixed

2024-02-07 Thread arthur . cohen
From: Philip Herron Fixes #2782 gcc/testsuite/ChangeLog: * rust/compile/issue-2782.rs: New test. Signed-off-by: Philip Herron --- gcc/testsuite/rust/compile/issue-2782.rs | 12 1 file changed, 12 insertions(+) create mode 100644 gcc/testsuite/rust/compile/issue-2782.rs

[COMMITTED 18/25] gccrs: fix bug in pattern check for tuples

2024-02-07 Thread arthur . cohen
From: Philip Herron We can point to generic parent types which means we need to do the shallow resolve thing that rustc does. We have destructure which is similar to get what the parameter type points to. Fixes #2775 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-pattern.cc

[COMMITTED 11/25] gccrs: add test cases to prove type inference is working

2024-02-07 Thread arthur . cohen
From: Philip Herron Fixes #2772 gcc/testsuite/ChangeLog: * rust/compile/issue-2772-1.rs: New test. * rust/compile/issue-2772-2.rs: New test. --- gcc/testsuite/rust/compile/issue-2772-1.rs | 20 gcc/testsuite/rust/compile/issue-2772-2.rs | 20

[COMMITTED 06/25] gccrs: Typecheck: add regions (lifetimes) to TyTy

2024-02-07 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * typecheck/rust-hir-trait-resolve.cc: add regions * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::resolve_literal): add regions, resolve generic lifetimes * typecheck/rust-hir-type-check-expr.cc

[COMMITTED 09/25] gccrs: Set the default ABI to C for extern blocks and extern functions

2024-02-07 Thread arthur . cohen
From: Nobel Singh Previously, the default ABI was set to Rust, which is not correct for extern blocks and extern functions. This patch changes the default ABI to C for these cases. gcc/rust/ChangeLog: * hir/rust-ast-lower-base.cc (ASTLoweringBase::lower_qualifiers): Change

[COMMITTED 03/25] gccrs: Typecheck: lifetime interning and resolution tool

2024-02-07 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * typecheck/rust-hir-type-check.h (class Lifetime): add interned lifetime class * typecheck/rust-typecheck-context.cc (TypeCheckContext::TypeCheckContext): add resolution tool (TypeCheckContext::intern_lifetime): add method

[COMMITTED 04/25] gccrs: TyTy: Region (lifetime) representation

2024-02-07 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * typecheck/rust-tyty-region.h: New file. Signed-off-by: Jakub Dupak --- gcc/rust/typecheck/rust-tyty-region.h | 110 ++ 1 file changed, 110 insertions(+) create mode 100644 gcc/rust/typecheck/rust-tyty-region.h diff

[COMMITTED 05/25] gccrs: HIR: Add mising getter

2024-02-07 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * hir/tree/rust-hir-item.h: Add missing getter Signed-off-by: Jakub Dupak --- gcc/rust/hir/tree/rust-hir-item.h | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/rust/hir/tree/rust-hir-item.h b/gcc/rust/hir/tree/rust-hir-item.h index

[COMMITTED 02/25] gccrs: Implement quick-check for Unicode

2024-02-07 Thread arthur . cohen
From: Raiki Tamura gcc/rust/ChangeLog: * rust-lang.cc (run_rust_tests): Add test. * rust-system.h: Add . * util/make-rust-unicode.py: Output NFC_Quick_Check table. * util/rust-codepoint.h (struct Codepoint): Add is_supplementary method. *

[COMMITTED 12/25] gccrs: Fix ICE accessing empty vector without check

2024-02-07 Thread arthur . cohen
From: Philip Herron Fixes #2747 gcc/rust/ChangeLog: * typecheck/rust-tyty-subst.cc (SubstitutionRef::get_mappings_from_generic_args): fix gcc/testsuite/ChangeLog: * rust/compile/issue-2747.rs: New test. --- gcc/rust/typecheck/rust-tyty-subst.cc| 3 ++-

[COMMITTED 16/25] gccrs: Move the Implementation of implitem lowering into its own file.

2024-02-07 Thread arthur . cohen
From: Nobel Singh This patch moves the implementation of the implitem lowering from rust-ast-lower-implitem.h into the rust-ast-lower-implitem.cc file. gcc/rust/ChangeLog: * Make-lang.in: Add rust-ast-lower-implitem.cc to list of objects. * hir/rust-ast-lower-implitem.h

[COMMITTED 19/25] gccrs: Use AssociatedItem in place of TraitItem

2024-02-07 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * ast/rust-ast.h: Replace TraitItem with AssociatedItem. * ast/rust-item.h (class Trait): Likewise. * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Likewise. * parse/rust-parse-impl.h (Parser::parse_trait):

[COMMITTED 13/25] gccrs: remove old generics hack to reuse generic symbols from previous seg

2024-02-07 Thread arthur . cohen
From: Philip Herron This patch introduces one regression because generics are getting better understood over time. The code here used to apply generics with the same symbol from previous segments which was a bit of a hack with out limited inference variable support. The regression looks like it

  1   2   3   4   5   6   7   8   9   10   >