Re: libgo patch committed: set gp->m in getTraceback

2019-01-07 Thread Ian Lance Taylor
On Mon, Jan 7, 2019 at 12:12 PM Ian Lance Taylor wrote: > > This libgo patch by Cherry Zhang moves setting p->m from gtraceback to > getTraceback. Currently, when collecting a traceback for another > goroutine, getTraceback calls gogo(gp) switching to gp, which will > resume in

Re: [PATCH] Fix file descriptor existence of MinGW.

2019-08-07 Thread Ian Lance Taylor
On Wed, Aug 7, 2019 at 5:09 AM Martin Liška wrote: > > There's one enhanced version where I added HAVE_FCNTL_H. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? I think a better name than fd_exists would be is_valid_fd. If that's OK with you,

Re: [PATCH] Move is_valid_fd to filedescriptor.c file.

2019-08-09 Thread Ian Lance Taylor
On Fri, Aug 9, 2019 at 12:15 AM Martin Liška wrote: > > As Jakub correctly noted, I used a piggy backing to put the new function > to a file that is supposed to contain different functions. So that > I'm suggesting a new file. Moreover, I'm also adding dup2 fallback. > > Patch can bootstrap on x86

Re: [PATCH] Move is_valid_fd to filedescriptor.c file.

2019-08-09 Thread Ian Lance Taylor
On Fri, Aug 9, 2019 at 11:13 AM Jakub Jelinek wrote: > > On Fri, Aug 09, 2019 at 11:05:42AM -0700, Ian Lance Taylor wrote: > > > * Makefile.in: Add filedescriptor.c. > > > * filedescriptor.c: New file. > > > * lrealpath.c (is_valid

Go patch committed: Print runtime.hex in hex

2019-08-16 Thread Ian Lance Taylor
This is a patch to the Go frontend by Cherry Zhang. The gc compiler recognizes the type runtime.hex and prints values in this type as hex. Do the same in the Go frontend. This makes debugging runtime crashes slightly better. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to

libgo patch committed: Scan write barrier buffer conservatively

2019-08-16 Thread Ian Lance Taylor
This libgo patch by Cherry Zhang scans the write barrier buffer conservatively. In gccgo, we insert the write barriers in the frontend, and so we cannot completely prevent write barriers on stack writes. So it is possible for a bad pointer appearing in the write barrier buffer. When flushing the

Go patch committed: allocate defer records on the stack

2019-08-17 Thread Ian Lance Taylor
This Go patch Cherry Zhang allocates defer records on the stack. When a defer is executed at most once in a function body, we can allocate the defer record for it on the stack instead of on the heap. This should make defers of this kind (which are very common) faster. This is a port of https://g

Go patch committed: Support new numeric literal syntax

2019-08-17 Thread Ian Lance Taylor
This Go frontend patch adds support for new numeric literal syntax that was added to the Go 1.13 release (https://tip.golang.org/doc/go1.13#language). This supports 0b and 0o prefixes, and hex floats. This was tested against test/literal2.go in the gc repo. Bootstrapped and ran Go testsuite on x

libgo patch committed: Stricter GC checking

2019-08-19 Thread Ian Lance Taylor
This libgo patch by Cherry Zhang enables stricter GC checking in libgo. With https://golang.org/cl/190599 (https://gcc.gnu.org/ml/gcc-patches/2019-08/msg01220.html), along with what we do in greyobject, we ensure that we only mark allocated heap objects. As a result we can be more strict in GC:

Merge from trunk to gccgo branch

2019-08-19 Thread Ian Lance Taylor
I've merged trunk revision 274678 to the gccgo branch. Ian

Go patch committed: New debugging functions

2019-08-19 Thread Ian Lance Taylor
This Go patch by Than McIntosh adds some new debugging output methods/functions, to dump named objects, package bindings, and the top level Gogo package list. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE =

Go patch committed: Implement shifts by signed amounts

2019-08-20 Thread Ian Lance Taylor
incomprehensibly rejects the actual patch. So if you want to see it, please see https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=274755 . Ian 2019-08-20 Ian Lance Taylor * go.test/test/fixedbugs/bug073.go: Update for language changes.

Patch RFA: [C family frontend]: avoid weird constant values in libgo/sysinfo.go

2019-08-20 Thread Ian Lance Taylor
ORM_MIN__ = 1.1 > > as a comparison, gollvm generates expected values. > Could it be caused by incorrect building setting? Per later discussion, this problem is fixed by this patch. Bootstrapped and ran full testsuite on x86_64-pc-linux-gnu. OK for mainline? Ian 2019-08-20 Ian

Go patch committed: If hidden function referenced by inline, don't hide descriptor

2019-08-21 Thread Ian Lance Taylor
This patch to the Go frontend checks if a hidden function is referenced by an inline function when deciding whether to hid the function descriptor. This fixes https://golang.org/issue/33739. The test case is https://golang.org/cl/191001. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.

Go patch committed: Don't use pkgpath for fieldtrack of unexported field

2019-08-21 Thread Ian Lance Taylor
This patch to the Go frontend fixes it to not use the full package path for the fieldtrack information generated for an unexported field. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ===

Re: Merge from trunk to gccgo branch

2019-08-21 Thread Ian Lance Taylor
I've merged trunk revision 274803 to the gccgo branch. Ian

Go patch committed: Record pointer var values to remove write barriers

2019-08-23 Thread Ian Lance Taylor
This Go patch records pointer var values to remove write barriers. We record when a local pointer variable is set to a value such that indirecting through the pointer does not require a write barrier. We use that to eliminate write barriers when indirecting through that local pointer variable. W

Go patch committed: Generalize cleanup of unresolved placeholders

2019-08-26 Thread Ian Lance Taylor
This patch to the Go frontend by Than McIntosh generalizes the cleanup of unresolved placeholder pointer types. This patch extends the work in https://golang.org/cl/51131 (https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01934.html) to include placeholder pointer types created for Go function types,

libgo patch committed: Rebuild runtime.inc if mkruntimeinc.sh changes

2019-08-27 Thread Ian Lance Taylor
This libgo patch rebuilds runtime.inc if mkruntimeinc.sh changes. The Makefile was missing a dependency. Also remove runtime.inc.raw in mostlyclean. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ==

Go patch committed: Provide index information on bounds check failure

2019-08-28 Thread Ian Lance Taylor
This patch to the Go frontend and libgo changes the panic message reported for an out of bounds index or slice operation to include the invalid values. This makes it easier for the user to see what the problem is. This implements https://golang.org/cl/161477 in the gofrontend, for https://golang.

Go patch committed: Handle unsafe conversions in escape analysis

2019-08-28 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang handles unsafe conversion expression in escape analysis. Previously escape analysis never saw these, but now it does for the case of a map assignment. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/

libgo patch committed: Move osinit code to Go

2019-08-28 Thread Ian Lance Taylor
This libgo patch moves the osinit code to Go. This is a step toward updating libgo to 1.13. This adds the 1.13 version of the osinit function to Go code, and removes the corresponding code from the C runtime. This should simplify future updates. Some additional 1.13 code was brought in to simpl

Go patch committed: Permit anonymous and empty fields in C header

2019-08-30 Thread Ian Lance Taylor
This patch to the Go frontend permits putting structs with anonymous and empty fields in the C header file runtime.inc that is used to build the C runtime code. This is required for upcoming 1.13 support, as the m struct has picked up an anonymous field. Doing this lets the C header contain all t

Re: Go patch committed: Provide index information on bounds check failure

2019-08-30 Thread Ian Lance Taylor
On Thu, Aug 29, 2019 at 1:50 PM Andreas Schwab wrote: > > On Aug 28 2019, Ian Lance Taylor wrote: > > > This patch to the Go frontend and libgo changes the panic message > > reported for an out of bounds index or slice operation to include the > > invalid values. &g

Go patch committed: Don't report runtime escapes if we've seen errors

2019-08-30 Thread Ian Lance Taylor
If we get errors during a Go compilation, we skip the escape analysis pass. If we are compiling the runtime package, we report an error if a bound method expression escapes. The effect is that if we get an error while compiling the runtime package, we would report confusing and meaningless errors

Go patch committed: Support and use single argument go:linkname

2019-08-30 Thread Ian Lance Taylor
The gc compiler has started permitting go:linkname comments with a single argument to mean that a function should be externally visible outside the package. This patch implements this in the Go frontend. We also change the libgo runtime package to use it, rather than repeating the name just to ex

Go patch committed: Check for notinheap struct at each struct field

2019-08-30 Thread Ian Lance Taylor
This patch to the Go frontend checks for a notinheap struct at each struct field. When generating write barriers, we were only checking for a notinheap struct at the outermost struct. That mishandled the case of setting a pointer to a notinheap struct as a field of another struct that not notinhe

Re: Patch RFA: [C family frontend]: avoid weird constant values in libgo/sysinfo.go

2019-09-03 Thread Ian Lance Taylor
On Tue, Aug 20, 2019 at 4:36 PM Ian Lance Taylor wrote: > > On Mon, Aug 12, 2019 at 8:21 PM Xiangdong JI wrote: > > > > The .go files generated during building gccgo seem to have a few constants > > with weird values, for example: > > > > // sysin

Go patch committed: Only import variable into . if in same package

2019-09-03 Thread Ian Lance Taylor
If the Go frontend sees a dot-import of a package, it should only add an imported variable to the package bindings if the variable is in the package being imported. This patch fixes that. A test case for this is the 1.13 os package, in which ErrClosed and friends are defined both locally and in t

Go patch committed: Default to -fno-partial-inlining

2019-09-04 Thread Ian Lance Taylor
since it expects reliable stack traces. We may be able to undo this patch later if PR 91663 is fixed. This patch bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 2019-09-04 Ian Lance Taylor PR tree-optimization/91663 * go-lang.c (go_langhook_post_op

Re: [ARM/FDPIC v5 13/21] [ARM] FDPIC: Force LSB bit for PC in Cortex-M architecture

2019-09-05 Thread Ian Lance Taylor
Christophe Lyon writes: > Sorry, I forgot again to cc: Ian. As far as I'm concerned, it's fine for architecture maintainers to approve changes to architecture-specific files in libgcc. Ian > On Thu, 5 Sep 2019 at 10:30, Christophe Lyon > wrote: >> >> On Thu, 29 Aug 2019 at 17:32, Kyrill Tk

libgo: Update to Go 1.13beta1 release

2019-09-06 Thread Ian Lance Taylor
mmitted to mainline. Ian gotools: 2019-09-06 Ian Lance Taylor * Makefile.am (check-carchive-test): Just run "go test", not "go test carchive_test.go". * Makefile.in: Regenerate. gcc/testsuite: 2019-09-06 Ian Lance Taylor * go.test/test/fixedbugs/bug369.go: Update to matc

Go patch committed: Traverse types of constant expressions

2019-09-09 Thread Ian Lance Taylor
We forgot to ever traverse types of constant expressions in the Go frontend. This rarely makes a difference--evidently, since nobody noticed--but it does matter when we inline constant expressions: we need to ensure that the type is visible to the importing code. This patch fixes the omissions.

Go patch committed: Don't use predeclared location for implicit runtime import

2019-09-09 Thread Ian Lance Taylor
In the Go frontend, for the main package, we add an implicit import of the runtime package, to ensure that it is initialized. That import used the predeclared location, which caused various tests, notably Named_type::is_builtin, to treat these imported names as builtin. Start using a real location

Re: [gofrontend-dev] Re: libgo: Update to Go 1.13beta1 release

2019-09-09 Thread Ian Lance Taylor
On Sat, Sep 7, 2019 at 8:20 AM Andreas Schwab wrote: > > On Sep 07 2019, Bernd Edlinger wrote: > > > Hi Ian, > > > >> gotools: > >> > >> 2019-09-06 Ian Lance Taylor > >> > >> * Makefile.am (check-carchive-test): Just run

Re: libgo: Update to Go 1.13beta1 release

2019-09-09 Thread Ian Lance Taylor
On Sat, Sep 7, 2019 at 5:03 AM Andreas Schwab wrote: > > This has dropped support for riscv64: Thanks, and sorry. The gccgo-local changes were lost when the files moved. I restored them as follows. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gc

Go patch committed: Permit inlining constants and expression statements

2019-09-09 Thread Ian Lance Taylor
This patch to the Go frontend permits inlining constant expressions and expression statements. This relatively minor change increases the number of inlinable functions/methods in the standard library from 983 to 2179. In particular it permits inlining math/bits/RotateLeftNN. This restores the spe

Go patch committed: Look for tool build ID before hashing entire file

2019-09-09 Thread Ian Lance Taylor
This libgo patch changes the go tool to look for a tool build ID before hashing the entire file It also fixes the key used to store the ID. This is a significant speedup in go tool run time. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofro

libgo patch committed: gccgoimporter support embedded field in pointer loop

2019-09-10 Thread Ian Lance Taylor
This libgo patch fixes the go/internal/gccgoimporter package to support an embedded field in a pointer loop. This is a backport of https://golang.org/cl/194440 in the master repository. Original description: If an embedded field refers to a type via a pointer, the parser needs to know th

libgo patch committed: Change test == to test =

2019-09-10 Thread Ian Lance Taylor
This patch to the mksysinfo script changes from using test == to using test =. This fixes GCC PR 91621. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to mainline and GCC 9 branch. Ian Index: gcc/go/gofrontend/MERGE ==

Re: libgo: Update to Go 1.13beta1 release

2019-09-10 Thread Ian Lance Taylor
On Mon, Sep 9, 2019 at 1:26 AM Rainer Orth wrote: > > > I've committed a patch to update libgo to the Go 1.13beta1 release. > > As is usual with these updates, the patch is too large to include > > here; I've included the diffs of the various GCC-specific configury > > and other files. Bootstrap

Re: [gofrontend-dev] Re: libgo: Update to Go 1.13beta1 release

2019-09-10 Thread Ian Lance Taylor
On Mon, Sep 9, 2019 at 2:00 PM Andreas Schwab wrote: > > ../../../libgo/go/golang.org/x/sys/cpu/cpu.go:17:30: error: reference to > undefined name ‘cacheLineSize’ >17 | type CacheLinePad struct{ _ [cacheLineSize]byte } > | ^ > ../../../libgo/go/golang.org/x/

libgo patch committed: Force test package to be imported first

2019-09-11 Thread Ian Lance Taylor
When running libgo tests, when compiling the x_test package, this patch forces the test package to be imported first. That ensures that we will see the types defined in the test package before the types defined in the non-test version of the package. This matters if the types differ in some way,

web site patch committed: Mention that GCC 9 supports Go 1.12.2

2019-09-11 Thread Ian Lance Taylor
Add a Go entry for GCC 9, for PR 91700. Ian Index: changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-9/changes.html,v retrieving revision 1.76 diff -u -r1.76 changes.html --- changes.html1 Sep 2019 00:28:46 - 1.

Re: [gofrontend-dev] Re: libgo: Update to Go 1.13beta1 release

2019-09-11 Thread Ian Lance Taylor
On Tue, Sep 10, 2019 at 11:54 PM Andreas Schwab wrote: > > On Sep 10 2019, Ian Lance Taylor wrote: > > > On Mon, Sep 9, 2019 at 2:00 PM Andreas Schwab wrote: > >> > >> ../../../libgo/go/golang.org/x/sys/cpu/cpu.go:17:30: error: reference to > >> undefi

Go patch committed: Don't generate type descriptors for aliases

2019-09-11 Thread Ian Lance Taylor
This Go frontend patch by Than McIntosh suppresses type descriptor generation for aliases. This changes Named_object::get_backend to ignore aliases when creating type descriptors for types, to be consistent with Type::needs_specific_type_functions and the Specific_type_functions traversal class.

libgo patch committed: Update to 1.13

2019-09-12 Thread Ian Lance Taylor
I've committed a patch to update libgo to the final Go 1.13 release. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Ian patch.txt.bz2 Description: application/bzip

doc patch committed: Fix typo

2019-09-13 Thread Ian Lance Taylor
I committed this patch to fix a typo in the -flto docs. Ian 2019-09-13 Ian Lance Taylor * doc/invoke.texi (Optimize Options): Fix typo. Index: gcc/doc/invoke.texi === --- gcc/doc/invoke.texi (revision 275698) +++ gcc/doc

libgo patch committed: Don't use \? in grep pattern

2019-09-13 Thread Ian Lance Taylor
This libgo patch avoids using \? in a grep pattern. It's not supported by Solaris grep. Just use * instead; it matches more but it shouldn't matter. This fixes GCC PR 91764. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ===

Go patch committed: Fix quoting in error message

2019-09-16 Thread Ian Lance Taylor
This patch to the Go frontend fixes the quoting of //go:linkname in an error message. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === --- gcc/go/gofrontend/MERG

libgo patch committed: Unexport FFICallbackGo; use go:linkname instead

2019-09-17 Thread Ian Lance Taylor
The libgo function was always intended to be internal-only, but was exported so that C code could call it. Now that have go:linkname for that, use it. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE =

libgo patch committed: Promote integer closure return to full word for libffi

2019-09-17 Thread Ian Lance Taylor
The libffi library expects an integer return type to be promoted to a full word. This patch to libgo implements that when returning from a closure written in Go. This only matters on big-endian systems when returning an integer smaller than the pointer size, which is why we didn't notice it until

libgo patch committed: for libffi, treat direct-iface types as pointers

2019-09-17 Thread Ian Lance Taylor
This libgo patch tweaks the libffi interface to treat direct-iface types as pointers. This only matters on systems that pass a struct with a single pointer field differently than passing a single pointer. I noticed it on 32-bit PPC, where the reflect package TestDirectIfaceMethod failed. Bootstra

Patch RFA: Emit .cfi_sections after some input code has been seen

2019-09-17 Thread Ian Lance Taylor
. OK for trunk? Ian 2019-09-17 Ian Lance Taylor PR go/91763 * dwarf2out.c (dwarf2out_assembly_start): Move ".cfi_sections .debug_frame" output from here... * dwarf2cfi.c (dwarf2out_do_cfi_asm): ...to here. Index: gcc/d

Merge from GCC trunk to gccgo branch

2019-09-18 Thread Ian Lance Taylor
I merged trunk revision 275890 to the gccgo branch. Ian

libgo patch committed: Fixes for arm64 GoLLVM build

2019-09-18 Thread Ian Lance Taylor
This libgo patch by Xiangdong JI is for the GoLLVM build on arm64 GNU/Linux. It incorporates a type definition of 'uint128' to 'runtime' and 'syscall' packages. This fixes https://golang.org/issue/33711. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index

Go patch committed: Drop semicolons in export data

2018-10-18 Thread Ian Lance Taylor
This is the first in a series of patches to start changing gccgo's export data to support type indexing and, eventually cross-package inlining of simple functions. (This is an inlining approach different than LTO that relies on recording the function body in the export data). This patch doesn't d

Go patch committed: Rewrite Type::are_identical to use flags

2018-10-18 Thread Ian Lance Taylor
This patch to the Go frontend changes the Type::are_identical function to use a single flags parameter instead of the Cmp_tags and errors_are_identical bool parameters. The existing behavior is unchanged. This is a simplification step for future work that will add a new flag. Bootstrapped and ran

Re: [PATCH 2/4] Remove unused functions and fields.

2018-10-18 Thread Ian Lance Taylor
On Sat, Sep 22, 2018 at 12:08 PM, marxin wrote: > > gcc/go/ChangeLog: > > 2018-09-24 Martin Liska > > * gofrontend/escape.cc (Gogo::analyze_escape): Remove > usage of a parameter. > (Gogo::assign_connectivity): Likewise. > (class Escape_analysis_tag): Likewise. >

Go patch committed: List indirect imports separately in export data

2018-10-18 Thread Ian Lance Taylor
Previously when the Go frontend generated export data that referred to a type that was not defined in a directly imported package, it would write the package name as additional information in the type's export data. That approach required all type information to be read in order. This patch chang

Go patch committed: Add COMPARE_ALIASESE flag for type compare and hash

2018-10-18 Thread Ian Lance Taylor
This patch to the Go frontend adds a COMPARE_ALIASES flag for type compare and hash functions. Normally aliases compare as identical to the underlying type. The new COMPARE_ALIASES flag lets them compare (and hash) differently. This will be used by later work. Bootstrapped and ran Go testsuite o

Go patch committed: Don't export functions with special names

2018-10-19 Thread Ian Lance Taylor
This patch changes the Go frontend to not export any functions with special names. This keeps init functions from appearing in the export data. Checking for special names in general means that we don't need to check specifically for nested functions or thunks, which have special names. Bootstrap

Re: [PATCH 2/4] Remove unused functions and fields.

2018-10-22 Thread Ian Lance Taylor
On Mon, Oct 22, 2018 at 5:00 AM, Martin Liška wrote: > On 10/19/18 1:02 AM, Ian Lance Taylor wrote: >> On Sat, Sep 22, 2018 at 12:08 PM, marxin wrote: >>> >>> gcc/go/ChangeLog: >>> >>> 2018-09-24 Martin Liska >>> >>>

Go patch committed: Export indexed type data, read unexported types lazily

2018-10-22 Thread Ian Lance Taylor
This patch to the Go frontend changes the export format to index type data so that it doesn't have to be read until needed. It changes the importer to only read the exported types at first, and to read other types as they are needed. It introduces a new "types" command to the export data to recor

libgo patch committed: Remove unused armArch, hwcap and hardDiv

2018-10-23 Thread Ian Lance Taylor
This patch by Tobias Klauser removes some variables from the runtime package, which are unused after https://golang.org/cl/140057. This should fix GCC PR 87661. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu, not that that proves much. Committed to mainline. Ian Index: gcc/go/gofronte

Go patch committed: Improve name mangling for package paths

2018-10-25 Thread Ian Lance Taylor
This patch by Than McIntosh improves the mangling of package paths in the Go frontend. The current implementation of Gogo::pkgpath_for_symbol was written in a way that allowed two distinct package paths to map to the same symbol, which could cause collisions at link- time or compile-time. This pa

libgo patch committed: Don't use wc in gotest

2018-10-25 Thread Ian Lance Taylor
The last patch to libgo added a use of wc to the gotest script. However, wc is not in the GNU approved list of Makefile utilities (https://www.gnu.org/prep/standards/html_node/Utilities-in-Makefiles.html#Utilities-in-Makefiles). So replace it by sed. Bootstrapped and ran Go testsuite on x86_64-pc-

Re: [gofrontend-dev] Re: Go patch committed: Improve name mangling for package paths

2018-10-26 Thread Ian Lance Taylor
On Fri, Oct 26, 2018 at 5:04 AM, Than McIntosh wrote: > > Thanks for reporting this. > > Sent https://go-review.googlesource.com/c/gofrontend/+/145017 with a > tentative fix. Thanks, committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ===

Re: [gofrontend-dev] Re: Go patch committed: Improve name mangling for package paths

2018-10-26 Thread Ian Lance Taylor
On Fri, Oct 26, 2018 at 7:44 AM, Than McIntosh wrote: > OK, thanks again. Another fix sent: > > https://go-review.googlesource.com/c/gofrontend/+/145021 Thanks. Sorry for missing that in code review. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ===

Re: [gofrontend-dev] Re: Go patch committed: Improve name mangling for package paths

2018-10-26 Thread Ian Lance Taylor
On Fri, Oct 26, 2018 at 9:13 AM, Rainer Orth wrote: > Hi Than, > >> OK, thanks again. Another fix sent: >> >> https://go-review.googlesource.com/c/gofrontend/+/145021 > > great, thanks again. While the two previous patches were enough to get > decent Solaris 11 results, on Solaris 10 all libgo t

Go patch committed: Add location_file method to Linemap

2018-10-29 Thread Ian Lance Taylor
-pc-linux-gnu. Committed to mainline. Ian 2018-10-29 Ian Lance Taylor * go-linemap.cc (Gcc_linemap::location_file): New method. Index: gcc/go/go-linemap.cc === --- gcc/go/go-linemap.cc(revision 265460) +++ gcc/go/go

Go patch committed: Pass a single flags argument to Backend::function

2018-10-29 Thread Ian Lance Taylor
mainline. Ian 2018-10-29 Ian Lance Taylor * go-gcc.cc (Gcc_backend::function): Change to use a single flags parameter. Index: gcc/go/go-gcc.cc === --- gcc/go/go-gcc.cc(revision 265460) +++ gcc/go/go-gcc.cc(working copy

Re: Update GCC to autoconf 2.69, automake 1.15.1

2018-10-31 Thread Ian Lance Taylor
On Tue, Oct 30, 2018 at 8:26 PM, Joseph Myers wrote: > > This patch (diffs to generated files omitted below) updates GCC to use > autoconf 2.69 and automake 1.15.1. (That's not the latest automake > version, but it's the one used by binutils-gdb, with which consistency > is desirable, and in any

Re: Update GCC to autoconf 2.69, automake 1.15.1

2018-10-31 Thread Ian Lance Taylor
On Wed, Oct 31, 2018 at 10:04 AM, Joseph Myers wrote: > On Wed, 31 Oct 2018, Thomas Koenig wrote: > >> Am 31.10.18 um 04:26 schrieb Joseph Myers: >> > This patch (diffs to generated files omitted below) updates GCC to use >> > autoconf 2.69 and automake 1.15.1. >> >> I think this should fix PR 828

Go patch committed: Don't always call gimplify_function_tree

2018-10-31 Thread Ian Lance Taylor
call allocate_struct_function, unless it's already been called. This small change is to support cross-package inlining by avoiding an assertion failure when we gimplify an inline function that is never used. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 2018-10-31

Go patch committed: Handle abstract type in builtin numeric const value

2018-11-05 Thread Ian Lance Taylor
This patch to the Go frontend changes Builtin_call_expression::do_numeric_constant_value to accept an argument of abstract type. This is because it can be called by Array_type::verify_length before the determine types pass. The test case for this is https://golang.org/cl/147537. This fixes http:

Re: GOOS updated: Port of gccgo to GNU/Hurd

2018-11-05 Thread Ian Lance Taylor
cc maintainer Matthias Klose and golang >> developer Ian Lance Taylor I'm (re-)submitting the patches for >> the port of gccgo to GNU/Hurd again. Now GOOS value is changed from >> gnu >> to hurd as requested. >> >> The 13 patches are: >&

libgo patch committed: Change RLIM_INFINITY from 0xffffffffffffffff to -1

2018-11-09 Thread Ian Lance Taylor
This libgo patch changees RLIM_INFINITY from 0x to -1 on GNU/Linux. 0x is arguably the correct value, but in the gc toolchain's syscall package the value is -1. So we are compatible. New programs should be using the golang.org/x/sys/unix package anyhow. This fixe

libgo patch committed: Fix typo in gccgo name mangling in cgo

2018-11-09 Thread Ian Lance Taylor
This patch by Than McIntosh fixes a typo in cmd/cgo in the gccgo name mangling recipe. The code to implement new-style gccgo name mangling had a recipe that didn't quite match the one in the compiler (incorrect handling for '.'). This showed up as a failure in the gotools cgo test if the directory

Re: [PATCH][libbacktrace] Handle DW_FORM_GNU_strp_alt

2018-11-20 Thread Ian Lance Taylor
On Wed, Nov 14, 2018 at 6:45 AM, Tom de Vries wrote: > On 14-11-18 14:25, Jakub Jelinek wrote: >> On Wed, Nov 14, 2018 at 02:08:05PM +0100, Tom de Vries wrote: +btest_dwz_CFLAGS = $(AM_CFLAGS) -g -O0 >>> >>> Hmm, I already discovered that specifying the -O0 doesn't work, since >>> it's overri

libgo patch committed: Always define _AT_FDCWD and IPv6MTUInfo

2018-11-20 Thread Ian Lance Taylor
This libgo patch alwayss define _AT_FDCWD and IPv6MTUInfo in the syscall package. They aren't defined by old versions of glibc, but are required by the code in syscall_linux.go. This should fix GCC PR 88060. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian In

Re: [PATCH][libbacktrace] Factor out read_initial_length

2018-11-21 Thread Ian Lance Taylor
Tom de Vries writes: > [libbacktrace] Factor out read_initial_length > > 2018-11-22 Tom de Vries > > * dwarf.c (read_initial_length): Factor out of ... > (build_address_map, read_line_info): ... here. This is OK. Thanks. Ian

Go patch committed: Initial support for exporting function bodies

2018-11-26 Thread Ian Lance Taylor
This patch to the Go frontend adds initial support for exporting function bodies. It creates a framework for putting function bodies in export data. At present only empty functions will be put there, and they will be ignored on import. Later patches will get this to the point of supporting inlin

libgo patch committed: Always define WEXITED/WNOWAIT on GNU/Linux

2018-11-26 Thread Ian Lance Taylor
This libgo patch changes the mksysinfo shell script to always define WEXITED and WNOWAIT on GNU/Linux. This fixes PR 88135. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ===

Go patch committed: Import inlinable functions from package export data

2018-11-27 Thread Ian Lance Taylor
. Committed to mainline. Ian 2018-11-27 Ian Lance Taylor * go-gcc.cc (Gcc_backend::function): Handle function_only_inline flag. Index: gcc/go/go-gcc.cc === --- gcc/go/go-gcc.cc(revision 266510) +++ gcc/go/go-gcc.cc(working

Go patch committed: Change Expression export to use Export_function_body

2018-11-27 Thread Ian Lance Taylor
This patch to the Go frontend changes Expression export to use Export_function_body instead of Export. This is in preparation for writing expressions to inline function bodies. This is a refactoring that doesn't affect compiler output. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. C

Go patch committed: Pass a Location to import_expression

2018-11-27 Thread Ian Lance Taylor
This patch changes the Go frontend to pass a Location to import_expression. This separates the Location that import_expression uses when creating a new Expression from the Location used to report an error. This is a step toward importing expressions for inlined functions. This is a pure refactor

Go patch committed: Change expressions importing to use Import_expression

2018-11-27 Thread Ian Lance Taylor
This patch to the Go frontend changes expression importing to use a new abstract interface class Import_expression, so that we can more easily import expressions from inlinable function bodies. This is a refactoring with no affect on compiler behavior. Bootstrapped and ran Go tests on x86_64-pc-l

Go patch committed: Add '$' to names in expression export data

2018-11-27 Thread Ian Lance Taylor
This patch to the Go frontend adds '$' to names in expression export data. For inlined function bodies we're going to need to refer to variables, so change the existing export data to add a '$' to names that look like identifiers: true, false, nil, convert. While we're here drop an unnecessary sp

Go patch committed: Finalize types parsed for inline functions

2018-11-27 Thread Ian Lance Taylor
When the Go frontend inlines functions from other packages, we may parse types that we have not seen before inlining. Inlining runs after the finalize_methods pass, so those types will not be finalized, meaning that we don't have an accurate list of which methods they support. Explicitly finalize

Go patch committed: Add types used by inline functions to export data

2018-11-27 Thread Ian Lance Taylor
This Go frontend patch add types used by inline functions to the export data. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === --- gcc/go/gofrontend/MERGE (r

Go patch committed: Add result parameter names for inlinable functions

2018-11-27 Thread Ian Lance Taylor
This patch to the Go frontend adds result parameter names for inlinable functions. An inlinable function body may need to refer to result parameters, so each result parameter needs a name. We already give them all names in start_function (via create_result_variables). Change the export data so th

Go patch committed: Record final type for numeric expressions

2018-11-27 Thread Ian Lance Taylor
This patch changes the Go frontend to record the final type for numeric expressions in export data. Inlinable function bodies are generated after the determine_types pass, so we know the type for all constants. Rather than try to determine it again when inlining, record the type in the export dat

Go patch committed: Tweaks for importing inline function bodies

2018-11-27 Thread Ian Lance Taylor
This patch to the Go frontend adds some tweaks for importing inline function bodies. We track whether we've seen an error when importing a function; we will use error tracking to avoid knock-on errors. We stop importing identifiers at a ')'. We provide a way to adjust the indentation level while

Re: [PATCH][libbacktrace] Fix segfault upon allocation failure

2018-11-28 Thread Ian Lance Taylor
Tom de Vries writes: > 2018-11-27 Tom de Vries > > * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation > failure. This is OK. Thanks. Ian

Go patch committed: Inline functions with assignments and return statements

2018-11-28 Thread Ian Lance Taylor
This patch to the Go frontend adds support for inlining functions that contain only assignments and return statements, with expressions of either constants or parameters. Functions that contain other kinds of statements or expressions are not yet inlined. With this change, about 100 functions in

Re: RFA/RFC: Add stack recursion limit to libiberty's demangler

2018-11-29 Thread Ian Lance Taylor
Pedro Alves writes: > Hi Nick, > > On 11/29/2018 03:01 PM, Nick Clifton wrote: >> static struct demangle_component * >> d_function_type (struct d_info *di) >> { >> - struct demangle_component *ret; >> + static unsigned long recursion_level = 0; > > Did you consider making this be a part of s

Re: RFA/RFC: Add stack recursion limit to libiberty's demangler

2018-11-30 Thread Ian Lance Taylor
Nick Clifton writes: > I did consider just having a fixed limit, that the user cannot change, but > I thought that this might be rejected by reviewers. (On the grounds that > different limits are appropriate to different execution environments). > Note - enabling or disabling the recursion limit

Re: RFA/RFC: Add stack recursion limit to libiberty's demangler

2018-11-30 Thread Ian Lance Taylor
Michael Matz writes: > On Fri, 30 Nov 2018, Nick Clifton wrote: > >> Not without modifying the current demangling interface. The problem is >> that the context structure is created for each invocation of a >> demangling function (from outside the library), and no state is >> preserved across

Go patch committed: Use builtin memcmp directly

2019-06-24 Thread Ian Lance Taylor
This Go patch by Cherry Zhang changes the Go frontend to call builtin memcmp directly, instead of going through a C function __go_memcmp. This allows more optimizations in the compiler backend. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gof

<    8   9   10   11   12   13   14   15   16   17   >