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

1545 Commits

Author SHA1 Message Date
Russ Cox
91cf0af181 ld: move interpreter string into first block of ELF file
necessary on freebsd.

R=r, dho
CC=golang-dev
https://golang.org/cl/157069
2009-11-18 13:51:05 -08:00
Rob Pike
7518613430 slicecopy was always using 16 (sizeof slice) for the size instead of size of element.
R=rsc
CC=ken2, golang-dev
https://golang.org/cl/156083
2009-11-18 13:43:48 -08:00
Eden Li
652bb7c2be Mangle C struct fields that happen to be named after Go keywords by prefixing them with _. Collisions with existing fields are resolved by prefixing the new Go identifier with _ until it matches nothing else in the struct.
Fixes #36.

R=rsc
https://golang.org/cl/157061
2009-11-18 09:59:10 -08:00
Devon H. O'Dell
b3f538a4fd FreeBSD/i386 work
This patchset gets Go to pretty much the same state that
FreeBSD/amd64 is in.

R=rsc
https://golang.org/cl/157055
2009-11-17 23:58:51 -08:00
Eden Li
2115f514d0 cgo no longer translates function args that are void* into
unsafe.Pointer.
Fixes #254.

R=rsc
https://golang.org/cl/157060
2009-11-17 23:42:21 -08:00
Ken Thompson
01c2de0c15 allow copy to be used without a return value
R=rsc
https://golang.org/cl/156060
2009-11-17 22:00:59 -08:00
Ken Thompson
c4606d05da install copy predefined
did not test 386, but should work
shouldnt matter if copy is not used

R=rsc
https://golang.org/cl/156055
2009-11-17 20:41:44 -08:00
Ken Thompson
26b55e44d9 fix botch
R=rsc
https://golang.org/cl/157046
2009-11-17 14:11:50 -08:00
Ken Thompson
8a6da2f6a0 change a n^2 algorithm in
data initialization to n*log(n)

R=rsc
https://golang.org/cl/158041
2009-11-17 13:59:38 -08:00
Sergio Luis O. B. Correia
bae4f5085e cmd/cc: Fix -I switch to handle a path with blankspaces correctly
Currently, -I switch can't deal with a path containing spaces.
This commit simplify setinclude(), by removing the special case
of a string that had spaces. After this change, setinclude() will
merely add the given directories to the include path, if it does
not yet exist, and this approach works.

Will be needed for solving issue 115.

R=agl1, rsc, iant2, r
https://golang.org/cl/155059
2009-11-17 09:02:47 -08:00
Devon H. O'Dell
0489a260da FreeBSD-specific porting work.
cgo/libmach remain unimplemented. However, compilers, runtime,
and packages are 100%. I still need to go through and implement
missing syscalls (at least make sure they're all listed), but
for all shipped functionality, this is done. Ship! ;)

R=rsc, VenkateshSrinivas
https://golang.org/cl/152142
2009-11-17 08:20:58 -08:00
Russ Cox
1ee83f851d gc: change "can we const evaluate this" from blacklist to whitelist
R=ken2
https://golang.org/cl/155074
2009-11-16 17:40:47 -08:00
Russ Cox
44e51fad28 6l: fix divide by zero in glibc linker.
repeats 8l change http://code.google.com/p/go/source/detail?r=7594e16b5cf9

Fixes #179.

R=iant
https://golang.org/cl/154145
2009-11-16 17:40:03 -08:00
Robert Griesemer
e86afaf456 Don't emit line tags when source code is printed as part of
package documentation using templates. The line tag interferes
with the anchor tag introduces by the template.

This fixes an an issue where some headers lost their ability
to link to the respective source code.

R=rsc
https://golang.org/cl/154166
2009-11-16 14:26:29 -08:00
Kai Backman
c3cf8d663a s/AJMP/AB/ to fix build breakage.
R=rsc
https://golang.org/cl/155069
2009-11-16 11:58:28 -08:00
Russ Cox
ef46a9ddac gc: fix up floating point NaN comparisons
Fixes #167.

R=ken2
https://golang.org/cl/155062
2009-11-15 17:24:14 -08:00
Russ Cox
39f64bed52 godefs: avoid gcc 4'isms in command line.
Fixes #97.

R=r
https://golang.org/cl/155054
2009-11-15 12:57:39 -08:00
Russ Cox
0238fd836f cgo: arrange for English error messages
Fixes #21.

R=r
https://golang.org/cl/155048
2009-11-15 12:57:21 -08:00
Russ Cox
a338231526 gc: five bug fixes, one better error.
* check for struct literal assignment to private fields.
* record, fix crash involving parallel map assignment.
* avoid infinite recursion in exportassignok.
* make floating point bounds check precise.
* avoid crash on invalid receiver.

* add context to error about implicit assignment.

Fixes #86.
Fixes #88.
Fixes #158.
Fixes #174.
Fixes #201.
Fixes #204.

R=ken2
https://golang.org/cl/154144
2009-11-15 12:57:09 -08:00
Russ Cox
2a6bb2c63e gotest: show the test file pattern in "no test files" error
Fixes #190.

R=r
https://golang.org/cl/154142
2009-11-15 12:56:39 -08:00
Russ Cox
b18bee948e cc: drop redundant strcpy
Fixes #192.

R=ken2
https://golang.org/cl/155047
2009-11-15 00:00:05 -08:00
Russ Cox
139a053733 cc: eliminate two fixed-size buffers
Fixes bug 168.
Alternative to https://golang.org/cl/152143.

R=ken2
https://golang.org/cl/155042
2009-11-14 23:25:55 -08:00
Devon H. O'Dell
553be8427e Build changes to support work on the BSDs.
This does still contain some FreeBSD-specific bits, but
it's a pain to do partial diffs.

R=rsc
https://golang.org/cl/152138
2009-11-14 15:29:09 -08:00
Russ Cox
4b13d1b9b5 gc: do not try to constant-evaluate (interface{})("bar")
Fixes #183.

R=ken
https://golang.org/cl/154139
2009-11-14 14:14:27 -08:00
Russ Cox
593ccd1d44 yet another attempt to avoid conflicts with
<stdio.h>, which we weren't even #including

