This patch to the Go frontend increases the size of a temporary buffer
to avoid a new warning. The warning was breaking bootstrapping with
Go.
GCC has a new -Wformat-truncation warning that triggers on some Go
frontend code:
../../gcc/go/gofrontend/go-encode-id.cc: In function 'std::string
go_en
This patch to the Go frontend avoids assuming that ATTRIBUTE_UNUSED is
defined. While it is defined when building the Go frontend as part of
GCC, it is meant to work with other compilers as well. Bootstrapped
and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
e89ddb749517ea
This patch to the Go frontend determines that panic arguments are
empty interfaces. After https://go.dev/cl//536643 passing NULL as the
expected type permitted an untyped constant expression to remain
untyped. This change will fix them to take on the empty interface
type.
The panic and print/prin
This patch to the Go frontend uses the correct size and comparison
when doing an index value overflow check. This has apparently been
wrong since I introduced the code ten years ago. This fixes GCC PR
114500. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.
Committed to mainline.
Ian
1
This patch to the Go testsuite updates issue16016.go. This backports
https://go.dev/cl/574536 into the GCC testsuite. This fixes PR
go/114453. Bootstrapped and ran test. Committed to mainline.
Ian
5b6f599670994bef957bd15c683102468a7104f1
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue1
This patch to the Go frontend fixes an uninitialized variables in
lower_method_expression. This fixes GCC PR 114463. Bootstrapped and
ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
7b2a24f3964509bd5b74c4579c7ea5684e82aee1
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofron
This patch to the Go frontend exports the type "any" as a builtin.
Otherwise we can't tell the difference between builtin type "any" and
a locally defined type "any".
This will require updates to the gccgo export data parsers in the main
Go repo and the x/tools repo. These updates are https://go.
This patch to the Go frontend stops passing the iota value to the
lowering pass. It is no longer used. The iota value is now handled
in the determine-types pass. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
896148947b9ff4845c8bc334f8eff30f91ff3c9a
diff -
On Mon, Dec 18, 2023 at 5:32 PM Ian Lance Taylor wrote:
>
> This Go frontend patch moves the lowering pass after the type
> determination and the type checking passes. This lets us simplify
> some of the code that determines the type of an expression, which
> previously had to work correctly both
This Go frontend patch moves the lowering pass after the type
determination and the type checking passes. This lets us simplify
some of the code that determines the type of an expression, which
previously had to work correctly both before and after type
determination.
I'm doing this to help with
This patch to the Go frontend just moves Selector_expression up in
file. This is a mechanical change to expressions.cc. This will make
Selector_expression visible to Builtin_call_expression for later work.
This produces a very large "git --diff", but "git diff --minimal" is
clear. Bootstrapped a
This patch to the Go frontend changes the Expression
{numeric,string,boolean}_constant_value methods to be non-const. This
does not affect anything immediately, but will be useful for later CLs
in this series.
The only real effect is to Builtin_call_expression::do_export, which
remains const and
This Go frontend patches passes the Gogo IR pointer to
Runtime::make_call. This is a boilerplate change that doesn't affect
compiler output. It's not currently used but will be used by later
CLs in this series. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mainline.
Ia
This Go frontend patches adds an Expression::is_untyped method. This
method is not currently used by anything, but it will be used by later
changes in this series. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
ac50e9b72bf9bb6d5b28096bb164fb050db6e290
diff
This patch to the Go frontend removes the traverse_assignments
support. The last caller was removed in https://go.dev/cl/18261 in
2016. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.
Committed to mainline.
Ian
a6e74b0b3316f3f0b2096d6a175c31bed58ae4ed
diff --git a/gcc/go/gofrontend/MER
This patch to the Go frontend removes the name_ field from the
Type_switch_statement class. It's not used for anything.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
to mainline.
Ian
1a1fba1e25779247a4969789885ce80b7b4a2359
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofr
This patch to the G frontend passes a pointer to the Gogo IR to the
determine types pass and the type verification pass. This is a
straight refactoring that does not change the compiler behavior. This
is in preparation for future CLs that rearrange the pass ordering.
This introduces one new call
The gc Go compiler has a -importcfg option that takes a file that
provides a mapping from import paths to the files that satisfy those
imports. This is used by the go build tool to let the compiler read
imported packages directly out of the build cache. Without this
option the go build tool has t
compiler, libgo: support bootstrapping gc compiler
In the Go 1.21 release the package internal/profile imports
internal/lazyregexp. That works when bootstrapping with Go 1.17,
because that compiler has internal/lazyregep and permits importing it.
We also have internal/lazyregexp in libgo, but sin
This patch to the Go frontend determines the types of a couple of
expressions types that accidentally failed to recurse into their
subexpressions. The test case for this is https://go.dev/cl/505015.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
to mainline.
Ian
f42544e04a13
This patch to the Go frontend marks a Call_expression multiple results
struct as a result struct. In https://go.dev/cl/343873 we stopped
padding zero-sized trailing fields in functions that return multiple
results where the last result is zero-sized. This CL makes the
corresponding change on the c
This patch to the Go frontend adds the missing
Slice_info_expression::do_traverse method. Lack of the method caused
https://go.dev/issue/59169. The test case is
https://go.dev/cl/478217. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mainline and GCC 12 branch.
Ian
187e
This patch by Andrew Pinski defines two builtin functions that are
used by the middle-end. This fixes PR 108426. Bootstrapped and
tested on x86_64-pc-linux-gnu. Committed to mainline.
Ian
PR go/108426
* go-gcc.cc (Gcc_backend::Gcc_backend): Define __builtin_ctzl and
This patch to the GCC-specific part of the Go frontend defines the
__atomic_fetch_add functions. The frontend only generates calls to
the __atomic_add_fetch functions, but in some cases the middle-end can
transform the latter into the former. This patch is originally by
Marc Poulhiès. This fixes
This Go frontend patch treats S("") as a string constant. The
compiler neglected to notice that a conversion from a string constant
to a string type was a valid string constant.
I didn't add a test case because this only caused a compiler failure
when compiling without optimization, which is not
This patch to the Go frontend delays building the struct type for a
go/defer thunk until it is needed. We were building it in the
determine_types pass. Now, we delay until the
simplify_thunk_statements pass. That ensures that we are consistent
in determining whether an argument is constant.
Wit
This patch to the Go frontend by Than McIntosh does some better
argument type checking for some builtin functions. This avoids a
compiler crash on cases like panic(panic("bad")). This fixes
https://go.dev/issue/56071. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mainli
This patch to the Go frontend handles the case of f().x when the
function f returns a zero-sized type. In that case the GCC interface
will have changed f to return void, as the GCC middle-end does not
have complete support for zero-sized types. This patch handles the
case of void when in a struct
This patch to the GCC interface of the Go frontend fixes a crash in
f(g()) if g returns a zero-sized value. In that case the GCC
interface modifies g to return void, since GCC's middle-end does not
have solid support for zero-sized values. This patch detects the
f(g()) case and replaces the call
This patch to the Go frontend propagates the array length error marker
farther, to avoid a compiler crash on invalid code. This fixes
https://go.dev/issue/53639. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
c70a48a8f8f6a43b35f783b5672c9a3c0a363c31
diff --
This patch to the Go frontend gives a better error message for an
unknown package name, saying "undefined reference" rather than
"expected package". This requires updating a test. This fixes
https://go.dev/issue/51237. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to main
This patch to the Go frontend renames "requires" to "needs" to avoid
the C++20 keyword. Bootstrapped on x86_64-pc-linux-gnu. Committed to
mainline.
Ian
9d44418664ec8c3e59365901e3ec02e488d9e01c
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 0d49e9e70c6..65f64e0fbfb 100644
--
This patch to the Go frontend checks repeated const expressions in new
scope, in case they refer to a newly defined name. The test case is
const8.go in https://go.dev/cl/414795. This fixes
https://go.dev/issue/53585. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mainlin
This patch to the Go frontend changes the mangled name of a struct to
use the package path with an embedded builtin type. The test case is
https://go.dev/cl/414235. This fixes https://go.dev/issue/52856.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
to mainline.
Ian
749563
This patch to the Go frontend permits expressions of abstract bool to
remain abstract, rather than forcing them into the named type bool.
The test case for this is https://go.dev/cl/414755. This fixes
https://go.dev/issue/51475. Bootstrarpped and ran Go testsuite on
x86_64-pc-linux-gnu. Committe
This Go frontend patch avoids using a sink name (_) as a parameter
name when creating a method expression thunk. The patch also fixes a
couple of cases where the error led to a later compiler crash. The
test case is https://go.dev/cl/414336. This fixes
https://go.dev/issue/52871. Bootstrapped a
This patch to the Go frontend corrects the integer import code to
always initialize an mpfr value. The test case for this is
https://go.dev/cl/413980. This fixes https://go.dev/issue/52862.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
to mainline.
Ian
722750a44a93ce7d23e0
This patch to the Go frontend uses bool for a comma-ok statement if
the variable already has a type that is not a boolean type. This is a
statement like
v, ok := m[k]
Otherwise we may try to convert an unnamed bool type to an interface
type, which will fail. But we don't want to always use
This patch by zhangjian to the Go frontend changes Sort_bindings to
return false if comparing a value to itself. Apparently some versions
of std::sort may pass elements at the same iterator location. This
fixes https://go.dev/issue/53483. Bootstrapped and ran Go testsuite
on x86_64-pc-linux-gnu.
This patch to the Go frontend makes sure to unalias types when
creating hash/equality functions. This fixes
https://go.dev/issue/52846. There is a test case at
https://go.dev/cl/413694. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
3e134d9c6716f6acaf3e174
This patch to the Go frontend by Михаил Аблакатов (Mikhail Ablakatov)
avoids generating stubs for ambiguous direct interface methods. The
current implementation checks whether it has to generate a stub method
for a promoted method of an embedded struct field in
Type::build_stub_methods(). If the
This patch to the Go frontend by Julia Lapenko traverses expressions
when exporting constants. When exporting a constant A that is
expressed through a constant B from another package, it is necessary
to traverse an expression representing the constant A to generate a
sequence of type casts from th
This patch to the Go frontend loads LHS subexpressions of op=
assignment only once. This avoids inconsistencies if the variables
are changed by evaluating the RHS. This fixes
https://go.dev/issue/52811. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mainline. There is a
This patch to the Go frontend always sorts interface parse methods.
The exporter relies on sorting interface parse methods. It would sort
them as it encountered interface types. However, when an interface
type is an element of a struct or array type, the exporter might
encounter that interface t
This patch to the Go fronend removes the is_lvalue_ field from
Array_index_expression. As of https://go.dev/cl/77510
(https://gcc.gnu.org/pipermail/gcc-patches/2017-November/487697.html)
it is never used. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
55e0e
This patch to the Go frontend rejects duplicate bool keys in a map
literal. This is hardly a common case, but we may as well get it
right. This is for https://go.dev/issue/35945 and
htps://go.dev/issue/28104. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
This patch to the Go frontend ignores the function type result name
when producing export data. This change ensures that we never output
a result name in the export data if there is only a single result.
Previously we would output a ? if the single result had a name. That
made the output unstable
It turns out to be painful to require linking against -lrt on
GNU/Linux, as that makes it harder to link Go code into C programs.
Instead just call the timer syscalls directly. That is what the
upstream library does anyhow. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to m
This patch fixes the Go frontend to not set a bit in the
garbage-collection ptrmask bit for a pointer to notinheap type. This
is a follow-up to
https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590150.html.
The test case for this is https://go.dev/cl/385454. Bootstrapped and
ran Go testsuit
This patch to the Go frontend stops warning for calls of print(). We
used to warn for calls to print(), because it doesn't do anything.
However, a Go 1.18 test uses that call, and it is valid Go. Change
the compiler to just accept it and compile it; this will produce calls
to printlock and printu
This patch to the Go frontend uses a nil pointer for a zero length
string constant. We used to pointlessly set the pointer of a zero
length string constant to point to a zero byte constant. Bootstrapped
and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
2e2b861e8941c4e9b36b
This patch to the Go frontend treats notinheap types as not being
pointers. By definition, a type is marked noinheap doesn't contain
any pointers that the garbage collector cares about, and neither does
a pointer to such a type. Change the type descriptors to consistently
treat such types as not
In the Go 1.18 release libgo needs to link against -lrt on GNU/Linux
only, to call the timer_create, timer_settime, and timer_delete
functions. In preparation this patch changes the gccgo driver to link
against -lrt when linking libgo statiically, and the gotools Makefile
to link the runtime test
The Go 1.18 library introduces specific types in
runtime/internal/atomic. This patch to the Go frontend recognizes and
optimizes the methods on those types, as we do with the functions in
runtime/internal/atomic.
While we're here avoid getting confused by methods in any other
package that we reco
This patch to the Go frontend and libgo implements the abi.FuncPCABI0
and abi.FuncPCABIInternal functions. The Go 1.18 standard library
uses an internal/abi package with two functions that are implemented
in the compiler. This patch implements them in the gofrontend, to
support the upcoming update
In the Go 1.18 release the predeclared identifier "any" is a new alias
for the type "interface{}". This patch adds this alias to the Go
frontend. This requires updating a test. Bootstrapped and ran Go
testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
d0607656a50cd571d9ab260d040f1dae
This patch to the Go frontend permits converting unnamed types when
ignoring struct tags. I think the code was written this way because
before conversion could ignore struct tags this case could only arise
with named types. Now that conversions permit struct tags to change,
this can occur with un
This patch to the Go frontend removes duplication of Named_object
traversal code. Adding type parameters was about to add a partial
third version. Remove the duplication to avoid that. Bootstrapped
and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
5ef7d6c289350eb94ff6dd62
On Fri, Dec 31, 2021 at 1:32 AM Jakub Jelinek wrote:
>
> The following patch adjusts the testcase for the above change.
> Tested on x86_64-linux, ok for trunk?
>
> 2021-12-31 Jakub Jelinek
>
> * gcc.misc-tests/godump-1.c: Adjust for renaming of last
> field from _align suffix to
On Wed, Dec 29, 2021 at 03:54:03PM -0800, Ian Lance Taylor via Gcc-patches
wrote:
> PR go/103847
> * godump.c (go_force_record_alignment): Name the alignment
> field "_".
> --- a/gcc/godump.c
> +++ b/gcc/godump.c
> @@ -651,7 +651,7 @@ go_force_record_alignment (struct obstack *ob, const char
> *
This patch to the Go frontend, libgo, and the -fgo-dump-spec code
avoids padding incorrectly when a zero-sized field is inserted solely
for alignment. We avoid this by not padding after a "_" field, and by
using "_" fields for padding. This is fine since the padding is only
there in case someone
This patch to the Go frontend fixes the Create_func_descriptors pass
to traverse the subexpressions of the function in a Call_expression.
There are no subexpressions in the normal case of calling a function a
method directly, but there are subexpressions when in code like
F().M() when F returns an
This patch to the Go frontend permits compiler directives in
parenthesized groups. The original compiler directive support was
only for //line at the start of a line and for //go: comments before
function declarations. When support was added for //go:notinheap for
types and //go:embed for variabl
This Go frontend patch by Than McIntosh uses nullptr in a couple of
cases to avoid errors in template matching with some stage1 compilers.
Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline.
Ian
patch
f4da52d91658cf73eb95d3d8b4b0fd79c8b0ac23
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/g
For some future work on the Go frontend it will be annoying to have to
make Expression::type work before the lowering pass, so this patch
changes the frontend so that that doesn't happen. Bootstrapped and
ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
patch.txt
19b5a1147764
This patch to the Go frontend avoids padding zero-sized trailing
fields in the struct created to hold result parameters. This avoids a
miscompilation when a function returns multiple results and the last
result is zero-sized (this is not a useful way to write a function but
it can happen reasonabl
This Go frontend patch corrects the condition under which we call
memclrHasPointers. When compiling append(s, make([]typ, ln)...),
where typ has a pointer, and the append fits within the existing
capacity of s, the condition used to clear out the new elements was
reversed. This fixes https://gola
This patch to the Go frontend and libgo stores pointers to
go:notinheap types indirectly. This provides better support for using
cgo with incomplete types. This is the gofrontend version of
https://golang.org/cl/264480. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to main
This patch the Go frontend avoids a crash on the invalid code "a, b :=
int(0)". This fixes GCC PR 101851. Bootstrapped and ran Go testsuite
on x86_64-pc-linux-gnu. Committed to mainline.
Ian
498e91bf7d6a8000bb4b74f95c404064b8eac644
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
On Mon, Aug 2, 2021 at 3:23 PM Ian Lance Taylor wrote:
>
> The upcoming Go 1.17 release adds two new functions to the unsafe
> package: unsafe.Add and unsafe.Slice. These functions must be
> implemented in the compiler. This patch implements them for gccgo.
> Bootstrapped and ran Go testsuite on
On Wed, Aug 4, 2021 at 9:24 PM Ian Lance Taylor wrote:
>
> This Go frontend patch by Cherry Mui makes the escape analysis pass
> stricter about builtin functions In the places where we handle
> builtin functions, list all supported ones, and fail if an unexpected
> one is seen. So if a new builti
This Go patch extends the internal runtime/internal/atomic package to
match the externally visible sync/atomic package. This is the
gofrontend version of https://golang.org/cl/289152. Bootstrapped and
ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
a6b138f257a431f3337f3c6bf5
This Go frontend patch by Cherry Mui makes the escape analysis pass
stricter about builtin functions In the places where we handle
builtin functions, list all supported ones, and fail if an unexpected
one is seen. So if a new builtin function is added in the future we
can detect it, instead of sil
This Go frontend patch by Cherry Mui supports the new language
constructs in escape analysis. Previous patches added new language
constructs in Go 1.17, specifically, unsafe.Add, unsafe.Slice, and
conversion from a slice to a pointer
to an array. This patch handles them in the escape analysis.
At
This patch to the Go frontend and libgo changes selectnbrecv to return
two values. The only difference between selectnbrecv and
selectnbrecv2 is that the latter uses a pointer argument as the second
return value from chanrecv. This patch changes selectnbrecv to return
the two values from chanrecv
On Mon, Aug 2, 2021 at 3:53 PM Ian Lance Taylor wrote:
>
> The upcoming Go 1.17 release has a new language feature: it permits
> conversions from slice types to pointer-to-array types. If the slice
> is too short, the conversion panics. This patch implements this new
> feature in gccgo. Bootstr
The upcoming Go 1.17 release has a new language feature: it permits
conversions from slice types to pointer-to-array types. If the slice
is too short, the conversion panics. This patch implements this new
feature in gccgo. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to m
The upcoming Go 1.17 release adds two new functions to the unsafe
package: unsafe.Add and unsafe.Slice. These functions must be
implemented in the compiler. This patch implements them for gccgo.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
to mainline.
Ian
06d0437d4a5faca
This patch changes the Go frontend to avoid aliases in receiver types.
If a package declares a method on an alias type, the alias would be
used in the export data. This would then trigger a compiler assertion
on import: we should not be adding methods to aliases.
Fix the problem by ensuring that
On Tue, Jun 29, 2021 at 11:01 AM Ian Lance Taylor wrote:
>
> This patch to the Go frontend reduces the number of temporaries that
> the compiler genrrates for composite literals. For a composite
> literal we only need to introduce a temporary variable if we may be
> converting to an interface typ
This patch to the Go frontend reduces the number of temporaries that
the compiler genrrates for composite literals. For a composite
literal we only need to introduce a temporary variable if we may be
converting to an interface type, so only do it then. This saves over
80% of compilation time when
This patch removes HTML quoting from the Texinfo file gccgo.html.
Committed to mainline.
Ian
diff --git a/gcc/go/gccgo.texi b/gcc/go/gccgo.texi
index ce6b518bb7b..fa0e4882403 100644
--- a/gcc/go/gccgo.texi
+++ b/gcc/go/gccgo.texi
@@ -495,7 +495,7 @@ like (after importing the @code{os} package):
This patch to the Go frontend marks global variables whose address is
taken. To implement this, change the backend to use flag bits for
variables. This fixes GCC PR 100537. Bootstrapped and ran Go
testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
PR go/100537
* go-g
This patch to the Go frontend copies the receiver argument when
compiling a go or defer statement of a method call. Otherwise when
using go/defer with a value method the method might incorrectly see a
value that was modified after the go/defer statement. The test case
for this is https://golang.o
The Go frontend generally doesn't create a temporary for an expression
that is a variable, because it's normally valid to simply reload
thevalue from the variable. However, if the variable is in the heap,
then loading the value is a pointer indirection. The process of
creating GCC IR can cause th
This patch by Michael Matloob fixes the Go frontend to permit
//go:embed comments in files that do
import _ "embed"
The embed spec allows for //go:embed to be used in files that
underscore-import package "embed". This is useful for embeds to
[]byte and string vars because the embed.FS type ma
This patch to the Go frontend unaliases the receiver type when
outputting export data for a method. This avoids a crash when
importing such a package. The test case for this is
https://golang.org/cl/292009. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
91
This patch by Michael Matloob fixes the Go frontend to use the correct
path when opening an embedded file for a string or []byte type. For
the other embed.FS case we were correctly using the Files mapping, but
for string or []byte we were not. Bootstrapped and ran Go testsuite
on x86_64-pc-linux-
This Go frontend patch initializes variables with go:embed directives.
This completes the compiler work for go:embed. Bootstrapped and ran
Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
eed40bca6f2eb3af0c811cf6ec9e123c5bf4907d
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofron
This patch to the Go frontend reads go:embed directives and attaches
them to variables. It also reads the embedcfg file passed on the
command line. We still don't actually do anything with the
directives. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.
Committed to mainline.
Ian
f6b3e
This patch to the Go frontend adds support for reading embedcfg files.
An embedcfg file is a JSON file created by the go command when it sees
a go:embed directive, and passed to the Go frontend via the new
-fgo-embedcfg option. This code is not yet called, and does not yet
do anything. It's being
On Tue, Jan 5, 2021 at 7:15 AM Jakub Jelinek via Gcc-patches
wrote:
>
> On Tue, Jan 05, 2021 at 11:06:27AM +0100, Andreas Schwab wrote:
> > FAIL: compiler driver --help=go option(s): "^ +-.*[^:.]$" absent from
> > output: " -fgo-embedcfg=List embedded files via go:embed"
>
> Fixed thusly
On Tue, Jan 05, 2021 at 11:06:27AM +0100, Andreas Schwab wrote:
> FAIL: compiler driver --help=go option(s): "^ +-.*[^:.]$" absent from output:
> " -fgo-embedcfg=List embedded files via go:embed"
Fixed thusly, committed as obvious.
2021-01-05 Jakub Jelinek
* lang.opt (fgo-em
FAIL: compiler driver --help=go option(s): "^ +-.*[^:.]$" absent from output: "
-fgo-embedcfg=List embedded files via go:embed"
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely d
This patch adds a new -fgo-embedcfg option. This will be used by the
go command to implement the go:embed directive that is new in the
upcoming Go 1.16 release. The option doesn't yet do anything, this is
just framework. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mai
This patch to the Go frontend avoids the ambiguity between "chan <-
(chan int)" and "chan (<- chan int)". This parenthesizes the same way
as the gc compiler. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
a40029e3b185a4b4e16a2a83933f742ff48c9743
diff --git
The Go frontend was treating indirections through pointers that had
been explicitly checked against nil and slice and string index
expressions as non-trapping memory references. That is true for
ordinary Go programs, but it isn't true if the programs construct
their own memory addresses. In parti
In the Go frontend, all calls to the runtime functions slicecopy and
slicestringcopy were removed in https://golang.org/cl/170005. Remove
the remaining mentions. Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu. Committed to mainline.
Ian
b26699c53b257d3354a4cfd3fc9174104f116154
diff --
This patch to the Go frontend initializes a couple of saw_send_stmt
local variables that were incorrectly left uninitialized. These are
variables in the compiler source, not in the generated code. The C++
compiler wasn't warning because we take their address. This fixes
https://golang.org/issue/
This patch to the Go frontend and libgo eliminates the scase.kind
field, saving some space on the stack when running a select statement.
Instead of using a kind, the compiler now sorts all the send cases
before the receive cases, and gives the default case a special index
of -1. This is in prepara
1 - 100 of 1326 matches
Mail list logo