1
0
mirror of https://github.com/golang/go synced 2024-10-04 09:11:21 -06:00
Commit Graph

68 Commits

Author SHA1 Message Date
Russ Cox
ae3341476d cgo: add more information about gcc output parsing failures
R=r
https://golang.org/cl/152084
2009-11-11 16:58:27 -08:00
Robert Griesemer
1698934194 - replaced gofmt expression formatting algorithm with
rsc's algorithm
- applied gofmt -w misc src
- partial CL (remaining files in other CLs)

R=rsc, r
http://go/go-review/1024040
2009-11-09 21:09:34 -08:00
Robert Griesemer
40621d5c0d remove semis after statements in one-statement statement lists
R=rsc, r
http://go/go-review/1025029
2009-11-09 12:07:39 -08:00
Robert Griesemer
368f8cbc75 - fine-tuning of one-line func heuristic (nodes.go)
- enabled for function declarations (not just function literals)
- applied gofmt -w $GOROOT/src
(look for instance at src/pkg/debug/elf/elf.go)

R=r, rsc
CC=go-dev
http://go/go-review/1026006
2009-11-06 14:24:38 -08:00
Robert Griesemer
6f762f5410 gofmt'ed 6l 8l cgo
R=r
http://go/go-review/1020002
2009-11-05 15:33:26 -08:00
Russ Cox
3de3af512d doc doc doc
R=r
http://go/go-review/1016039
2009-11-04 15:17:36 -08:00
Adam Langley
72ec930fa7 Fix cgo for GCC 4.4
Firstly, with -Werror, GCC switched to printing warnings starting
with "error:". Widening the string matches solves this as the messages
are otherwise unchanged.

Secondly, GCC 4.4 outputs DWARF sections with with NUL bytes in all
the offsets and requires the relocation section for .debug_info to be
processed in order to result in valid DWARF data. Thus we add minimal
handling for relocation sections, which is sufficient for our needs.

BUG=1
Fixes #1.

R=rsc, iant
CC=go-dev
http://go/go-review/1017003
2009-11-02 12:02:16 -08:00
Robert Griesemer
fb12ad063e fix build
R=agl
CC=rsc
http://go/go-review/1016008
2009-10-30 13:19:04 -07:00
Stephen Ma
74aa9dd55a Hack to make cgo's generated go code compile when there are no
unsafe.Pointer references inside the C declarations.

R=go-dev
APPROVED=rsc
DELTA=1  (1 added, 0 deleted, 0 changed)
OCL=36063
CL=36063
2009-10-26 21:21:53 -07:00
Robert Griesemer
8f52a82169 - make printer interface easily extensible w/o breaking clients (in the future)
- replacement for p4 CL 35999 (abandoned)

R=rsc
http://go/go-review/1012010
2009-10-22 18:19:49 -07:00
Robert Griesemer
90cc4a5949 go/printer:
- handle HTML tagging via (client-installable) Stylers

go/doc:
- basic styler support
- some factoring
- ready to contain the search code (but for now excluded)

doc/style.css:
- updated

doc/go_spec.css:
- cleanup: replace deprecated uses of <font> tag with <span> tag

R=rsc
DELTA=302  (160 added, 62 deleted, 80 changed)
OCL=35973
CL=35996
2009-10-22 09:41:38 -07:00
Russ Cox
c62b3265a7 apply gofmt to the LGTM-marked files from 34501
that have not changed since I applied gofmt.

R=gri
DELTA=456  (77 added, 3 deleted, 376 changed)
OCL=35378
CL=35383
2009-10-06 11:42:55 -07:00
Russ Cox
133a158bd8 8c, 8l dynamic loading support.
better mach binaries.
cgo working on darwin+linux amd64+386.
eliminated context switches - pi is 30x faster.
add libcgo to build.

on snow leopard:
  - non-cgo binaries work; all tests pass.
  - cgo binaries work on amd64 but not 386.

R=r
DELTA=2031  (1316 added, 626 deleted, 89 changed)
OCL=35264
CL=35304
2009-10-03 10:37:12 -07:00
Russ Cox
e67a5084b8 cgo working on linux/386
R=r
DELTA=70  (47 added, 4 deleted, 19 changed)
OCL=35167
CL=35171
2009-09-30 13:47:15 -07:00
Russ Cox
cce01111a9 cgo: works on amd64.
integrated into Makefiles (see misc/cgo/gmp/Makefile).

R=r
DELTA=1110  (540 added, 525 deleted, 45 changed)
OCL=35153
CL=35158
2009-09-30 11:51:08 -07:00
Russ Cox
12fc217336 cgo checkpoint.
can write all 3 output files and then compile them by hand.

