- 11 Nov, 2011 1 commit
-
-
Russ Cox authored
Godefs was a C program that ran gcc and then parsed the stabs debugging information in the resulting object file to generate C or Go code for bootstrapping as part of package runtime or package syscall. Cgo does the same work, but using the dwarf debugging information. Add -godefs and -cdefs options to cgo that mimic godefs's output, albeit with different input (a Go program, not a C program). This has been a "nice to have" for a while but was forced by Apple removing stabs debugging output from their latest compilers. Fixes #835. Fixes #2338. R=golang-dev, bradfitz, r, dave, iant CC=golang-dev https://golang.org/cl/5367043
-
- 09 Nov, 2011 1 commit
-
-
Rémy Oudompheng authored
Types are left as nil if no DWARF information is found and checking in the rewriting pass so that appropriate errors with line numbers can be printed. Fixes #2408. R=rsc CC=golang-dev, remy https://golang.org/cl/5336041
-
- 02 Nov, 2011 1 commit
-
-
Russ Cox authored
R=golang-dev, iant, r, r CC=golang-dev https://golang.org/cl/5307066
-
- 26 Oct, 2011 1 commit
-
-
Russ Cox authored
Nothing terribly interesting here. R=golang-dev, bradfitz, gri, r CC=golang-dev https://golang.org/cl/5300043
-
- 18 Oct, 2011 1 commit
-
-
Russ Cox authored
R=golang-dev, r, adg, r, cw CC=golang-dev https://golang.org/cl/5266045
-
- 04 Oct, 2011 1 commit
-
-
Joe Poirier authored
Example: #cgo windows LDFLAGS: -LC:\\WINDOWS\\system32 R=alex.brainman, go.peter.90, golang-dev, rsc CC=golang-dev https://golang.org/cl/5154042
-
- 19 Sep, 2011 1 commit
-
-
Jaroslavas Počepko authored
cgo: cgo to use GOARCH from the environment, not runtime.GOARCH (otherwise it results in necessity of having 8cgo and 6cgo) R=rsc, adg CC=golang-dev https://golang.org/cl/4978061
-
- 28 Jul, 2011 1 commit
-
-
Russ Cox authored
Fixes #1640. Fixes #2007. R=golang-dev, adg CC=golang-dev https://golang.org/cl/4815063
-
- 27 Jun, 2011 1 commit
-
-
Rob Pike authored
Change the signature of Split to have no count, assuming a full split, and rename the existing Split with a count to SplitN. Do the same to package bytes. Add a gofix module. R=adg, dsymonds, alex.brainman, rsc CC=golang-dev https://golang.org/cl/4661051
-
- 22 Jun, 2011 1 commit
-
-
Robert Griesemer authored
This is a core API change. 1) gofix misc src 2) Manual adjustments to the following files under src/pkg: gob/decode.go rpc/client.go os/error.go io/io.go bufio/bufio.go http/request.go websocket/client.go as well as: src/cmd/gofix/testdata/*.go.in (reverted) test/fixedbugs/bug243.go 3) Implemented gofix patch (oserrorstring.go) and test case (oserrorstring_test.go) Compiles and runs all tests. R=r, rsc, gri CC=golang-dev https://golang.org/cl/4607052
-
- 17 Jun, 2011 1 commit
-
-
Alex Brainman authored
R=golang-dev, mattn.jp, adg CC=golang-dev https://golang.org/cl/4634043
-
- 13 Jun, 2011 1 commit
-
-
Russ Cox authored
That gcc does not include enumerator names and values in its DWARF debug output. Create a data block from which we can read the values instead. Fixes #1881. R=iant CC=golang-dev https://golang.org/cl/4607045
-
- 07 Jun, 2011 1 commit
-
-
Dave Cheney authored
R=adg CC=golang-dev https://golang.org/cl/4528124
-
- 27 May, 2011 2 commits
-
-
Gustavo Niemeyer authored
Fixes issue #1879. Directives were not directly expanded, but since their content ended up in makefiles, further expansion would take place there. This prevents such artifacts by restricting the set of characters that may be used in a directive value. To build the list of safe characters I went through the contents of /usr/lib/pkgconfig and extracted LDFLAGS and CFLAGS information, so hopefully this is a reasonable default to get started. R=rsc CC=golang-dev https://golang.org/cl/4532092
-
Gustavo Niemeyer authored
Fixes issue #1853. R=golang-dev, mattn.jp, adg CC=golang-dev https://golang.org/cl/4550084
-
- 06 May, 2011 1 commit
-
-
Roger Peppe authored
This means that the -x flag can work, which could enable support for other languages (e.g. objective-C). R=iant, rsc CC=golang-dev https://golang.org/cl/4476049
-
- 13 Apr, 2011 1 commit
-
-
Rob Pike authored
Update goyacc, cgo to be more canonical in their naming and silence the new warnings. R=rsc, gri CC=golang-dev https://golang.org/cl/4417042
-
- 28 Mar, 2011 1 commit
-
-
Robert Griesemer authored
Removed many string conversions in dependent code. Runs all tests. No change to gofmt output. R=r CC=golang-dev https://golang.org/cl/4291070
-
- 06 Mar, 2011 1 commit
-
-
Gustavo Niemeyer authored
The recursive algorithm used to parse types in cgo has a bug related to building the C type representation. As an example, when the recursion starts at a type *T, the C type representation won't be known until type T itself is parsed. But then, it is possible that type T references the type **T internally. The latter representation is built based on the one of *T, which started the recursion, so it won't attempt to parse it again, and will instead use the current representation value for *T, which is still empty at this point. This problem was fixed by introducing a simple TypeRepr type which builds the string representation lazily, analogous to how the Go type information is built within the same algorithm. This way, even if a type representation is still unknown at some level in the recursion, representations dependant on it can still be created correctly. R=rsc CC=golang-dev https://golang.org/cl/4244052
-
- 02 Mar, 2011 1 commit
-
-
Roger Peppe authored
Fixes #1572. Initially I tried changing things so all object files get put in _obj, but it's too much - everything needs changing. Perhaps some other time. R=rsc CC=golang-dev https://golang.org/cl/4237050
-
- 09 Feb, 2011 1 commit
-
-
Gustavo Niemeyer authored
Structs defined in C as containing a field with an enum type are currently translated to Go as a struct with an unsigned integer field, even if some of the values contained in the enum are negative. This modification takes in consideration the values defined in the enum, and conditionally defines the Go type as signed if necessary. The logic introduced was tested with gcc, which will increase the type size if it contains both negative numbers and values greater than 2^b/2-1, and refuses to compile values which would be problematic (2^64-1, but in fact the ISO C restricts the range to the size of int). R=rsc CC=golang-dev https://golang.org/cl/4119058
-
- 03 Feb, 2011 1 commit
-
-
Gustavo Niemeyer authored
This enables #cgo directives to contain a os/arch specification which restricts the definition of the given option to matching systems. For example: #cgo amd64 CFLAGS: -DAMD64=1 #cgo linux CFLAGS: -DLINUX=1 #cgo linux/amd64 CFLAGS: -DLINUX_ON_AMD64=1 R=rsc CC=golang-dev https://golang.org/cl/4121048
-
- 02 Feb, 2011 1 commit
-
-
Russ Cox authored
Fixes #1452. R=r CC=golang-dev https://golang.org/cl/4023060
-
- 01 Feb, 2011 1 commit
-
-
Gustavo Niemeyer authored
R=rsc, binet CC=golang-dev https://golang.org/cl/3921043
-
- 31 Jan, 2011 1 commit
-
-
Roger Peppe authored
If there were warnings or errors in the user code, cgo would print the first error from gcc and then stop, which is not helpful. This CL makes cgo ignore errors from user code in the first pass - they will be shown later. It also prints errors from user preamble code with the correct line numbers. (Also fixed misleading usage message). R=iant, rsc CC=golang-dev https://golang.org/cl/4082047
-
- 19 Jan, 2011 1 commit
-
-
Sebastien Binet authored
R=rsc CC=binet, golang-dev https://golang.org/cl/3906041
-
- 11 Jan, 2011 1 commit
-
-
Gustavo Niemeyer authored
This change prevents enum consts from conflicting with themselves when loaded twice in different go files. Fixes #1400. R=rsc CC=golang-dev https://golang.org/cl/3849044
-
- 17 Dec, 2010 1 commit
-
-
Russ Cox authored
#pragma dynexport is no longer needed for this use of cgo, since the gcc and gc code are now linked together into the same binary. It may still be necessary later. On the Mac, you cannot use the GOT to resolve symbols that exist in the current binary, so 6l and 8l translate the GOT-loading mov instructions into lea instructions. On ELF systems, we could use the GOT for those symbols, but for consistency 6l and 8l apply the same translation. The translation is sketchy in the extreme (depending on the relocation being in a mov instruction) but it verifies that the instruction is a mov before rewriting it to lea. Also makes typedefs global across files. Fixes #1335. Fixes #1345. R=iant, r CC=golang-dev https://golang.org/cl/3650042
-
- 13 Dec, 2010 1 commit
-
-
Russ Cox authored
Clean up an error message and error exit too. Insert blank line after "DO NOT EDIT" comment to keep it from being a doc comment. Fixes #1213. Fixes #1222. R=r CC=golang-dev https://golang.org/cl/3608042
-
- 06 Dec, 2010 1 commit
-
-
Robert Griesemer authored
Specifically: * lib/godoc: - provide file set (FSet) argument to formatters where needed * src/cmd: - cgo, ebnflint, godoc, gofmt, goinstall: provide file set (fset) where needed - godoc: remove local binary search with sort.Search (change by rsc), extract file set for formatters * src/pkg: - exp/eval: remove embedded token.Position fields from nodes and replace with named token.Pos fields; add corresponding Pos() accessor methods - go/token: added file.Line(), changed signature of File.Position() * test/fixedbugs/: - bug206.go: change test to not rely on token.Pos details * added various extra comments * Runs all.bash * gofmt formats all of src, misc w/o changes * godoc runs * performance: - The new version of godoc consumes about the same space after indexing has completed, but indexing is half the speed. Significant space savings are expected from smaller ASTs, but since they are thrown away after a file has been indexed, this is not visible anymore. The slower indexing time is due to the much more expensive computation of line information. However, with the new compressed position information, indexing can be rewritten and simplified. Furthermore, computing the line info can be done more efficiently. New godoc, immediately after indexing completed (best of three runs): PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE 44381 godoc 0.0% 0:38.00 4 19 149 145M 184K 148M 176M 2010/12/03 17:58:35 index updated (39.231s, 18505 unique words, 386387 spots) 2010/12/03 17:58:35 bytes=90858456 footprint=199182584 2010/12/03 17:58:36 bytes=47858568 footprint=167295224 Old godoc, immediately after indexing completed (best of three runs): PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE 23167 godoc 0.0% 0:22.02 4 17 132 129M 184K 132M 173M 2010/12/03 14:51:32 index updated (24.892s, 18765 unique words, 393830 spots) 2010/12/03 14:51:32 bytes=66404528 footprint=163907832 2010/12/03 14:51:32 bytes=46282224 footprint=163907832 The different numbers for unique words/spots stem from the fact the the two workspaces are not exactly identical. The new godoc maintains a large file set data structure during indexing which (probably) is the reason for the larger heap (90858456 vs 66404528) before garbage collection. R=rsc, r CC=golang-dev https://golang.org/cl/3050041
-
- 01 Nov, 2010 2 commits
-
-
Brad Fitzpatrick authored
R=r CC=golang-dev, r2, rsc https://golang.org/cl/2819041
-
Wei Guangjing authored
R=rsc, mattn CC=golang-dev https://golang.org/cl/1976045
-
- 28 Oct, 2010 1 commit
-
-
Russ Cox authored
R=gri, r, r2 CC=golang-dev https://golang.org/cl/2743042
-
- 16 Sep, 2010 1 commit
-
-
Eric Clark authored
Fixes #1081 R=rsc CC=golang-dev https://golang.org/cl/2112046
-
- 18 Aug, 2010 1 commit
-
-
Russ Cox authored
I'm not sure there's a better way. Cgo is juggling two different C compilers. Fixes #1008. R=iant CC=golang-dev https://golang.org/cl/1972044
-
- 13 Aug, 2010 1 commit
-
-
Robert Griesemer authored
- change ast.Ident back to contain the name and adjust all dependent code - identifier object information will be added again through an optional typechecker phase (in the works). - remove tracking of scopes in parser - it's easier to do this in a separate phase (in the works) - in godoc, generate popup info table directly instead of through a formatter for simpler data flow (at the expense of a little bit more code) Runs all tests. As a result of this change, the currently shown popup information (const, var, type, func, followed by identifier name) will not be shown anymore temporarily. R=rsc CC=golang-dev https://golang.org/cl/1994041
-
- 05 Aug, 2010 1 commit
-
-
Christian Himpel authored
Fixes #967. R=rsc CC=golang-dev https://golang.org/cl/1855051
-
- 16 Jul, 2010 1 commit
-
-
Ian Lance Taylor authored
R=rsc CC=golang-dev https://golang.org/cl/1842042
-
- 15 Jul, 2010 1 commit
-
-
Russ Cox authored
* remember #defined names, so that C.stdout can refer to the real name (on OS X) __stdoutp. * better handling of #defined constant expressions * allow n, err = C.strtol("asdf", 0, 123) to get errno as os.Error * write all output files to current directory * don't require gcc output if there was no input Fixes #533. Fixes #709. Fixes #756. R=r CC=dho, golang-dev, iant https://golang.org/cl/1734047
-
- 01 Jul, 2010 1 commit
-
-
Rob Pike authored
Use a count of -1 for infinity. Ditto for Replace. R=rsc CC=golang-dev https://golang.org/cl/1704044
-