GUPTA
>> wrote:
>> > Dear GCC Community,
>> >
>> > I hope this email finds you well. My name is Arpit and I am writing to
>> > express my interest in participating in GSoC, specifically for the
>> > Rust Front-End project at GCC.
>>
>>
ally for the
> Rust Front-End project at GCC.
You're, however, too late for GSoC 2023 (..., which you'd referenced at
the end of your email), but also still too early for GSoC 2024; see
<https://developers.google.com/open-source/gsoc/timeline>.
Building the compiler and beginning to
On Wed, Apr 5, 2023 at 4:06 PM wrote:
>
> Hi everyone,
>
> This patchset contains around 80 commits concerning the Rust frontend.
>
> We have been hard at work trying to get the Rust core library to
> compile, and hope to push more commits in the coming days as we try
> and upstream a more recent
Sigh thank you :)
I'll blame this on the construction work going on in the building /s
I have rebased the commits, built them and tested them, and they are now
properly pushed.
Thanks Thomas :)
On 4/6/23 09:59, Thomas Schwinge wrote:
Hi Arthur!
On 2023-04-05T16:02:43+0200, arthur.co...
Hi Arthur!
On 2023-04-05T16:02:43+0200, arthur.co...@embecosm.com wrote:
> This patchset contains around 80 commits concerning the Rust frontend.
Did you not intend to actually 'git push' those? ;-P
Grüße
Thomas
> We have been hard at work trying to get the Rust core library to
> compile, a
Hi everyone,
This patchset contains around 80 commits concerning the Rust frontend.
We have been hard at work trying to get the Rust core library to
compile, and hope to push more commits in the coming days as we try
and upstream a more recent version of gccrs. All of the team has done
a tremendo
Hi everyone,
This series contain the majority of gccrs commits which were present on
our GitHub repository but did not have a Changelog entry yet. We have
cleaned, rebased, tested and fixed all of these to contain proper
Changelog entries as well as DCO signoff for big contributions.
All of these
ust/config-lang.in
> +target_libs="target-libffi target-libbacktrace"
(By the way, this setting of 'target_libs' was not present in the v1
<https://inbox.sourceware.org/gcc-patches/20220727134040.843750-2-philip.her...@embecosm.com>
"[PATCH Rust front-end v1 1/4] Add ske
On Thu, Dec 15, 2022 at 04:01:33PM +0100, Thomas Schwinge wrote:
> Or, options are applicable to just one front end, and can just be a no-op
> for others, for shared-language compilation. For example, '-nostdinc++',
> or '-frust-incomplete-and-experimental-compiler-do-not-use' need not
> necessari
Hi!
On 2022-12-15T12:50:44+0100, Jakub Jelinek via Gcc-patches
wrote:
> On Thu, Dec 15, 2022 at 12:39:38PM +0100, Iain Buclaw wrote:
>> For the gdc testsuite, those warnings arise because both language files
>> are compiled in the same invocation (dg-additional-sources "cpp11.cpp"),
>> so it end
On Thu, Dec 15, 2022 at 12:39:38PM +0100, Iain Buclaw wrote:
> For the gdc testsuite, those warnings arise because both language files
> are compiled in the same invocation (dg-additional-sources "cpp11.cpp"),
> so it ends up looking something like:
>
> gdc -fextern-std=c++11 testcpp11.d cpp11
Excerpts from Jakub Jelinek via Gcc-patches's message of Dezember 15, 2022
12:16 pm:
> We seem to have a problem in other testsuites too:
> grep ' valid for .*but not for' */*.log | sort -u
> gcc/gcc.log:/home/jakub/src/gcc/gcc/testsuite/gcc.dg/pragma-diag-6.c:2:30:
> warning: option '-Wnoexcept'
e:
> >> > We've also added one more commit, which only affects files inside the
> >> > Rust front-end folder. This commit adds an experimental flag, which
> >> > blocks the compilation of Rust code when not used.
> >>
> >> (That's commit
Hi!
On 2022-12-15T08:53:13+0100, Richard Biener wrote:
> On Wed, Dec 14, 2022 at 11:58 PM Thomas Schwinge
> wrote:
>> On 2022-12-13T14:40:36+0100, Arthur Cohen wrote:
>> > We've also added one more commit, which only affects files inside the
>> > Rust fr
On Wed, Dec 14, 2022 at 11:58 PM Thomas Schwinge
wrote:
>
> Hi!
>
> On 2022-12-13T14:40:36+0100, Arthur Cohen wrote:
> > We've also added one more commit, which only affects files inside the
> > Rust front-end folder. This commit adds an experimental flag, which
Hi!
On 2022-12-13T14:40:36+0100, Arthur Cohen wrote:
> We've also added one more commit, which only affects files inside the
> Rust front-end folder. This commit adds an experimental flag, which
> blocks the compilation of Rust code when not used.
(That
On Tue, 13 Dec 2022, Martin Liška wrote:
> If the Rust folks are willing to use Sphinx, then yes, I'm going to
> prepare a common infrastructure (baseconf.py, common license files and a
> common Makefile). So something similar to what I prepared for the Sphinx
> conversion that didn't make it.
Hi Martin,
On 12/13/22 14:30, Martin Liška wrote:
On 12/13/22 14:26, Arthur Cohen wrote:
Thank you, and congratulations, to all the contributors.
We thank you!! Congratulations.
Thank you :)
I have one question: do you have a list of supported architectures Rust FE
can support right now?
We've also added one more commit, which only affects files inside the
Rust front-end folder. This commit adds an experimental flag, which
blocks the compilation of Rust code when not used. We hope this helps
indicate to users that the compiler is not yet ready, but can still be
experim
On 12/13/22 14:26, Arthur Cohen wrote:
> Thank you, and congratulations, to all the contributors.
We thank you!! Congratulations.
I have one question: do you have a list of supported architectures Rust FE
can support right now? What are you plans for GCC 13.1 release?
Cheers,
Martin
>
> All th
7; in the first column indicates a patch has been reviewed.
One in the second column indicates that a patch has been approved.
|0001-Use-DW_ATE_UTF-for-the-Rust-char-type.patch |x|x|
|0002-gccrs-Add-necessary-hooks-for-a-Rust-front-end-tests.patch|x|x|
|0003-gccrs-Add-Debug-info-
On 12/13/22 02:43, Joseph Myers wrote:
> On Fri, 9 Dec 2022, Martin Liška wrote:
>
>> On 12/6/22 11:14, arthur.co...@embecosm.com wrote:
>>> |We still need to write out a documentation section, but these READMEs will
>>> help in the meantime.|
>>
>> Hello.
>>
>> Just a quick comment: The Sphinx c
On Fri, 9 Dec 2022, Martin Liška wrote:
> On 12/6/22 11:14, arthur.co...@embecosm.com wrote:
> > |We still need to write out a documentation section, but these READMEs will
> > help in the meantime.|
>
> Hello.
>
> Just a quick comment: The Sphinx conversion didn't make it for all GCC
> manual
then force-updated the staging branch gcc-patch-dev: incorporate
these changes into the respective original commits.
Additionally fix up "gccrs: Add Parser for Rust front-end pt.1":
`new blank line at EOF` for `gcc/rust/parse/rust-parse-impl.h`.
Grüße
Thomas
-
Siemens Elec
Hi!
On 2022-12-06T12:03:56+0100, Richard Biener via Gcc-patches
wrote:
> On Tue, Dec 6, 2022 at 11:11 AM wrote:
>> This patchset contains the fixed version of our most recent patchset. [...]
>
> Thanks a lot - this is OK to merge now
Hey, hey! :-)
Still working on some final edits to make t
On 12/6/22 11:13, arthur.co...@embecosm.com wrote:
> Similarly to the previous round of patches, this patchset does not contain any
> new features - only fixes for the reviews of the v3. New features will follow
> shortly once that first patchset is merged.
>
> Once again, thank you to all the con
On 12/6/22 11:14, arthur.co...@embecosm.com wrote:
> |We still need to write out a documentation section, but these READMEs will
> help in the meantime.|
Hello.
Just a quick comment: The Sphinx conversion didn't make it for all GCC manuals.
However,
you can still use Sphinx for a newly created
From: Arthur Cohen
Changelog:
* MAINTAINERS: Add Arthur Cohen as Rust front-end maintainer.
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 55c5ef95806..d2eea049667 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -165,6 +165,7 @@ D front
Hi!
On 2022-12-07T09:50:40+0100, Arsen Arsenović via Gcc-patches
wrote:
> arthur.co...@embecosm.com writes:
>
>> This is a wrapper for make_unique. We can likely get rid of this, as there
>> are other implementations available, or simply keep using the unique_ptr
>> constructor.
>> ---
>> gcc/r
arthur.co...@embecosm.com writes:
> This is a wrapper for make_unique. We can likely get rid of this, as there
> are other implementations available, or simply keep using the unique_ptr
> constructor.
> ---
> gcc/rust/util/rust-make-unique.h | 35
> 1 file change
Hi John,
On Tue, Dec 06, 2022 at 12:57:17PM +0100, John Paul Adrian Glaubitz wrote:
> On 12/6/22 12:40, Arthur Cohen wrote:
> > > Can't wait to see this becoming available in the distributions :D.
> > >
> > > I will make sure we get the frontend enabled in Debian as soon as
> > > possible.
> >
On 12/6/22 12:40, Arthur Cohen wrote:
Can't wait to see this becoming available in the distributions :D.
I will make sure we get the frontend enabled in Debian as soon as possible.
Haha, I appreciate the enthusiasm :) Please note however that despite the
language
being in, the compiler is sti
Excerpts from Richard Biener via Gcc-patches's message of Dezember 6, 2022
12:03 pm:
> On Tue, Dec 6, 2022 at 11:11 AM wrote:
>>
>> This patchset contains the fixed version of our most recent patchset. We
>> have fixed most of the issues noted in the previous round of reviews, and are
>> keeping
On 12/6/22 12:09, John Paul Adrian Glaubitz wrote:
On 12/6/22 12:03, Richard Biener via Gcc-rust wrote:
On Tue, Dec 6, 2022 at 11:11 AM wrote:
This patchset contains the fixed version of our most recent patchset. We
have fixed most of the issues noted in the previous round of reviews,
and
On 12/6/22 12:03, Richard Biener via Gcc-rust wrote:
On Tue, Dec 6, 2022 at 11:11 AM wrote:
This patchset contains the fixed version of our most recent patchset. We
have fixed most of the issues noted in the previous round of reviews, and are
keeping some for later as they would otherwise crea
-DW_ATE_UTF-for-the-Rust-char-type.patch |x|x|
> |0002-gccrs-Add-necessary-hooks-for-a-Rust-front-end-tests.patch|x|x|
> |0003-gccrs-Add-Debug-info-testsuite.patch | | |
> |0004-gccrs-Add-link-cases-testsuite.patch | | |
> |0005-gccrs-
tsuite/rust/compile/torture/type_infer1.rs -o type_infer1
+```
+
+To emit assembly :
+```bash
+$ docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp \
+gccrs-dev:latest gccrs -g -O2 \
+ gcc/testsuite/rust/compile/torture/type_infer1.rs -S -o type_infer1.s
From: Philip Herron
This is a wrapper to get out of C land in the rust-lang.cc and into our
class hierarchy for the rust front-end. We expect that the front-end only
support one source file input as the expansion pass will attempt to resolve
that relative pass and parse accordingly.
The main
index 000..b05f8ae5454
--- /dev/null
+++ b/gcc/rust/rustspec.cc
@@ -0,0 +1,191 @@
+/* rustspec.c -- Specific flags and argument handling of the gcc Rust front
end.
+ Copyright (C) 2009-2022 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can
From: Philip Herron
The wrappers over linemap and location will eventually disappear here but
served as a useful starting point for us. We have wrappers over the
diagnostics system which we might be able to get rid of as well.
---
gcc/rust/rust-diagnostics.cc | 244 ++
From: Philip Herron
This patch contains the entry point and utilities used for the lowering
of HIR nodes to `tree`s. It also contains a constant evaluator, ported
over from the C++ frontend.
Co-authored-by: David Faust
Co-authored-by: Faisal Abbas <90.abbasfai...@gmail.com>
---
gcc/rust/backen
From: Philip Herron
This was a copy/paste from gccgo front-end. We do not use any of the
target_libs yet, but we will need these when we support the libpanic crate.
---
gcc/rust/config-lang.in | 34 ++
1 file changed, 34 insertions(+)
create mode 100644 gcc/rust/
From: Arthur Cohen
This pass is responsible for resolving the privacy of items and verifying
that access to these items is performed within the limits of that privacy.
By default, items in Rust are private and only public to the current
module and its submodules. However, the user can annotate an
t/lang.opt
@@ -0,0 +1,118 @@
+; Options for the Rust front end.
+; Copyright (C) 2003-2022 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+
From: Philip Herron
This specifies the extensions of the Rust language.
---
gcc/rust/lang-specs.h | 26 ++
1 file changed, 26 insertions(+)
create mode 100644 gcc/rust/lang-specs.h
diff --git a/gcc/rust/lang-specs.h b/gcc/rust/lang-specs.h
new file mode 100644
index 000
From: Philip Herron
This is the Makefile for our front-end.
---
gcc/rust/Make-lang.in | 402 ++
1 file changed, 402 insertions(+)
create mode 100644 gcc/rust/Make-lang.in
diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in
new file mode 100644
ind
From: Philip Herron
Extern crates statements to tell the front-end to look for another library.
The mechanism here is heavily inspired from gccgo, so when we compile a
library for example we invoke:
gccrs -g -O2 -frust-crate=mylib -c src/lib.rs -o src/mylib.o
All going well this object file w
From: Philip Herron
This is a simple walk_tree which acts on the monomorphized code by walking
the compiled translation unit of functions.
---
gcc/rust/checks/lints/rust-lint-unused-var.cc | 98 +++
gcc/rust/checks/lints/rust-lint-unused-var.h | 36 +++
2 files changed, 134
From: Philip Herron
This is a simple helper over an enum of possible ABI options in Rust.
---
gcc/rust/util/rust-abi.cc | 72 +++
gcc/rust/util/rust-abi.h | 45
2 files changed, 117 insertions(+)
create mode 100644 gcc/rust/util/rust
From: Philip Herron
This is a wrapper for make_unique. We can likely get rid of this, as there
are other implementations available, or simply keep using the unique_ptr
constructor.
---
gcc/rust/util/rust-make-unique.h | 35
1 file changed, 35 insertions(+)
creat
From: Philip Herron
Contains abstractions over Rust's types, used when performing the
HIR's type-resolution.
---
gcc/rust/typecheck/rust-tyty.cc | 2885 +++
gcc/rust/typecheck/rust-tyty.h | 2533 +++
2 files changed, 5418 insertions(+)
create
From: Arthur Cohen
Similarly to the unsafe checker, constant evaluation can only be performed
in a few contexts and include restrictions on the Rust language. Should
the user fail to uphold those conditions, errors will be reported and the
compilation pipeline interrupted.
These contexts are as
From: Philip Herron
These are various helper classes used in the compiler pipeline.
---
gcc/rust/util/rust-canonical-path.h | 195 +
gcc/rust/util/rust-common.h | 53 ++
gcc/rust/util/rust-hir-map.cc | 980 ++
gcc/rust/util/rust-hir-map.h
From: Arthur Cohen
The UnsafeChecker visitor verifies that unsafe actions are only performed
in unsafe contexts. Otherwise, an error should be reported to the user and
the compilation pipeline should be halted. These contexts, which include
unsafe blocks or unsafe functions, are allowed to perfor
From: Thomas Young
In order to find dead code we use a depth first search and keep liveness
variables, after type resolution. In this case, if a function is unused
and it calls another function the 2nd function is now unused since the
caller is not used etc. The algorithm is a depth first search.
From: Arthur Cohen
The attribute checker is responsible for checking the validity of various
attributes including built-in ones. It is currently unfinished and will
receive some modifications, as well as become the host of some existing
code in the compiler which needs to be refactored. One of it
From: Arthur Cohen
Used for V0 symbol mangling scheme which is still in development.
---
gcc/rust/util/rust-base62.cc | 46
gcc/rust/util/rust-base62.h | 34 ++
2 files changed, 80 insertions(+)
create mode 100644 gcc/rust/util/rust-
From: Arthur Cohen
This adds an Optional class to improve error handling.
---
gcc/rust/util/rust-optional-test.cc | 110 +++
gcc/rust/util/rust-optional.h | 278
2 files changed, 388 insertions(+)
create mode 100644 gcc/rust/util/rust-optional-test.cc
From: Philip Herron
This patch implements the classes mentioned in the previous HIR patch,
as well as a set of visitor frameworks used in handling that HIR.
---
gcc/rust/hir/tree/rust-hir-full-decls.h | 232 +
gcc/rust/hir/tree/rust-hir-full-test.cc | 5292 +++
gcc/rust/hir/
From: The Other
This adds the proper definitions of our AST Item nodes.
Co-authored-by: Philip Herron
---
gcc/rust/ast/rust-item.h | 4382 ++
1 file changed, 4382 insertions(+)
create mode 100644 gcc/rust/ast/rust-item.h
diff --git a/gcc/rust/ast/rust-item
From: The Other
This patch contains the basic framework of our AST visitors, as well as
one aimed at pretty-printing and exporting these AST nodes.
Co-authored-by: Philip Herron
Co-authored-by: Arthur Cohen
---
gcc/rust/ast/rust-ast-dump.cc| 1089 ++
gcc/rust/a
From: Philip Herron
This hash was ported from the Go runtime, as we needed a hash for the legacy
symbol mangling system. All symbols in Rust contain a hash of some
metadata for uniqueness on generic functions.
---
gcc/rust/util/fnv-hash.h | 95
1 file cha
From: The Other
The lexer is referred to as a ManagedTokenSource within the parser. This
lexer does not currently support Unicode, but serves as a starting point
to do so.
Co-authored-by: Philip Herron
Co-authored-by: Arthur Cohen
Co-authored-by: Mark Wielaard
---
gcc/rust/lex/rust-codepoint
From: Philip Herron
This testsuite is specifically about testcases which scan the asm debug
info for results.
Co-authored-by: Tom Tromey
Co-authored-by: Mark Wielaard
Co-authored-by: Marc Poulhiès
---
gcc/testsuite/rust/debug/chartype.rs | 10 ++
.../rust/debug/custom_link_secti
From: Philip Herron
This allows us to invoke the rust testsuite.
ChangeLog:
* Makefile.def: Add Rust language.
* Makefile.in: Regenerate via autogen.
---
Makefile.def | 1 +
Makefile.in | 8
2 files changed, 9 insertions(+)
diff --git a/Makefile.def b/Makefile.def
ind
From: Philip Herron
This testsuite is heavily inspired from the LTO testsuite that uses a
pattern where each file is compiled to an object file and finally linked
together. Since Rust does not have headers/prototypes, we rely on the
ordering here so that all files numbered greater than zero get c
From: Philip Herron
This copies over code from other front-end testsuites to enable testing
for the rust front-end specifically.
Co-authored-by: Marc Poulhiès
Co-authored-by: Thomas Schwinge
---
gcc/testsuite/lib/rust-dg.exp | 49 +
gcc/testsuite/lib/rust.exp| 186
From: Tom Tromey
The Rust 'char' type should use the DWARF DW_ATE_UTF encoding.
Co-authored-by: Mark Wielaard
Co-authored-by: Marc Poulhiès
---
gcc/dwarf2out.cc | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index e3
ed.
|0001-Use-DW_ATE_UTF-for-the-Rust-char-type.patch |x|x|
|0002-gccrs-Add-necessary-hooks-for-a-Rust-front-end-tests.patch|x|x|
|0003-gccrs-Add-Debug-info-testsuite.patch | | |
|0004-gccrs-Add-link-cases-testsuite.patch | | |
|0005-gccrs-A
Hi!
On 2022-09-14T15:34:10+0200, Richard Biener via Gcc-patches
wrote:
> On Wed, Aug 24, 2022 at 2:22 PM wrote:
>> --- /dev/null
>> +++ b/gcc/rust/Make-lang.in
>> +# TODO: possibly find a way to ensure C++11 compilation level here?
>> +RUST_CXXFLAGS = -std=c++11 -Wno-unused-parameter -Werror=o
On Tue, Nov 29, 2022 at 7:10 PM Arthur Cohen wrote:
>
> Hi Richard,
>
> (...)
>
> +
> + unsigned HOST_WIDE_INT ltype_length
> += wi::ext (wi::to_offset (TYPE_MAX_VALUE (ltype_domain))
> +- wi::to_offset (TYPE_MIN_VALUE (ltype_domain)) + 1,
> >>>
> >>> TYPE_
Hi Richard,
(...)
+
+ unsigned HOST_WIDE_INT ltype_length
+= wi::ext (wi::to_offset (TYPE_MAX_VALUE (ltype_domain))
+- wi::to_offset (TYPE_MIN_VALUE (ltype_domain)) + 1,
TYPE_MIN_VALUE is not checked to be constant, also the correct
check would be to use TREE_CODE (..) ==
Hi!
On 2022-11-09T14:53:44+0100, Richard Biener via Gcc-patches
wrote:
> On Wed, Oct 26, 2022 at 10:37 AM wrote:
>> This patch [...] also contains a constant evaluator, ported
>> over from the C++ frontend.
Given that, and then:
>> --- /dev/null
>> +++ b/gcc/rust/backend/rust-constexpr.cc
>>
On Tue, Nov 15, 2022 at 2:46 PM Arthur Cohen wrote:
>
>
>
> On 11/9/22 14:53, Richard Biener wrote:
> > On Wed, Oct 26, 2022 at 10:37 AM wrote:
> >>
> >> From: Philip Herron
> >>
> >> This patch contains the entry point and utilities used for the lowering
> >> of HIR nodes to `tree`s. It also co
Mark Wielaard writes:
> https://code.wildebeest.org/git/user/mjw/gccrs/commit/?h=no-Rust-old
> if someone wants to push that, to merge for a v4.
Sorry, missed that part, taking care of merging it right now :)
https://github.com/Rust-GCC/gccrs/pull/1649
Thanks,
Marc
--
Gcc-rust mailing list
Gc
On 11/9/22 14:53, Richard Biener wrote:
On Wed, Oct 26, 2022 at 10:37 AM wrote:
From: Philip Herron
This patch contains the entry point and utilities used for the lowering
of HIR nodes to `tree`s. It also contains a constant evaluator, ported
over from the C++ frontend.
Co-authored-by: Da
On Wed, Oct 26, 2022 at 10:37 AM wrote:
>
> From: Philip Herron
>
> This patch contains the entry point and utilities used for the lowering
> of HIR nodes to `tree`s. It also contains a constant evaluator, ported
> over from the C++ frontend.
>
> Co-authored-by: David Faust
> Co-authored-by: Fai
> "Mark" == Mark Wielaard writes:
Mark> DW_LANG_Rust_old was used by old rustc compilers <= 2016 before DWARF5
Mark> assigned an official number. It might be recognized by some
Mark> debuggers.
FWIW I wouldn't worry about it any more.
We could probably just remove the '_old' constant.
Tom
-
On Sun, Oct 30, 2022 at 04:22:34PM +0100, Mark Wielaard wrote:
> Hi,
>
> On Wed, Oct 26, 2022 at 10:39:09AM +0200, Jakub Jelinek wrote:
> > I must say I don't understand nor like this DW_LANG_Rust_old stuff at all.
> > Other languages don't do similar dances.
> > Look for D, or Go. Neither of the
Hi,
On Wed, Oct 26, 2022 at 10:39:09AM +0200, Jakub Jelinek wrote:
> I must say I don't understand nor like this DW_LANG_Rust_old stuff at all.
> Other languages don't do similar dances.
> Look for D, or Go. Neither of them has any non-standard lang code as
> fallback, they use the DWARF assigned
(...snip...)
+RUST_SELFTEST_FLAGS = -xrs $(SELFTEST_FLAGS)
I've noticed that this patch contains a typo which prevents self-tests
from running properly. This should be `-xrust`, not `-xrs`. I assume
there will be some other review comments, so that will be fixed in a v4
of the patches.
So
On 10/26/22 23:04, David Malcolm wrote:
%{On Wed, 2022-10-26 at 10:18 +0200, arthur.co...@embecosm.com wrote:
From: Philip Herron
Extern crates statements to tell the front-end to look for another
library.
The mechanism here is heavily inspired from gccgo, so when we compile
a
library for exam
%{On Wed, 2022-10-26 at 10:18 +0200, arthur.co...@embecosm.com wrote:
> From: Philip Herron
>
> Extern crates statements to tell the front-end to look for another
> library.
> The mechanism here is heavily inspired from gccgo, so when we compile
> a
> library for example we invoke:
>
[...snip..
On Wed, 2022-10-26 at 10:17 +0200, arthur.co...@embecosm.com wrote:
> From: Philip Herron
>
> This is a wrapper for make_unique we can likely get rid of this as
> there
> are other implementations available or simply keep using the
> unique_ptr
> constructor.
[CCing Jonathan]
As it happens, I j
c/testsuite/rust/compile/torture/type_infer1.rs -o type_infer1
+```
+
+To emit assembly :
+```bash
+$ docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp \
+gccrs-dev:latest gccrs -g -O2 \
+gcc/testsuite/rust/compile/torture/type_infer1.rs -S -o type_infer
From: Philip Herron
This is a wrapper to get out of C land in the rust-lang.cc and into our
class hierarchy for the rust front-end. We expect that the front-end only
support one source file input as the expansion pass will attempt to resolve
that relative pass and parse accordingly.
The main
On Wed, Oct 26, 2022 at 10:17:26AM +0200, arthur.co...@embecosm.com wrote:
> @@ -25201,6 +25215,13 @@ gen_compile_unit_die (const char *filename)
> }
>else if (strcmp (language_string, "GNU F77") == 0)
> language = DW_LANG_Fortran77;
> + else if (strcmp (language_string, "GNU Rust")
From: Philip Herron
This is a simple walk_tree which acts on the monomorphized code. By walking
the compiled translation unit of functions.
---
gcc/rust/checks/lints/rust-lint-unused-var.cc | 98 +++
gcc/rust/checks/lints/rust-lint-unused-var.h | 36 +++
2 files changed, 134
From: Philip Herron
This was a copy paste from gccgo front-end, we do not use any of the
target_libs yet but we will need these when we support the libpanic crate.
---
gcc/rust/config-lang.in | 34 ++
1 file changed, 34 insertions(+)
create mode 100644 gcc/rust/c
From: Thomas Young
In order to find dead code we use a depth first search and keep liveness
variables, after type resolution. In this case, if a function is unused
and it calls another function the 2nd function is now unused since the
caller is not used etc. The algorithm is a depth first search.
From: Philip Herron
Contains abstractions over Rust's types, used when performing the
HIR's type-resolution.
---
gcc/rust/typecheck/rust-tyty.cc | 2885 +++
gcc/rust/typecheck/rust-tyty.h | 2533 +++
2 files changed, 5418 insertions(+)
create
index 000..b05f8ae5454
--- /dev/null
+++ b/gcc/rust/rustspec.cc
@@ -0,0 +1,191 @@
+/* rustspec.c -- Specific flags and argument handling of the gcc Rust front
end.
+ Copyright (C) 2009-2022 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can
-0,0 +1,118 @@
+; Options for the Rust front end.
+; Copyright (C) 2003-2022 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Sof
From: Philip Herron
This specifies the extensions of the Rust language.
---
gcc/rust/lang-specs.h | 26 ++
1 file changed, 26 insertions(+)
create mode 100644 gcc/rust/lang-specs.h
diff --git a/gcc/rust/lang-specs.h b/gcc/rust/lang-specs.h
new file mode 100644
index 000
From: Philip Herron
This is the Makefile for our front-end.
---
gcc/rust/Make-lang.in | 399 ++
1 file changed, 399 insertions(+)
create mode 100644 gcc/rust/Make-lang.in
diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in
new file mode 100644
ind
From: Philip Herron
The wrappers over linemap and location will eventually disappear here but
served as a useful starting point for us. We have wrappers over the
diagnostics system which we might be able to get rid of as well.
---
gcc/rust/rust-diagnostics.cc | 244 ++
From: Arthur Cohen
The UnsafeChecker visitor verifies that unsafe actions are only performed
in unsafe contexts. Otherwise, an error should be reported to the user and
the compilation pipeline should be halted. These contexts, which include
unsafe blocks or unsafe functions, are allowed to perfor
From: Philip Herron
This patch contains the entry point and utilities used for the lowering
of HIR nodes to `tree`s. It also contains a constant evaluator, ported
over from the C++ frontend.
Co-authored-by: David Faust
Co-authored-by: Faisal Abbas <90.abbasfai...@gmail.com>
---
gcc/rust/backen
From: Arthur Cohen
This pass is responsible for resolving the privacy of items and verifying
that access to these items is performed within the limits of that privacy.
By default, items in Rust are private and only public to the current
module and its submodules. However, the user can annotate an
From: Philip Herron
This hash was ported from the go runime as we needed a hash for the legacy
symbol mangling system. Which means all symbols in Rust contain a hash of
some metadata for uniqueness on generic functions.
---
gcc/rust/util/fnv-hash.h | 95
1 - 100 of 167 matches
Mail list logo