R=r
DELTA=919  (841 added, 16 deleted, 62 changed)
OCL=34954
CL=34973
2009-09-24 11:43:19 -07:00
Russ Cox
6a2602de91 cgo: can look up C identifier kind (type or value) and type
gmp.go:197:4:  type mpz_t          C type  mpz_t
gmp.go:205:2:  call mpz_init       C value func(mpz_ptr) void
gmp.go:206:2:  call mpz_set        C value func(mpz_ptr, mpz_srcptr) void
gmp.go:221:2:  call mpz_init       C value func(mpz_ptr) void
gmp.go:227:7:  call size_t         C type  size_t
gmp.go:228:2:  call mpz_export     C value func(*void, *size_t, int, size_t, int, size_t, mpz_srcptr) *void
gmp.go:235:13: call mpz_sizeinbase C value func(mpz_srcptr, int) size_t
gmp.go:241:2:  call mpz_set        C value func(mpz_ptr, mpz_srcptr) void
gmp.go:252:3:  call mpz_import     C value func(mpz_ptr, size_t, int, size_t, int, size_t, *const void) void
gmp.go:261:2:  call mpz_set_si     C value func(mpz_ptr, long int) void
gmp.go:273:5:  call mpz_set_str    C value func(mpz_ptr, *const char, int) int
gmp.go:282:9:  call mpz_get_str    C value func(*char, int, mpz_srcptr) *char
gmp.go:287:3:  call mpz_clear      C value func(mpz_ptr) void
gmp.go:302:2:  call mpz_add        C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:311:2:  call mpz_sub        C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:320:2:  call mpz_mul        C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:329:2:  call mpz_tdiv_q     C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:339:2:  call mpz_tdiv_r     C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:348:2:  call mpz_mul_2exp   C value func(mpz_ptr, mpz_srcptr, long unsigned int) void
gmp.go:356:2:  call mpz_div_2exp   C value func(mpz_ptr, mpz_srcptr, long unsigned int) void
gmp.go:367:3:  call mpz_pow_ui     C value func(mpz_ptr, mpz_srcptr, long unsigned int) void
gmp.go:369:3:  call mpz_powm       C value func(mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr) void
gmp.go:378:2:  call mpz_neg        C value func(mpz_ptr, mpz_srcptr) void
gmp.go:386:2:  call mpz_abs        C value func(mpz_ptr, mpz_srcptr) void
gmp.go:404:9:  call mpz_cmp        C value func(mpz_srcptr, mpz_srcptr) int
gmp.go:413:2:  call mpz_tdiv_qr    C value func(mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:426:2:  call mpz_gcdext     C value func(mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr) void

R=r
DELTA=938  (628 added, 308 deleted, 2 changed)
OCL=34733
CL=34791
2009-09-18 11:52:00 -07:00
Russ Cox
0b7878a96e first step toward cgo tool.
can extract import "C" doc comment
and all references to C package.

; cgo gmp.go | sort
#include <gmp.h>
gmp.go:197:4: mpz_t as type
gmp.go:205:2: mpz_init as call
gmp.go:206:2: mpz_set as call
gmp.go:221:2: mpz_init as call
gmp.go:227:7: size_t as call
gmp.go:228:2: mpz_export as call
gmp.go:235:13: mpz_sizeinbase as call
gmp.go:241:2: mpz_set as call
gmp.go:252:3: mpz_import as call
gmp.go:261:2: mpz_set_si as call
gmp.go:273:5: mpz_set_str as call
gmp.go:282:9: mpz_get_str as call
gmp.go:287:3: mpz_clear as call
gmp.go:302:2: mpz_add as call
gmp.go:311:2: mpz_sub as call
gmp.go:320:2: mpz_mul as call
gmp.go:329:2: mpz_tdiv_q as call
gmp.go:339:2: mpz_tdiv_r as call
gmp.go:348:2: mpz_mul_2exp as call
gmp.go:356:2: mpz_div_2exp as call
gmp.go:367:3: mpz_pow as call
gmp.go:369:3: mpz_powm as call
gmp.go:378:2: mpz_neg as call
gmp.go:386:2: mpz_abs as call
gmp.go:404:9: mpz_cmp as call
gmp.go:413:2: mpz_tdiv_qr as call
gmp.go:426:2: mpz_gcdext as call
;

R=r
DELTA=746  (746 added, 0 deleted, 0 changed)
OCL=34710
CL=34714
2009-09-16 18:14:18 -07:00