R=r
https://golang.org/cl/154108
2009-11-12 23:38:48 -08:00
Robert Griesemer
511772c888 Remove -align flag from gofmt.
(Making it work correctly with -spaces is a bit of work and the output
won't make much sense as it is intended as input to tabwriter.)
Fixes #100.

R=rsc
https://golang.org/cl/154102
2009-11-12 18:26:45 -08:00
Rob Pike
ce0a4bae41 produce helpful error when gotest doesn't find a Makefile
Fixes #117.

R=rsc, agl1
CC=golang-dev
https://golang.org/cl/152107
2009-11-12 14:28:45 -08:00
Russ Cox
6634e3432d cc, ld: fix more gcc 4.3 -O2 compile bugs
same as https://golang.org/cl/152088
in more files.

Fixes #83.

R=r, r1
https://golang.org/cl/152091
2009-11-12 00:22:45 -08:00
Russ Cox
e5636d6e27 avoid seg fault when return type is unknown
Fixes #80.

R=ken
https://golang.org/cl/154079
2009-11-11 22:20:05 -08:00
Russ Cox
8b95720918 gopack: work around gcc bug in hash function
Fixes #48.  (this time for sure!)

R=r, r1
https://golang.org/cl/152088
2009-11-11 22:19:58 -08:00
David Symonds
9e829c42d6 Fix capitalisation of "Git".
R=rsc
https://golang.org/cl/154071
2009-11-11 17:31:28 -08:00
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
Russ Cox
c3343ef62c fix BUFSIZ redeclaration warnings
R=r
https://golang.org/cl/152085
2009-11-11 16:33:23 -08:00
Russ Cox
ae39a1d8ec cc: correct handling of allocn(0, 1, d)
Fixes #29.

R=r
https://golang.org/cl/152076
2009-11-11 14:52:21 -08:00
Russ Cox
d38630fe3d gotest: add LC_ALL=C
R=r
https://golang.org/cl/154067
2009-11-11 14:52:15 -08:00
Russ Cox
e9ac56fb99 getc/ungetc in assemblers; BUFSIZ everywhere.
Fixes #67.

R=r
https://golang.org/cl/154068
2009-11-11 14:52:08 -08:00
Russ Cox
a174987a7c two gopack nits.
1. allocate an extra byte for use by write.
2. throw away the code trying to translate
   uid and gid to names.  i suspect it of causing
   seg faults in some situations, and it is
   not needed by the compilers.

Fixes #48.  (I hope.)

R=r
https://golang.org/cl/152077
2009-11-11 14:48:33 -08:00
Russ Cox
8c3d2f015b avoid clash with stdio's getc, ungetc.
Fixes #50.

R=r
https://golang.org/cl/154064
2009-11-11 13:08:35 -08:00
Russ Cox
7932950844 gc: increase maximum path size in getwd from 100 to 1000.
Fixes #31.

To try the fix before the next release:
	hg pull -u

R=r1, r
https://golang.org/cl/154058
2009-11-11 12:00:41 -08:00
Adam Langley
5281869fac gopack: convert long to time_t before taking a pointer.
Fixes #40.

R=rsc, r1
CC=golang-dev
https://golang.org/cl/154057
2009-11-11 11:19:33 -08:00
Russ Cox
9604f7b009 gotest: avoid problems with grepping for ·
Fixes #7.

R=r
CC=golang-dev
https://golang.org/cl/154043
2009-11-10 19:56:32 -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
Russ Cox
9f42ccb781 error rewording suggested by robert.
update comment.

R=ken
http://go/go-review/1025031
2009-11-09 15:25:18 -08:00
Robert Griesemer
92743615fb TBR:
fix typo that prevented function bodies from being indexed (ouch!)

R=rsc
http://go/go-review/1024035
2009-11-09 14:44:16 -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
Russ Cox
18ccbc69f8 tweak documentation of commands
so that first sentence is better for cmd page.

live at http://r45:3456/cmd/

R=gri, r
http://go/go-review/1024034
2009-11-09 11:45:15 -08:00
Robert Griesemer
aae64f8c81 - exit godoc w/o crashing if negative tabwidth is provided
- minor related cleanups

R=rsc
http://go/go-review/1025026
2009-11-08 23:42:00 -08:00
Robert Griesemer
d731dc8e72 Addressing issue brought up by dsymonds:
- When providing alternative spellings to a query, do not
  prefix it with a package qualifier as the suggestion may
  not have any results. Correctly filtering is quite a bit
  of work, and clicking the alternative spelling will always
  also show the qualified hits if they exist (but also others).
  Seems good enough for now.
- Give user feedback when the query syntax was wrong.
- Package names in search results are now links to the respective
  package documentation.
- Experimented with excluding main packages and test files
  from index with inconclusive results. Code is present and
  can be enabled by changing a flag in the source. This needs
  some more work.

R=rsc
CC=r, dsymonds
http://go/go-review/1026033
2009-11-08 23:34:08 -08:00
Russ Cox
71983af4a1 bug212, bug213.
R=ken
http://go/go-review/1026032
2009-11-08 23:22:06 -08:00
Robert Griesemer
c532940ecf improved sentence extraction:
- don't forget first periods
- look at capitalization of last char before periods

R=rsc
http://go/go-review/1024027
2009-11-08 21:48:51 -08:00
Russ Cox
ed6eb5b577 a nagging inconsistency: capitalization of
HTML vs Html, URL vs Url, HTTP vs Http,
current source is 6:1 in favor of the former,
so change instances of the latter.

R=r
CC=go-dev
http://go/go-review/1024026
2009-11-08 21:46:20 -08:00
Russ Cox
830813f019 assorted cleanup
R=r, iant
CC=go-dev
http://go/go-review/1025024
2009-11-08 21:08:27 -08:00
Robert Griesemer
7837dbfcb8 use grouping instead of colors to show non-global search hits:
- introduced a new run per file containing all spots belonging
  to the same kind (e.g. var decl, const decl, etc.)
- more comments, better index.go file organization

R=rsc
http://go/go-review/1026028
2009-11-08 20:17:04 -08:00
Robert Griesemer
e8b580c9aa fix sentence extraction
R=rsc
http://go/go-review/1026027
2009-11-08 18:19:06 -08:00
Robert Griesemer
202ede1240 - properly align package synopses
(this was surprisingly hard to get right in HTML)
- show modification times in source directory listings
- various tweaks

R=rsc
http://go/go-review/1024024
2009-11-08 16:47:32 -08:00
Robert Griesemer
a011480ff3 TBR
1st step of renaming dirList.html -> dirlist.html
(OS X filenames are not capitalization-sensitive)

R=rsc
http://go/go-review/1024021
2009-11-08 00:51:08 -08:00
Robert Griesemer
89d0e2dbe3 - better support for text files: show them nicely formatted
instead of serving them raw
- path-related cleanups

R=rsc
http://go/go-review/1026021
2009-11-08 00:40:43 -08:00
Robert Griesemer
1a9805adcb - avoid division-by-zero crash in tabwriter
- correct tabwidth argument for some tabwriter test cases
- catch negative tabwidth flag in gofmt w/o crashing

R=rsc
http://go/go-review/1026022
2009-11-07 23:59:24 -08:00
Robert Griesemer
642caacfa3 - added link to sources
- renamed listing.html -> dirList.html
  (there is a dirs.html already, it should probably have a better name, too)

R=rsc
http://go/go-review/1025020
2009-11-07 21:24:48 -08:00
Robert Griesemer
171ef39949 nice directory listings
R=rsc
http://go/go-review/1026020
2009-11-07 21:12:46 -08:00
Robert Griesemer
1ac60ddd10 - support to extract one-line package synopsis for package listings
- formatting in dirs.html is crude, needs better html (open to suggestions),
  but shows the synopsis
- many package comments should probably be adjusted such that the first
  sentence is more concise

R=rsc, iant
http://go/go-review/1025014
2009-11-07 13:17:53 -08:00
Ken Thompson
0eb2a79ff3 8g optimizer
R=rsc
http://go/go-review/1025011
2009-11-06 16:51:49 -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
5873598a97 updated godoc documentation
R=r
http://go/go-review/1026007
2009-11-06 14:00:49 -08:00
Kai Backman
fd7d803535 fix argument order bug for float
R=rsc
http://go/go-review/1025006
2009-11-06 13:51:17 -08:00
Kai Backman
de663b2d6b with rsc: argsize rounding to 8 smashes stack data on 32bit machines.
R=rsc
http://go/go-review/1024011
2009-11-06 13:50:58 -08:00
Kai Backman
52c549fc9b make 5g executables run on android/arm hardware. change OABI
usage to EABI.

        go/test: passes 85% (296/347) on random android phone.

R=rsc
http://go/go-review/1024003
2009-11-05 22:53:08 -08:00
Robert Griesemer
054354ebd4 gofmt src/cmd/goyacc
(with this change: gofmt -l src/cmd/ | wc
is 0 0 0)

R=ken, rsc
http://go/go-review/1024005
2009-11-05 22:29:29 -08:00
Robert Griesemer
79284cae32 gofmt'ed src/cmd
R=rsc
http://go/go-review/1024004
2009-11-05 22:25:46 -08:00
Robert Griesemer
441e775dad gofmt'ed godefs
R=rsc
http://go/go-review/1020001
2009-11-05 15:35:53 -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
790c9b59d6 codereview: new commands
* clpatch
	* download
	* submit, on behalf of clpatch

stir hgpatch to fix a few bugs

R=r
CC=go-dev
http://go/go-review/1016051
2009-11-05 14:44:57 -08:00
Ken Thompson
18cb960f3e forgot a piece of debugging
in previous change

R=rsc
http://go/go-review/1017052
2009-11-05 13:05:07 -08:00
Ken Thompson
505fd760a2 same speedup as 6l
R=rsc
http://go/go-review/1016050
2009-11-05 12:47:22 -08:00
Russ Cox
1329012a23 new command hgpatch, for use by codereview extension
R=r
http://go/go-review/1018059
2009-11-05 09:27:19 -08:00
Ken Thompson
9c7535432a speed up 6l
hopefully no change

R=rsc
http://go/go-review/1017035
2009-11-04 18:17:57 -08:00
Russ Cox
3de3af512d doc doc doc
R=r
http://go/go-review/1016039
2009-11-04 15:17:36 -08:00
Rob Pike
98ac4c6e65 stylistic issues in a couple of cmd docs
R=rsc
http://go/go-review/1017028
2009-11-04 13:13:17 -08:00
Rob Pike
0d3dd3c950 document godoc and gofmt
R=rsc
http://go/go-review/1018036
2009-11-04 11:33:43 -08:00
Robert Griesemer
4bb0271a12 remove reference to /home/r
R=rsc
http://go/go-review/1018039
2009-11-04 11:15:19 -08:00
Rob Pike
56a38f25a7 document gotest
R=rsc
CC=go-dev
http://go/go-review/1017026
2009-11-03 23:06:16 -08:00
Rob Pike
796e29ebfc add goyacc to the build
R=rsc
CC=go-dev
http://go/go-review/1018034
2009-11-03 22:48:48 -08:00
Rob Pike
472576c615 make goyacc and units.y work again (minor tweaks).
document goyacc a little.

R=rsc
CC=go-dev
http://go/go-review/1017024
2009-11-03 22:38:43 -08:00
Rob Pike
701440043b document gopack.
change string in usage message.

R=rsc
http://go/go-review/1017023
2009-11-03 22:36:31 -08:00
Rob Pike
c6dd8c18f0 document ebnflint
R=gri
http://go/go-review/1016034
2009-11-03 22:19:56 -08:00
Rob Pike
3fa379e797 document the gc go compilers.
fix the usage message.

R=rsc
CC=go-dev
http://go/go-review/1016033
2009-11-03 22:00:36 -08:00
Robert Griesemer
4818d346b6 support for command documentation:
- made package tree handler generic so it can work on any fs tree
- cleanups along the way

R=rsc
CC=r
http://go/go-review/1017020
2009-11-03 19:40:26 -08:00
Rob Pike
dc62c66c73 more command documentation, including nm and prof
R=rsc
http://go/go-review/1017022
2009-11-03 17:46:35 -08:00
Rob Pike
b5ab5d4f12 document the assemblers.
add details about -d and -e flags in the loaders.

R=rsc
CC=go-dev
http://go/go-review/1018031
2009-11-03 16:29:32 -08:00
Rob Pike
2bc63f2367 First steps at command documentation: C compilers and linkers.
Each command gets a doc.go file for godoc to analyze. Its main
element is a package comment.

R=rsc
CC=go-dev
http://go/go-review/1018029
2009-11-03 16:05:47 -08:00
Russ Cox
96ea081c04 6l -e: emit external ELF symbol table.
enough to make nm and oprofile work.

R=r
http://go/go-review/1017016
2009-11-03 14:20:37 -08:00
Robert Griesemer
12f8660d4c use default styler when there is no other given
(No visual change yet since the comments for
exported code snippets - as shown on the pkg
page - are not yet formatted using the standard
comment intersperse mechanism in the printer.
This is a TODO in the printer.)

R=rsc
http://go/go-review/1016031
2009-11-03 10:00:57 -08:00
Robert Griesemer
be56b95770 - show recursive package directory structure in package pages
- removed some underbars in section headings for better looks
- various minor tweaks

R=rsc
http://go/go-review/1018026
2009-11-02 22:44:01 -08:00
Rob Pike
120d0b50c6 forgot to count newlines when scanning white space.
also fix a error-printing bug in godoc.

R=gri
http://go/go-review/1016030
2009-11-02 20:35:52 -08:00
Russ Cox
6334b499e8 fix divide by zero in old glibc dynamic loader
R=r
CC=iant
http://go/go-review/1018024
2009-11-02 14:00:32 -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
Russ Cox
d00248980b do not emit USED for global x when compiling "_ = x;"
R=ken@golang.org
CC=r
http://go/go-review/1018019
2009-11-02 10:50:18 -08:00
Robert Griesemer
49d295d592 - initial steps towards showing directory tree instead of
just a single directory
- all pieces present but not well integrated
- directory tree served at the moment under /tree

R=rsc
http://go/go-review/1018016
2009-11-02 09:25:39 -08:00
Russ Cox
9dd2e1e30f nil pointer checks in 8g.
fix nil pointer check in 6g.
was dereferencing after the ADD;
dereference before instead.

R=ken@golang.org
CC=iant
http://go/go-review/1016022
2009-11-01 21:04:16 -08:00
Rob Pike
4d310f2434 reverse the arguments to io.Copy so the destination is on the
left, like an assignment, like strcpy, etc.

R=rsc
CC=go-dev
http://go/go-review/1016011
2009-11-01 20:59:49 -08:00
Robert Griesemer
b96ad80949 enable all (but one) test cases in test.sh that
were excluded before because of incorrect comment
formatting (comment formatting is mostly idempotent
at this point)

R=rsc
http://go/go-review/1018014
2009-11-01 15:27:10 -08:00
Russ Cox
fd1add2768 syscall cleanup.
* rename PORT.sh -> mkall.sh (hopefully more obvious),
   change behavior: run commands by default.
 * pull more constants out of #defines automatically,
   instead of editing large lists by hand.
 * add Recvfrom, Sendto

add os.O_EXCL.

R=r
http://go/go-review/1017009
2009-11-01 11:13:27 -08:00
Robert Griesemer
5223218307 don't update sync time if no files have changed
(and thus avoid re-indexing after every sync attempt)

R=rsc
http://go/go-review/1016010
2009-11-01 10:33:16 -08:00
Russ Cox
7732d80ceb misc cleanup
R=r
http://go/go-review/1016017
2009-11-01 09:25:55 -08:00
Robert Griesemer
fb12ad063e fix build
R=agl
CC=rsc
http://go/go-review/1016008
2009-10-30 13:19:04 -07:00
Russ Cox
09f4261841 split godoc/godoc.go into godoc/godoc.go
and godoc/main.go.

R=gri
CC=r
http://go/go-review/1017005
2009-10-30 10:58:53 -07:00
Kai Backman
1d0b65d33f added missing sgen reverse character copy code.
R=rsc
http://go/go-review/1018006
2009-10-30 09:38:30 -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
c54cb4cb4d - added missing formatters in templates
- replaced deprecated use of </font> with </span> tag
- added html escaping to godoc formatters where missing
- enabled text format for package documentation

R=rsc
http://go/go-review/1017001
2009-10-28 16:19:09 -07:00
Kai Backman
58ee1f5d54 shift for non-64 bit integers.
R=rsc
http://go/go-review/1015017
2009-10-27 22:38:45 -07:00
Robert Griesemer
e3fd2e1ec6 godoc search bug fixes:
- sort by package name (instead of package path) for results with snippets
- sort line numbers in results without snippets
- properly characterize package clauses
- experiment with a leaner look: no underlines for top-level godoc links in the left side bar

Still using colors to distinguish results. Next step.

R=rsc
http://go/go-review/1015016
2009-10-27 16:08:12 -07:00
Robert Griesemer
32810a5ded code search for godoc:
- added goroutine to automatically index in the background
- added handler for search requests
- added search box to top-level godoc template
- added search.html template for the display of search results
- changes to spec.go because of name conflicts
- added extra styles to style.css (for shorter .html files)

R=rsc
http://go/go-review/1014011
2009-10-27 10:34:31 -07:00
Kai Backman
1228112b50 bug162, large indices on nil references
R=rsc
http://go/go-review/1013016
2009-10-26 21:49:32 -07:00
Robert Griesemer
5a75ac88c9 - indexing component for godoc
R=rsc
http://go/go-review/1015014
2009-10-26 18:32:51 -07:00
Robert Griesemer
57035a9041 snippet generator for godoc search results
R=rsc
http://go/go-review/1013014
2009-10-26 15:47:56 -07:00
Kai Backman
5cc32a5348 fix defer. gave up on unified code for defer and go for now.
R=rsc
http://go/go-review/1014010
2009-10-26 08:02:19 -07:00
Kai Backman
dfeceddd3f make 5l ignore multiple defs, remove use of multiple
defs from embed1 and gotest

R=rsc
http://go/go-review/1014009
2009-10-25 11:59:58 -07:00
Kai Backman
9e99383df5 frame size > StackBig support
R=rsc
http://go/go-review/1015010
2009-10-25 11:51:48 -07:00
Kai Backman
68d5c51287 fix conditional branch instructions for unsigned ints and
float. fix sgen endianess in sgen character copying.

        go/test: passes 97% (336/345)

R=rsc
http://go/go-review/1015007
2009-10-24 22:47:25 -07:00
Rob Pike
c91e89d539 remove reference to p4 in comment.
R=gri
CC=rsc
http://go/go-review/1014008
2009-10-24 14:27:49 -07:00
Kai Backman
f860bc0f4e fixed len/cap for chan. disable gc for now.
go/test: passes 93% (323/345)

R=rsc
http://go/go-review/1015006
2009-10-23 20:31:03 -07:00
Kai Backman
942d6590d9 one more argsize fix. we were copying with the correct
alignment but not enough (duh).

R=rsc
APPROVED=rsc
DELTA=16  (13 added, 0 deleted, 3 changed)
OCL=36020
CL=36024
2009-10-23 11:03:16 -07:00
Kai Backman
dec1ec34bf all of pkg now compiles, fixes a few more tests
go/test: passes 90% (313/345)

R=rsc
APPROVED=rsc
DELTA=90  (83 added, 3 deleted, 4 changed)
OCL=36011
CL=36023
2009-10-23 11:00:59 -07:00
Kai Backman
0af8e1045c fix off by 4 bug in morestack (lr again). remove storing of r0
now that all arguments are passed on the stack.

go/test: passes 89% (310/345)

R=rsc
APPROVED=rsc
DELTA=33  (13 added, 14 deleted, 6 changed)
OCL=36009
CL=36022
2009-10-23 10:59:31 -07:00
Kai Backman
a9e03ae52a fix broken code produced for ominus
go/test: passes 89% (308/345)

R=rsc
APPROVED=rsc
DELTA=10  (5 added, 0 deleted, 5 changed)
OCL=36005
CL=36021
2009-10-23 10:58:29 -07:00
Kai Backman
03bbfe6724 fix off by 4 in newproc arg copying.
R=rsc
APPROVED=rsc
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=36001
CL=36004
2009-10-22 13:31:52 -07:00
Robert Griesemer
34e8075259 fix computation of sync delay
R=rsc
http://go/go-review/1013011
2009-10-23 11:35:40 -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
Russ Cox
219fb02042 fix build after Mercurial move.
various missing or incorrect files.

R=r
CC=go-dev
http://go/go-review/1014004
2009-10-22 10:59:27 -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
Kai Backman
c2eb89af92 change stack splitting comparisons from signed to unsigned (oversight)
R=rsc
APPROVED=rsc
DELTA=9  (0 added, 0 deleted, 9 changed)
OCL=35911
CL=35952
2009-10-21 09:44:23 -07:00
Robert Griesemer
f591591a28 remove superfluous tracing support
R=rsc
DELTA=5  (0 added, 4 deleted, 1 changed)
OCL=35930
CL=35930
2009-10-20 13:30:32 -07:00
Robert Griesemer
4213c22301 Updated and simplified gofmt.
- operates on stdin, a single file, or all files in a file tree
- setting -w flag writes to (source) file instead of stdout
- setting -l flag lists files whose formatting has changed

R=rsc
DELTA=201  (102 added, 71 deleted, 28 changed)
OCL=35890
CL=35926
2009-10-20 12:07:31 -07:00
Russ Cox
60ff8cc86f address bug193 and add note to spec about it.
R=ken
OCL=35920
CL=35920
2009-10-20 08:27:14 -07:00
Russ Cox
02fd255a14 bug162, over and over
R=ken
OCL=35919
CL=35919
2009-10-20 08:03:43 -07:00
Kai Backman
dde4090372 removed tempalloc/tempfree and replaced with tempname
go/test: passes 88% (304/345)

R=rsc
APPROVED=rsc
DELTA=67  (3 added, 54 deleted, 10 changed)
OCL=35910
CL=35910
2009-10-19 22:47:25 -07:00
Russ Cox
fcb9387089 support for 5.out files
R=kaib
DELTA=1262  (1247 added, 7 deleted, 8 changed)
OCL=35907
CL=35909
2009-10-19 22:33:56 -07:00
Russ Cox
a15648658f bug196
R=ken
OCL=35905
CL=35905
2009-10-19 21:10:29 -07:00
Russ Cox
62c4818ee0 bug136
R=ken
OCL=35902
CL=35904
2009-10-19 20:39:18 -07:00
Russ Cox
1be74762c1 bug169
R=ken
OCL=35899
CL=35899
2009-10-19 19:55:17 -07:00
Russ Cox
4c3a85d73a 6g bug fixes:
* bug211
 * embedded interfaces with lowercase methods
 * var _ = f() at top level

R=ken
OCL=35898
CL=35898
2009-10-19 19:27:40 -07:00
Russ Cox
8fffa1d698 bug190.
also eliminate float80 dregs

R=ken
OCL=35894
CL=35896
2009-10-19 18:47:37 -07:00
Kai Backman
b4896b496e function literals
go/test: passes 86% (297/343)

R=rsc
APPROVED=rsc
DELTA=14  (10 added, 1 deleted, 3 changed)
OCL=35881
CL=35884
2009-10-19 12:44:08 -07:00
Kai Backman
8037e3ba5e fix arm build, add 64 bit cgen_asop
R=rsc
APPROVED=rsc
DELTA=21  (21 added, 0 deleted, 0 changed)
OCL=35845
CL=35845
2009-10-16 12:02:14 -07:00
Russ Cox
22a5c78f44 rename sys functions to runtime,
because they are in package runtime.

another step to enforcing package boundaries.

R=r
DELTA=732  (114 added, 93 deleted, 525 changed)
OCL=35811
CL=35824
2009-10-15 23:10:49 -07:00
Kai Backman
4f7aa31862 fix minor typo in float conversions
R=rsc
APPROVED=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=35820
CL=35820
2009-10-15 22:30:57 -07:00
Kai Backman
545dbd810c fix OINDEX address generation, leftover misunderstanding about
how scale works on amd64/386

go/test: passes 85% (294/342)

R=rsc
APPROVED=rsc
DELTA=27  (26 added, 1 deleted, 0 changed)
OCL=35815
CL=35818
2009-10-15 22:16:31 -07:00
Kai Backman
222a15c840 test/64bit.go passes but doesn't generate properly yet.
R=rsc
APPROVED=rsc
DELTA=235  (98 added, 38 deleted, 99 changed)
OCL=35789
CL=35813
2009-10-15 19:41:51 -07:00
Russ Cox
4e4097d9d9 386 shift bug; wasn't zero-extending 16- and 8-bit counts
+test

R=ken
OCL=35801
CL=35801
2009-10-15 16:32:45 -07:00
Russ Cox
a75e347a21 do not migrate x to the heap because of *&x.
R=ken
OCL=35799
CL=35799
2009-10-15 16:03:01 -07:00
Kai Backman
f72ea8eb76 LDREX and STREX
R=rsc
APPROVED=rsc
DELTA=30  (30 added, 0 deleted, 0 changed)
OCL=35751
CL=35756
2009-10-14 21:47:08 -07:00
Rob Pike
fd4767f2c5 rename the source directory for gopack from ar to gopack.
remove the references to 6ar

R=rsc
DELTA=3547  (1770 added, 1775 deleted, 2 changed)
OCL=35669
CL=35671
2009-10-13 12:37:28 -07:00
Kai Backman
101f7cbd61 changed 5c 64 bit word ordering to little endian so it matches
5g. fixes to 64 bit code gen. added (finally) function to do
shifts properly.

go/test: passes 83% (287/342)

R=rsc
APPROVED=rsc
DELTA=156  (50 added, 53 deleted, 53 changed)
OCL=35589
CL=35616
2009-10-12 13:35:28 -07:00
Russ Cox
2372408189 sort errors by line number
turn off testdclstack and "not used" errors
when there are syntax errors.

BUG=2181825
R=ken
OCL=35606
CL=35608
2009-10-12 11:03:48 -07:00
Russ Cox
add89dd1ba stack overflow debugging and fix.
* in 6l, -K already meant check for stack underflow.
    add -KK to mean double-check stack overflows
    even in nosplit functions.

  * comment out print locks; they deadlock too easily
     but are still useful to put back for special occasions.

  * let runcgo assembly switch to scheduler stack
    without involving scheduler directly.  because runcgo
    gets called from matchmg, it is too hard to keep it
    from being called on other stacks.

R=r
DELTA=94  (65 added, 18 deleted, 11 changed)
OCL=35591
CL=35604
2009-10-12 10:26:38 -07:00
Russ Cox
fd76b4f385 new builtin.c.boot from arm.
node printing fixes.
silence incorrect redeclaration error.

R=ken
OCL=35602
CL=35602
2009-10-12 10:12:37 -07:00
Kai Backman
6d0983ae46 64bit and float code generation. fmt compiles but
reflect is broken so fmt doesn't work.

go/test: passes 83% (285/342)

R=rsc
APPROVED=rsc
DELTA=415  (240 added, 29 deleted, 146 changed)
OCL=35576
CL=35588
2009-10-11 20:01:11 -07:00
Kai Backman
1620023d03 fix float <-> int64 conversions
R=rsc
APPROVED=rsc
DELTA=25  (25 added, 0 deleted, 0 changed)
OCL=35566
CL=35574
2009-10-10 22:06:26 -07:00
Rob Pike
86cfaf66a7 reallocate library, libraryobj: 50 isn't nearly enough
R=rsc
DELTA=7  (2 added, 0 deleted, 5 changed)
OCL=35569
CL=35569
2009-10-10 12:29:06 -07:00
Russ Cox
c736b6579f bug209
R=ken
OCL=35546
CL=35546
2009-10-09 16:01:32 -07:00
Russ Cox
f0bde7c51b fix nacl build
R=r
DELTA=23  (5 added, 0 deleted, 18 changed)
OCL=35510
CL=35518
2009-10-09 11:15:19 -07:00
Kai Backman
6084dcdd07 floating point calc, added a few more packages that pass
go/test: passes 80% (274/340)

R=rsc
APPROVED=rsc
DELTA=61  (59 added, 0 deleted, 2 changed)
OCL=35506
CL=35517
2009-10-09 07:37:49 -07:00
Russ Cox
680ee6af63 add & fix bug208, from ken.
fix bug198.

R=ken
OCL=35504
CL=35507
2009-10-08 23:03:34 -07:00
Kai Backman
98fff8ffb2 dupok, gcc compile fix, sync and syscall asm fix
R=rsc
APPROVED=rsc
DELTA=27  (18 added, 0 deleted, 9 changed)
OCL=35503
CL=35505
2009-10-08 22:16:08 -07:00
Russ Cox
094f1d5990 more lgtm files from gofmt
R=gri
OCL=35485
CL=35488
2009-10-08 15:14:54 -07:00
Russ Cox
55edf49a01 add & fix bug207: rewritten if condition
was discarding initialization work.

R=ken
OCL=35454
CL=35457
2009-10-07 22:19:42 -07:00
Russ Cox
d515063588 better handling of mistaken top-level variable
references during the parsing of :=.  the base
problem is that when reading

	a,b,c,d

the parser makes those refer to existing variables,
which might create a few stub top-level ones
for undefined names, but then if a := is the next
token, we need to undo those stubs.

this was causing problems in multifile packages
in which one file used a := variable named rpc
and the other imported a package named rpc.

R=ken
OCL=35446
CL=35446
2009-10-07 14:55:12 -07:00
Russ Cox
4fd7a908bb do not import testing twice when testing testing.
R=r
DELTA=3  (2 added, 0 deleted, 1 changed)
OCL=35443
CL=35445
2009-10-07 14:52:44 -07:00
Russ Cox
c2874976e4 factor portable object+library bits out of 5l/6l/8l into ld
R=r
DELTA=3214  (904 added, 2260 deleted, 50 changed)
OCL=35425
CL=35427
2009-10-07 00:11:59 -07:00
Kai Backman
a2cf914379 5l library loading, 64 bit entry points
R=rsc
APPROVED=rsc
DELTA=58  (52 added, 3 deleted, 3 changed)
OCL=35417
CL=35417
2009-10-06 19:00:30 -07:00
Kai Backman
116beb2653 - moved 3 functions from syscall_linux to _386 and _amd64 (arm lacks them)
- 64 bit OMINUS
- added bunch of missing arm syscalls

R=rsc
APPROVED=rsc
DELTA=203  (189 added, 3 deleted, 11 changed)
OCL=35412
CL=35414
2009-10-06 16:39:38 -07:00
Rob Pike
0bf5553538 fix build
R=rsc
DELTA=5  (5 added, 0 deleted, 0 changed)
OCL=35387
CL=35401
2009-10-06 15:08:32 -07:00
Russ Cox
650bff6aa9 another round of gofmt applications
R=gri
DELTA=900  (106 added, 31 deleted, 763 changed)
OCL=35384
CL=35396
2009-10-06 14:55:39 -07:00
Kai Backman
620ec45c5f cleaned up cgen() to be a bit more straightforward.
R=rsc
APPROVED=rsc
DELTA=104  (46 added, 56 deleted, 2 changed)
OCL=35392
CL=35394
2009-10-06 14:48:39 -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
Kai Backman
5afce0ca85 64 bit cmp and some sgen tweaks
go/test: passes 75% (256/339)

R=rsc
APPROVED=rsc
DELTA=142  (53 added, 4 deleted, 85 changed)
OCL=35367
CL=35375
2009-10-06 09:47:46 -07:00
Rob Pike
e6bc5bf5af allow multiple -L options
R=rsc
DELTA=31  (15 added, 3 deleted, 13 changed)
OCL=35364
CL=35364
2009-10-05 21:31:50 -07:00
Robert Griesemer
c915bc54ba remove a file from idempotency test so that the entire suite passes
R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=35355
CL=35358
2009-10-05 19:32:10 -07:00
Russ Cox
11d3805579 clean more
R=r
DELTA=40  (9 added, 3 deleted, 28 changed)
OCL=35277
CL=35305
2009-10-03 10:38:03 -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
Kai Backman
3e5a817d07 a few more code generation bugs and an interface alignment issue.
go/test: passes 74% (251/339)

R=rsc
APPROVED=rsc
DELTA=40  (34 added, 0 deleted, 6 changed)
OCL=35254
CL=35275
2009-10-02 09:06:51 -07:00
Robert Griesemer
53440da835 Factored out boilerplate from all html docs in doc directory:
- the first HTML comment in those files is extracted as page
  title when serving them
- lib/godoc.html is top-level template for all pages served
- experimented a bit with package documentation layout
  (feedback welcome)
- various related cleanups

TODO:
- The / page (doc/root.html) content repeats links that are
  in the navigation bar. It needs to be cleaned up.

R=rsc
DELTA=826  (86 added, 692 deleted, 48 changed)
OCL=35230
CL=35245
2009-10-01 14:08:00 -07:00
Kai Backman
57f834aeff generate float registers correctly.
go/test: passes 71% (242/339)

R=rsc
APPROVED=rsc
DELTA=9  (5 added, 0 deleted, 4 changed)
OCL=35233
CL=35243
2009-10-01 13:52:55 -07:00
Kai Backman
8fd53f4754 cgen_asop sudoaddable
R=rsc
APPROVED=rsc
DELTA=14  (4 added, 0 deleted, 10 changed)
OCL=35190
CL=35210
2009-10-01 06:50:59 -07:00
Kai Backman
a1b4796394 fixed a few calls to gcmp and some really bothched OINDEX code
(how did that happen?)

go/test: passes 70% (238/339)

R=rsc
APPROVED=rsc
DELTA=18  (10 added, 0 deleted, 8 changed)
OCL=35185
CL=35188
2009-09-30 18:56:37 -07:00
Russ Cox
2157025ef0 step toward darwin ffi: factor out macho code
R=r
DELTA=771  (374 added, 287 deleted, 110 changed)
OCL=35187
CL=35187
2009-09-30 17:33:39 -07:00
Kai Backman
399d23d4f4 load binary op arguments into registers
go/test: passes 69% (237/339)

R=rsc
APPROVED=rsc
DELTA=12  (3 added, 9 deleted, 0 changed)
OCL=35178
CL=35180
2009-09-30 14:28:18 -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
5124e66fca c compiler bug tickled by
void f(struct { int x[1]; } p) { }
the "int" was getting attached to f.

R=ken
OCL=35145
CL=35151
2009-09-30 10:25:22 -07:00
Russ Cox
b71c484c91 fix 386 build - register allocation and shift bug
R=ken
OCL=35140
CL=35142
2009-09-30 08:56:01 -07:00
Russ Cox
e7f9452da5 missing error checking related to ([...]int){...}
R=ken
OCL=35132
CL=35132
2009-09-29 21:23:34 -07:00
Russ Cox
6f1698774d undo 35108 (disallow parens around type in struct literal).
allow parens around [...]int in struct literal.

R=ken
OCL=35112
CL=35130
2009-09-29 21:21:14 -07:00
Kai Backman
187cc1eb49 fix munging of pointer.
go/test: passes 69% (235/339)

R=rsc
APPROVED=rsc
DELTA=5  (4 added, 1 deleted, 0 changed)
OCL=35107
CL=35109
2009-09-29 16:07:59 -07:00
Russ Cox
9c3c140984 disallow parens around type in struct literal syntax,
per discussion with gri.

R=ken
OCL=35108
CL=35108
2009-09-29 16:05:44 -07:00
Kai Backman
8ccf8240f4 fixed alignment issue resulting from confusion around the
meaning of out args.

go/test: passes 68% (231/339)

R=rsc
APPROVED=rsc
DELTA=13  (7 added, 0 deleted, 6 changed)
OCL=35072
CL=35080
2009-09-29 07:27:49 -07:00
Kai Backman
24bfaaf07a - added gcmp for proper ACMP generation, changed all call
sites plus optimized constant code a bit (one less register
  used).
- changed conditional branches, might need a re-tweak later
- gave up on agen OINDEX and copied/fixed the version in 8g

go/test: passes 66% (225/339)

R=rsc
APPROVED=rsc
DELTA=148  (67 added, 32 deleted, 49 changed)
OCL=35040
CL=35055
2009-09-28 15:40:13 -07:00
Russ Cox
7743ffead4 disallow interface { x, y() }
R=ken
OCL=35042
CL=35044
2009-09-28 14:05:34 -07:00
Russ Cox
ed6de5af4c comparisons have type bool
R=ken
OCL=34995
CL=34997
2009-09-24 17:55:22 -07:00
Russ Cox
285b6021e9 missing files; cleaned up g4 nothave output.
fixes 386 build.

R=r
DELTA=56  (56 added, 0 deleted, 0 changed)
OCL=34979
CL=34981
2009-09-24 13:38:18 -07:00
Russ Cox
0c71ead9e6 convert 8l to new ELF code.
mostly cut and paste from 6l.

R=r
DELTA=930  (525 added, 182 deleted, 223 changed)
OCL=34976
CL=34976
2009-09-24 12:53:35 -07:00
Russ Cox
5de6096415 allow runes >= 0x80 in symbols in #pragmas
R=ken
OCL=34975
CL=34975
2009-09-24 11:45: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
567673fc42 nacl - run tests under emulator.
special all-nacl.bash and test/run-nacl that
run just the tests known to work under nacl.
the rest requires closures.

fix another bug or two in syscall.

R=r
DELTA=420  (410 added, 8 deleted, 2 changed)
OCL=34882
CL=34907
2009-09-22 16:56:28 -07:00
Kai Backman
8ce5f6e14a fix bad code generation.
go/test: passes 64% (215/337) tests

metric updated, had total number of tests wrong. number of
failing tests is down from 129 to 122.

R=rsc
APPROVED=rsc
DELTA=228  (12 added, 5 deleted, 211 changed)
OCL=34897
CL=34899
2009-09-22 13:13:23 -07:00
Russ Cox
586d9d5a19 use $(shell uname) instead of $GOOS when
deciding what the host process support is.
this makes a cross-compiling (e.g., GOOS=nacl) build
still generate valid host debugger binaries.

R=r
DELTA=5  (0 added, 0 deleted, 5 changed)
OCL=34878
CL=34889
2009-09-22 07:48:43 -07:00
Russ Cox
7390aa0102 nacl:
add jmp to constant pc.
	generate HLT for INT $3
	do not insert NOPs between REP/REPN and subsequent instruction.
	allow very long time for convergence.

R=ken
OCL=34879
CL=34879
2009-09-22 01:10:40 -07:00
Ken Thompson
2975308125 more inlining of sliceslice
R=rsc
OCL=34871
CL=34871
2009-09-21 18:23:16 -07:00
Russ Cox
eae0906bed rewrite RET, indirect CALL, indirect JMP for nacl.
can JMP or CALL indirect through a register R
provided the preceding instruction is AND $~31, R.

R=ken
OCL=34863
CL=34867
2009-09-21 15:48:22 -07:00
Russ Cox
bbcb91a3a7 convert 386 to use %gs instead of %fs for extern register.
required for nacl and may be nicer for ffi,
because %gs is the standard register for thread-local storage.

R=ken
OCL=34861
CL=34866
2009-09-21 15:46:50 -07:00
Russ Cox
a95ee61aea ideal bools and related fixes
R=ken
OCL=34859
CL=34865
2009-09-21 15:45:55 -07:00
Russ Cox
de0d762a0f accept CALL $(constant) to call absolute PC
R=ken
OCL=34845
CL=34845
2009-09-21 09:41:21 -07:00
Russ Cox
4a4ec23870 8l: step toward native client.
- ELF header bits and addresses
  - do not let instructions span 32-byte boundary
  - align CALLs so return is to 32-byte boundary
  - align indirect jump targets to 32-byte boundary
    (only possible indirect jumps are function entries)

still to do:
  - replace indirect jump, indirect call, and ret with
    nacl-approved instruction sequences
  - switch to GS segment for m-local storage

R=ken
OCL=34818
CL=34818
2009-09-18 18:57:15 -07:00
Russ Cox
c64986f706 merge first pass into main loop in span calculation.
having one copy will cut nacl changes in half.

R=ken
OCL=34815
CL=34815
2009-09-18 17:08:18 -07:00
Kai Backman
46e392e01c changed 5c calling convention to use stack exclusively for in
params. a number of fixes to assembly routines that assumed R0
had the first arg. one stack offset fix, arm pushes the link
register on stack top.

go/test: passes 65% (235/364) tests

R=rsc
APPROVED=rsc
DELTA=20  (11 added, 0 deleted, 9 changed)
OCL=34809
CL=34812
2009-09-18 16:45:41 -07:00
Kai Backman
2c7ec3d861 fix 5g -S and -g output
R=rsc
APPROVED=rsc
DELTA=115  (93 added, 14 deleted, 8 changed)
OCL=34798
CL=34802
2009-09-18 12:47:44 -07:00
Kai Backman
020dbcd4df revert setting of name from type. already set correctly.
R=rsc
APPROVED=rsc
DELTA=1  (0 added, 1 deleted, 0 changed)
OCL=34799
CL=34801
2009-09-18 12:47:25 -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
Kai Backman
a0a965fbcf fixing width bug in DATA output. some logging to make fixing
similar issues easier in the future.

R=rsc
APPROVED=rsc
DELTA=6  (1 added, 0 deleted, 5 changed)
OCL=34771
CL=34773
2009-09-17 23:08:15 -07:00
Kai Backman
6b0bd43fe4 fix code generation of CMP to use registers properly. also fix
one case of uninitialized memory and some output.

R=rsc
APPROVED=rsc
DELTA=73  (43 added, 1 deleted, 29 changed)
OCL=34743
CL=34772
2009-09-17 23:07:52 -07:00
Kai Backman
803a73c431 floating point constants and symbol export fix.
R=rsc
APPROVED=rsc
DELTA=16  (0 added, 1 deleted, 15 changed)
OCL=34753
CL=34769
2009-09-17 19:24:07 -07:00
Russ Cox
cb49a999d1 move static init code from 6g into gc.
hook up to 8g and 5g too.

R=ken
OCL=34768
CL=34768
2009-09-17 19:15:54 -07:00
Russ Cox
73e52ae971 check for unused imports
R=ken
OCL=34732
CL=34756
2009-09-17 16:42:10 -07:00
Russ Cox
20011bc878 unused imports
R=r
OCL=34731
CL=34731
2009-09-17 10:27:04 -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
Rob Pike
d5be41fc4e rename bytes.Buffer.Data() to bytes.Buffer.Bytes()
R=rsc
DELTA=152  (6 added, 0 deleted, 146 changed)
OCL=34695
CL=34701
2009-09-16 15:15:00 -07:00
Rob Pike
2a1c9377d9 use /bin/ed to avoid portability issues
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=34696
CL=34700
2009-09-16 15:14:12 -07:00
Russ Cox
aaaa1fc69b make 6g match spec:
no semicolon allowd after package clause.
	semicolon allowed after import statement.
	no doubled semicolons allowed

R=ken
OCL=34674
CL=34674
2009-09-15 17:29:08 -07:00
Kai Backman
ff196fbde7 patch in proper branch address in zaddr output
R=rsc
APPROVED=rsc
DELTA=12  (11 added, 1 deleted, 0 changed)
OCL=34658
CL=34664
2009-09-15 16:14:49 -07:00
Kai Backman
4c952153aa use register intermediate
R=rsc
APPROVED=rsc
DELTA=21  (7 added, 5 deleted, 9 changed)
OCL=34607
CL=34663
2009-09-15 16:12:47 -07:00
Russ Cox
1c9e4b358f declared and not used; this time for sure
R=ken
OCL=34657
CL=34657
2009-09-15 14:11:43 -07:00
Robert Griesemer
7f25485fc6 go/printer:
- printing of expressions: put spaces only where "needed"
- printing of import statements: no double indentation if there are no renames
- print labels on separate lines
- added extra test files

go/ast:
- unified basic literal nodes and as a result deleted duplicated code
- added initial code to track scopes (not fully used yet)

replaces CL 34553

R=rsc
DELTA=881  (579 added, 223 deleted, 79 changed)
OCL=34623
CL=34651
2009-09-15 13:06:24 -07:00
Russ Cox
59914723df declared and not used error, but disabled.
fix some bugs involving _.

R=ken
OCL=34621
CL=34621
2009-09-14 18:38:30 -07:00
Russ Cox
1a0860b93f make 5g, 8g build again by disabling init code.
R=ken
OCL=34604
CL=34604
2009-09-14 14:27:19 -07:00
Russ Cox
2204cfddea fix bug206.
delay calls to savex as long as possible.

R=ken
OCL=34535
CL=34546
2009-09-10 17:33:01 -07:00
Ken Thompson
93b1dcbfcb minor changes
R=rsc
OCL=34545
CL=34545
2009-09-10 17:32:48 -07:00
Robert Griesemer
58c5e62f8b better gofmt formatting:
- first cut a better line breaks in expr lists
- trailing commas and semis printed where we tend to write them
- fixed a couple of minor spacing issues (interface{}, chan<-, map[x]y, x: y)
- removed some formatting flags from gofmt: no need to change default
- removed option to reverse declaration order when printing
- excluded files from test that cause trouble with idempotency test for now

R=rsc
DELTA=497  (364 added, 83 deleted, 50 changed)
OCL=34539
CL=34544
2009-09-10 17:27:06 -07:00
Russ Cox
fc90fb8c81 rename units -> units.txt.
add makefile rules to build a binary named units as a demo.

R=r
DELTA=1257  (659 added, 597 deleted, 1 changed)
OCL=34528
CL=34530
2009-09-10 14:47:10 -07:00
Ken Thompson
61f27d3c22 sample goyacc program
R=rsc
OCL=34526
CL=34526
2009-09-10 13:53:35 -07:00
Ken Thompson
a138b50ee1 goyacc command
written in (c-style) go
produces go source parser

R=rsc
OCL=34522
CL=34522
2009-09-10 13:19:46 -07:00
Ken Thompson
0631d65dc5 composit literal under
init function context.
also moved composit literal
code from walk.c to sinit.c

R=rsc
OCL=34503
CL=34503
2009-09-09 17:48:55 -07:00
Russ Cox
aa6e81dd71 a few more blank tests
R=ken
OCL=34500
CL=34500
2009-09-09 16:59:41 -07:00
Russ Cox
f4ee9f133c check type of string/map/array index expressions
R=ken
OCL=34478
CL=34480
2009-09-09 01:31:10 -07:00
Russ Cox
83bdb805a2 error message fixes
x == nil
x.go:5: cannot use nil as bool

c := x.(type);
x.go:88: use of .(type) outside type switch

R=ken
OCL=34476
CL=34476
2009-09-09 01:21:20 -07:00
Russ Cox
e780fa8669 defining package block names must override
universe block names.

BUG=2097244
R=ken
OCL=34295
CL=34473
2009-09-09 01:01:39 -07:00
Russ Cox
5d16d23362 update type switch to match spec.
R=ken
OCL=34471
CL=34471
2009-09-09 00:18:16 -07:00
Russ Cox
5438be4541 write-only variable _
R=ken
OCL=34465
CL=34470
2009-09-08 23:16:19 -07:00
Ken Thompson
32aa5be6ef init context for composit literals
R=rsc
OCL=34462
CL=34462
2009-09-08 15:52:27 -07:00
Russ Cox
54414ad866 add -S flag to print size of symbol
R=r
DELTA=24  (15 added, 0 deleted, 9 changed)
OCL=34447
CL=34458
2009-09-08 14:40:27 -07:00
Russ Cox
7a0f4cac03 pass Type* to makechan and makemap so that
they can get the official alignment out of there
instead of guessing.

R=ken
OCL=34450
CL=34450
2009-09-08 13:46:54 -07:00
Ken Thompson
0421cf072e maps in static initialization
R=rsc
OCL=34434
CL=34434
2009-09-07 17:36:47 -07:00
Ken Thompson
a24a26c107 more static init
almost done

R=rsc
OCL=34422
CL=34422
2009-09-06 15:03:51 -07:00
Ken Thompson
18f2e360a0 composit literals
plateau - more to come

R=rsc
OCL=34413
CL=34413
2009-09-05 20:32:24 -07:00
Russ Cox
107d404378 stop using filename for disambiguation within a package.
R=ken
OCL=34339
CL=34341
2009-09-03 15:23:21 -07:00
Robert Griesemer
eea6b0d8d5 simplify extractEBNF code
R=rsc
DELTA=15  (3 added, 2 deleted, 10 changed)
OCL=34307
CL=34314
2009-09-03 10:53:27 -07:00
Rob Pike
d4903abeae use %L in listings so we see source line number in easy format
R=ken
DELTA=9  (0 added, 0 deleted, 9 changed)
OCL=34309
CL=34311
2009-09-03 10:24:38 -07:00
Robert Griesemer
6384cac343 linkify EBNF sections in spec when served via godoc
R=rsc
DELTA=217  (216 added, 0 deleted, 1 changed)
OCL=34279
CL=34306
2009-09-03 09:58:13 -07:00
Russ Cox
a1391c2d13 fix one bug involving [...] constructors.
added iant's bug202 (in main code)
and ken's bug203 (in init function).
bug187 remains at large.

R=ken
OCL=34293
CL=34293
2009-09-02 23:26:13 -07:00
Rob Pike
9e85c790e5 fix initialization of noreturn
R=ken
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=34283
CL=34283
2009-09-02 17:14:30 -07:00
Russ Cox
ee2d5128d6 the last bug involving type hashes
R=ken
OCL=34244
CL=34249
2009-09-02 09:09:32 -07:00
Russ Cox
bebe06a784 type switch bug involving function parameter names
R=ken
OCL=34232
CL=34232
2009-09-01 18:04:49 -07:00
Russ Cox
27c4e7e74e catch package net import "net" for release
R=ken
OCL=34205
CL=34207
2009-09-01 14:12:09 -07:00
Russ Cox
40bcbb30b7 fix 386 build
R=ken
OCL=34164
CL=34164
2009-08-31 18:05:12 -07:00
Russ Cox
fda0e78b23 fix line numbers, again.
if first function in file was dead code, it was being
discarded along with the file name information for that file.
leave the functions in the master function list longer:
let xfol take the dead code out of the code list,
and let span skip the unreachable functions during output.

before
	throw: sys·mapaccess1: key not in map

	panic PC=0x2e7b20
	throw+0x33 /Users/rsc/go/src/pkg/runtime/runtime.c:65
		throw(0x5834f, 0x0)
	sys·mapaccess1+0x73 /Users/rsc/go/src/pkg/runtime/hashmap.c:769
		sys·mapaccess1(0x2b9bd0, 0x0)
	gob·*Encoder·Encode+0x16b /Users/rsc/go/src/pkg/fmt/print.go:2926
		gob·*Encoder·Encode(0x2bb440, 0x0, 0x558b0, 0x0, 0x2e4be0, ...)
	main·walk+0x331 :1603
		main·walk(0x33a480, 0x0)
	main·walk+0x271 :1596
		main·walk(0x300640, 0x0)
	main·walk+0x271 :1596
		main·walk(0x300520, 0x0)
	main·walk+0x271 :1596
		main·walk(0x300240, 0x0)
	main·walk+0x271 :1596
		main·walk(0x678f8, 0x0)
	main·main+0x22 :1610
		main·main()

after
	throw: sys·mapaccess1: key not in map

	panic PC=0x2e7b20
	throw+0x33 /Users/rsc/go/src/pkg/runtime/runtime.c:65
		throw(0x5834f, 0x0)
	sys·mapaccess1+0x73 /Users/rsc/go/src/pkg/runtime/hashmap.c:769
		sys·mapaccess1(0x2b9bd0, 0x0)
	gob·*Encoder·Encode+0x16b /Users/rsc/go/src/pkg/gob/encoder.go:319
		gob·*Encoder·Encode(0x2bb3c0, 0x0, 0x558b0, 0x0, 0x2e4be0, ...)
	main·walk+0x331 /Users/rsc/dir.go:121
		main·walk(0x2f6ab0, 0x0)
	main·walk+0x271 /Users/rsc/dir.go:114
		main·walk(0x301640, 0x0)
	main·walk+0x271 /Users/rsc/dir.go:114
		main·walk(0x301520, 0x0)
	main·walk+0x271 /Users/rsc/dir.go:114
		main·walk(0x301240, 0x0)
	main·walk+0x271 /Users/rsc/dir.go:114
		main·walk(0x678f8, 0x0)
	main·main+0x22 /Users/rsc/dir.go:128
		main·main()
	mainstart+0xe /Users/rsc/go/src/pkg/runtime/amd64/asm.s:55
		mainstart()
	goexit /Users/rsc/go/src/pkg/runtime/proc.c:133
		goexit()

R=r
DELTA=46  (20 added, 25 deleted, 1 changed)
OCL=34094
CL=34103
2009-08-30 19:21:48 -07:00
Russ Cox
6e8524be18 array index bug
x[i]
x not addressable, i >= UINF
double evaluated i
second eval killed live registers

manifested as gob instability

R=ken
OCL=34097
CL=34099
2009-08-30 18:47:48 -07:00
Ken Thompson
6fceadbba3 cleanup getting ready for static init
R=rsc
OCL=34090
CL=34090
2009-08-30 14:43:33 -07:00
Ken Thompson
be219c5e9b removed debug print
R=r
OCL=34087
CL=34087
2009-08-30 11:36:42 -07:00
Ken Thompson
bc15b94181 sped up optimization by not optimizing
very large functions.

R=r
OCL=34080
CL=34080
2009-08-29 20:33:21 -07:00
Ken Thompson
e667e8a4f7 arraytoslice and some cleanup
R=rsc
OCL=34058
CL=34058
2009-08-28 15:44:24 -07:00
Ken Thompson
3983171b08 sliceslice bug
R=rsc
OCL=34050
CL=34050
2009-08-28 13:45:48 -07:00
Ken Thompson
47c568880d bug in sliceslice
R=rsc
OCL=34047
CL=34047
2009-08-28 13:32:09 -07:00
Ken Thompson
bf0130cc0f sliceslice inline
R=rsc
OCL=34041
CL=34041
2009-08-28 12:37:39 -07:00
Robert Griesemer
a7dc9dbd20 - exponentially back off auto-sync'ing instead disabling it in case of failure
R=rsc
DELTA=48  (35 added, 3 deleted, 10 changed)
OCL=34030
CL=34034
2009-08-28 11:28:05 -07:00
Kai Backman
ee31157e16 64 bit lsh, sub, and/or/eor. some placeholder files in syscall and os.
R=rsc
APPROVED=rsc
DELTA=204  (139 added, 0 deleted, 65 changed)
OCL=34009
CL=34025
2009-08-28 07:23:24 -07:00
Ken Thompson
c19c933f5a bug in arrayslice
R=rsc
OCL=33987
CL=33987
2009-08-27 14:59:26 -07:00
Ken Thompson
9bf597a210 inline slicearray
R=rsc
OCL=33974
CL=33974
2009-08-27 13:19:44 -07:00
Russ Cox
bdcf1f8125 add and use Make.cmd
R=r
DELTA=63  (23 added, 31 deleted, 9 changed)
OCL=33932
CL=33959
2009-08-27 11:17:14 -07:00
Russ Cox
3443656bce clean up ideal handling; reject attempts
to write type descriptors for ideal types

R=ken
OCL=33958
CL=33958
2009-08-27 11:16:34 -07:00
Ken Thompson
2d73b7f7f0 bug slicing array - cap is huge
R=rsc
OCL=33936
CL=33936
2009-08-26 19:19:07 -07:00
Rob Pike
87f2208bda rename runtime internals to have modern names (array->slice etc)
R=rsc
DELTA=444  (179 added, 177 deleted, 88 changed)
OCL=33847
CL=33849
2009-08-25 15:54:25 -07:00
Russ Cox
165a99038f ffi -> dynld.
move out of export data into its own section

R=r
DELTA=222  (71 added, 99 deleted, 52 changed)
OCL=33801
CL=33808
2009-08-24 17:27:55 -07:00
Russ Cox
d66d65da96 bug132
R=ken
OCL=33792
CL=33803
2009-08-24 17:06:10 -07:00
Russ Cox
8c253bcae5 first attempt at real FFI support.
in a .6 file, an export line

	//ffi T localfib remotefib remote.so

means the dynamic linker should initialize
localfib, always a pointer, to the address of
remotefib, either text (T) or data (D) after
loading remote.so.

the C compiler will generate an export section
when given the pragmas

	#pragma package fib
	#pragma ffi T localfib remotefib remote.so

needing #pragma package is a bit of a kludge
and hopefully could go away later.

this is just the 6 tool chain support.
other architectures will happen once 6 settles down.

code using this to do FFI is in a later CL.

R=r
DELTA=161  (141 added, 14 deleted, 6 changed)
OCL=33783
CL=33795
2009-08-24 16:15:21 -07:00
Russ Cox
89f69bb3be gc: handle iface == nil in back end
R=ken
OCL=33778
CL=33781
2009-08-24 15:20:37 -07:00
Kai Backman
c6fd23ce6d 64bit literal RSH
R=rsc
APPROVED=rsc
DELTA=85  (35 added, 0 deleted, 50 changed)
OCL=33761
CL=33767
2009-08-24 13:57:04 -07:00
Russ Cox
14be733a25 bug197
R=ken
OCL=33765
CL=33765
2009-08-24 13:41:47 -07:00
Russ Cox
9feee91d79 avoid duplicate field names, so that bug132 can be fixed
also fix echo bug that just surfaced in mkerrors.sh

R=r
DELTA=67  (11 added, 19 deleted, 37 changed)
OCL=33743
CL=33757
2009-08-24 11:03:23 -07:00
Russ Cox
1f177cd8b2 linker work
* use //ffi comments in package import data
    to generate relocation entries and library loads.
  * call initffi in rt0.s if present

R=r
DELTA=117  (91 added, 3 deleted, 23 changed)
OCL=33739
CL=33750
2009-08-24 10:19:31 -07:00
Russ Cox
ef3e6810b8 bug189
R=ken
OCL=33745
CL=33745
2009-08-24 09:23:04 -07:00
Russ Cox
ac9d833c1e half of bug193
R=ken
OCL=33730
CL=33730
2009-08-23 18:09:44 -07:00
Russ Cox
fd6cdbd807 linker work
* more elf constants from FreeBSD
  * simple relocation demo

R=r
DELTA=410  (354 added, 49 deleted, 7 changed)
OCL=33689
CL=33729
2009-08-23 18:03:14 -07:00
Austin Clements
bd65739bc2 Implement line-to-PC mapping. Add unit tests for
PC/line/aline conversion methods.

R=rsc
APPROVED=rsc
DELTA=458  (434 added, 15 deleted, 9 changed)
OCL=33677
CL=33702
2009-08-21 18:13:35 -07:00
Russ Cox
59e2e54eab fix bug195
R=ken
OCL=33700
CL=33700
2009-08-21 18:07:11 -07:00
Russ Cox
e1c5d179d6 fix crash in bug194; add bug196
R=ken
OCL=33694
CL=33697
2009-08-21 17:54:07 -07:00
Kai Backman
f50e7b156e mostly 64 bit support.
- fixed a number of places where we tried to allocate 64bit
  regs. added honeypot in regalloc to catch these in the future.
- implemented quad copying in sgen
- cgen64.c, add, mul
- clearfat done
- D_REGREG output from 5g (linker already knew about them)
- gmove done
- optoas almost done, last bit probably not needed
- D_SHIFT support in list.c

R=rsc
APPROVED=rsc
DELTA=963  (711 added, 112 deleted, 140 changed)
OCL=33619
CL=33688
2009-08-21 16:29:19 -07:00
Russ Cox
0e25c1dc6d linker work
* remove now-unused D_SBIG (was for typestrings)
 * rename elf64.[ch] to elf.[ch]
 * pull in elf headers from FreeBSD instead of writing our own
 * emit non-header ELF data in data section
 * stub out a few more ELF sections needed for dynamic loading

R=r
DELTA=1928  (1237 added, 635 deleted, 56 changed)
OCL=33642
CL=33658
2009-08-21 13:08:11 -07:00
Kai Backman
005509e367 fix 386/arm builds
R=rsc
APPROVED=rsc
DELTA=2  (2 added, 0 deleted, 0 changed)
OCL=33640
CL=33645
2009-08-21 10:53:31 -07:00
Russ Cox
7b29dbb866 symbol bugs.
do not emit unreachable data symbols.

R=austin
DELTA=103  (71 added, 4 deleted, 28 changed)
OCL=33325
CL=33622
2009-08-20 17:33:28 -07:00
Russ Cox
bd4161fcba FFI step 2: can ask for libc.so.6.
introduced explicit "data" symbol instead of etext
to mark beginning of data, so that using larger
alignment (i.e. 4MB like GNU loader) doesn't
confuse garbage collector.

split dodata into dodata and dobss in preparation
for putting the dynamic data + headers in the data
segment instead of stuffed at the beginning of the binary.

R=r
DELTA=52  (37 added, 3 deleted, 12 changed)
OCL=33610
CL=33618
2009-08-20 16:09:38 -07:00
Russ Cox
5bd266d1ee add #include for time and ctime
R=r
DELTA=1  (1 added, 0 deleted, 0 changed)
OCL=33615
CL=33617
2009-08-20 16:06:06 -07:00
Russ Cox
8a45917f3d len and cap on chans
R=ken
OCL=33599
CL=33599
2009-08-20 11:12:04 -07:00
Russ Cox
364301efc6 exclude _test from godoc as well as _obj.
R=gri
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=33586
CL=33590
2009-08-20 09:49:05 -07:00
Kai Backman
8811896597 more work on adding in pieces. fixed my bad assumptions about
signed and unsigned integer conversions.

R=rsc
APPROVED=rsc
DELTA=398  (40 added, 230 deleted, 128 changed)
OCL=33546
CL=33569
2009-08-19 20:17:09 -07:00
Russ Cox
5600435fe4 produce diagnostic for
import "fmt"
var fmt = 1

R=ken
OCL=33556
CL=33561
2009-08-19 17:27:08 -07:00
Russ Cox
38df5ec58d try to do better line number reporting
in the presence of yacc lookahead.
better but still not perfect

R=ken
OCL=33541
CL=33541
2009-08-19 15:18:08 -07:00
Kai Backman
8e96b45fd6 genembedtramp for arm
R=rsc
APPROVED=rsc
DELTA=104  (0 added, 33 deleted, 71 changed)
OCL=33531
CL=33535
2009-08-19 13:57:11 -07:00
Russ Cox
63aeaa2a03 fix import dot bug
R=ken
OCL=33526
CL=33528
2009-08-19 11:32:46 -07:00
Kai Backman
382a19c3de pkg/sort compiling and some progress on syscall. mostly
re-enabling and massaging code.

R=rsc
APPROVED=rsc
DELTA=2496  (1880 added, 330 deleted, 286 changed)
OCL=33487
CL=33504
2009-08-18 19:20:33 -07:00
Kai Backman
7a87a3e0df slashed warnings
R=rsc
APPROVED=rsc
DELTA=35  (2 added, 1 deleted, 32 changed)
OCL=33436
CL=33453
2009-08-18 07:16:10 -07:00
Kai Backman
e7acb5df07 fix runtime and compile regression
R=rsc
APPROVED=rsc
DELTA=6  (0 added, 0 deleted, 6 changed)
OCL=33434
CL=33452
2009-08-18 07:14:25 -07:00
Rob Pike
e1325d916e inline lib9.h
R=rsc
DELTA=41  (20 added, 2 deleted, 19 changed)
OCL=33412
CL=33415
2009-08-17 15:14:59 -07:00
Rob Pike
b0a0e3c439 remove compat stuff
R=rsc
DELTA=70  (16 added, 52 deleted, 2 changed)
OCL=33295
CL=33299
2009-08-14 14:55:22 -07:00
Russ Cox
ce9b379c90 no debug symbols for internal-only method types.
now 15% overhead instead of 30% in binaries.

R=ken
OCL=33235
CL=33288
2009-08-14 13:07:53 -07:00
Rob Pike
00274a13cb rename libmach_amd64 libmach
R=rsc
OCL=33273
CL=33276
2009-08-14 10:46:04 -07:00
Russ Cox
45ce825544 debugging symbols for 8g.
backtraces don't work,
but they didn't work when i started either.

R=ken
OCL=33230
CL=33230
2009-08-13 15:45:58 -07:00
Russ Cox
311c0b4807 6g/6l: add go type information to symbol table.
archive size +70%
  binary size +30%

old

wreck.mtv=; ls -l /Users/rsc/bin/{godoc,gofmt}
-rwxr-xr-x  1 rsc  eng  1487922 Aug 13 13:21 /Users/rsc/bin/godoc
-rwxr-xr-x  1 rsc  eng   995995 Aug 13 13:21 /Users/rsc/bin/gofmt
wreck.mtv=; du -sh $GOROOT/pkg/
9.5M	/home/rsc/go/pkg/
wreck.mtv=;

new

wreck.mtv=; ls -l /Users/rsc/bin/{godoc,gofmt}
-rwxr-xr-x  1 rsc  eng  2014390 Aug 13 14:25 /Users/rsc/bin/godoc
-rwxr-xr-x  1 rsc  eng  1268705 Aug 13 14:25 /Users/rsc/bin/gofmt
wreck.mtv=; du -sh $GOROOT/pkg
 16M	/home/rsc/go/pkg
wreck.mtv=;

R=ken
OCL=33217
CL=33220
2009-08-13 14:41:42 -07:00
Rob Pike
7b366e9c43 fix build
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=33174
CL=33174
2009-08-13 09:35:42 -07:00
Russ Cox
43f29e64a6 mechanism for putting go types into 6.out symbol table.
no types yet.

R=ken
OCL=33142
CL=33146
2009-08-12 18:16:24 -07:00
Russ Cox
f63b0d6b71 silence gcc warning
R=ken
OCL=33144
CL=33144
2009-08-12 18:14:07 -07:00
Russ Cox
d594639087 rm outfile if 6g exits with an error
R=ken
OCL=33134
CL=33141
2009-08-12 17:58:53 -07:00
Russ Cox
57a9bd0ee3 change gotype in symbol table from
character string to machine address.
not filled in, just carved out.

R=austin
DELTA=77  (11 added, 34 deleted, 32 changed)
OCL=33122
CL=33124
2009-08-12 16:14:53 -07:00
Russ Cox
3e98a40793 bug188 - sort(x)
R=ken
OCL=33123
CL=33123
2009-08-12 15:58:31 -07:00
Russ Cox
7dbb687048 rm gobuild
R=r
DELTA=827  (0 added, 826 deleted, 1 changed)
OCL=33117
CL=33120
2009-08-12 15:17:47 -07:00
Russ Cox
a92610208e delete code for forward type declarations
R=ken
OCL=33108
CL=33113
2009-08-12 14:41:13 -07:00
Russ Cox
8db677b0a7 delete heuristic left over from incremental compilation
R=r
DELTA=31  (2 added, 28 deleted, 1 changed)
OCL=33064
CL=33112
2009-08-12 14:41:02 -07:00
Rob Pike
96a2a2effd fix linux build for whole package compilation
R=rsc
OCL=33103
CL=33103
2009-08-12 13:51:02 -07:00
Russ Cox
eda49f331f new included Make.pkg for handwritten package makefiles.
gobuild is obsolete; don't build it (will delete eventually).

revised gotest for whole-package compilation.

R=r
DELTA=102  (68 added, 6 deleted, 28 changed)
OCL=33067
CL=33098
2009-08-12 13:18:46 -07:00
Russ Cox
dd5f32330c 6g: save all 64 bits of AX/DX
8g: save AX/DX around div

R=ken
OCL=33094
CL=33096
2009-08-12 13:18:27 -07:00
Russ Cox
66bb399fdd whole-package compilation
R=ken
OCL=33063
CL=33095
2009-08-12 13:18:19 -07:00
Russ Cox
866b272336 bug186 - f(iota)
R=ken
OCL=33051
CL=33051
2009-08-11 17:05:22 -07:00
Russ Cox
7732f79daa fix indirect error
x.go:3: invalid indirect of X (type int)

was
x.go:3: invalid indirect of nil

R=ken
OCL=33008
CL=33008
2009-08-10 18:19:32 -07:00
Russ Cox
3f91f80a21 8-bit div and mod
R=ken
OCL=32975
CL=32975
2009-08-10 12:46:23 -07:00
Ken Thompson
f70e285178 bug in int8 mod
R=rsc
OCL=32971
CL=32971
2009-08-10 11:20:33 -07:00
Ken Thompson
60238e25bf increase from 3 to 11 floating registers
R=rsc
OCL=32947
CL=32947
2009-08-09 16:42:21 -07:00
Ken Thompson
34f76b5de5 1. integer division by a constant done.
2. moved functions from 6g to gc
for portability to other families.
3. added rotate-carry instructions to
peek and reg.

R=rsc
OCL=32946
CL=32946
2009-08-09 15:16:06 -07:00
Ken Thompson
812f06b3ca another plateau - almost done
only need to fix up certain
denominators

R=rsc
OCL=32928
CL=32928
2009-08-08 16:53:21 -07:00
Ken Thompson
07044ba6e5 plateau in divide by a constant
still to do - overflow, mod

R=rsc
OCL=32927
CL=32927
2009-08-08 15:26:09 -07:00
Ken Thompson
8b8a2bd945 more work on divide by constant.
no real change -- disabled because of bugs

R=rsc
OCL=32923
CL=32923
2009-08-07 20:21:04 -07:00
Russ Cox
6be0f50b97 bug159
R=ken
OCL=32902
CL=32914
2009-08-07 16:47:54 -07:00
Russ Cox
002623704f remove 8.out before creating it.
hope this will work around Mac NFS bug
where writing to an 8.out that has crashed
recently sometimes wedges NFS.

R=r
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=32906
CL=32908
2009-08-07 15:22:09 -07:00
Russ Cox
39b12e2dcb bug185 - return b,a from func() (a,b int)
R=ken
OCL=32900
CL=32900
2009-08-07 14:38:31 -07:00
Russ Cox
d1ee5d6e8f bug184 - assignment compatibility in unpacked multireturn
R=ken
OCL=32890
CL=32894
2009-08-07 14:00:18 -07:00
Russ Cox
aa7bd48389 bug183 - embedded vs non-embedded struct field in eqtype
R=ken
OCL=32888
CL=32888
2009-08-07 13:23:09 -07:00
Russ Cox
468f244416 bug182 - compiler crash
R=ken
OCL=32887
CL=32887
2009-08-07 13:17:28 -07:00
Russ Cox
6c2738eb43 bug181 - type T *struct { T } is an invalid embedded type
R=ken
OCL=32886
CL=32886
2009-08-07 13:14:01 -07:00
Russ Cox
99eca57d43 clean up a few error messages;
disable func redeclaration mismatch test;
fix golden.out

R=ken
OCL=32883
CL=32883
2009-08-07 13:00:20 -07:00
Russ Cox
76a763e0be 8 shift bug
R=ken
OCL=32882
CL=32882
2009-08-07 12:57:44 -07:00
Russ Cox
b648716ee9 forward declarations not necessary.
still to do:
	* initializer cycle detection
	* nicer error for type checking cycles

R=ken
OCL=32855
CL=32880
2009-08-07 12:50:26 -07:00
Ken Thompson
f1baf78247 divide by a constant power of 2
R=rsc
OCL=32858
CL=32858
2009-08-06 22:33:12 -07:00
Robert Griesemer
2b87d95f01 - allow more general type switch syntax
- support for reverse printing of AST
  (for compiler testing)
- added -reverse flag to gofmt

R=rsc
DELTA=163  (125 added, 11 deleted, 27 changed)
OCL=32808
CL=32853
2009-08-06 17:44:56 -07:00