1
0
mirror of https://github.com/golang/go synced 2024-11-08 14:46:20 -07:00
Commit Graph

6257 Commits

Author SHA1 Message Date
Robert Griesemer
c606b964a0 go/typechecker: 2nd step towards augmenting AST with full type information.
- refine/define Scope, Object, and Type structures
  (note: scope.go has the addition of types, the rest is only re-organized
  for better readability)
- implemented top-level of type checker:
  resolve global type declarations (deal with double decls, cycles, etc.)
- temporary hooks for checking of const/var declarations, function/method bodies
- test harness for fine-grained testing (exact error locations)
  with initial set of tests

This is a subset of the code for easier review.

R=rsc
CC=golang-dev
https://golang.org/cl/1967049
2010-08-26 14:36:13 -07:00
Russ Cox
4ae2b43ef2 codereview: fix hang on standard hg commands
R=gri
CC=golang-dev
https://golang.org/cl/1950045
2010-08-26 17:06:36 -04:00
Russ Cox
e3ac0b5d3f codereview: print status when hung
After 30 seconds, start printing status updates,
so that we can see whether hg is making progress.

$ hg upload 1983051
Thu Aug 26 15:06:15 2010 running gofmt
Thu Aug 26 15:06:30 2010 inspecting src/pkg/big/int_test.go
Thu Aug 26 15:06:45 2010 inspecting src/pkg/cmath/conj.go
Thu Aug 26 15:07:00 2010 inspecting src/pkg/expvar/expvar.go
Thu Aug 26 15:07:15 2010 inspecting src/pkg/os/env_unix.go
Thu Aug 26 15:07:30 2010 inspecting src/pkg/os/sys_bsd.go
Thu Aug 26 15:07:45 2010 inspecting src/pkg/rand/rand_test.go
Thu Aug 26 15:08:00 2010 inspecting src/pkg/runtime/sig.go
Thu Aug 26 15:08:15 2010 inspecting src/pkg/time/time_test.go
Thu Aug 26 15:08:30 2010 inspecting src/pkg/websocket/websocket.go
Thu Aug 26 15:08:45 2010 uploading src/pkg/utf8/utf8.go
Thu Aug 26 15:09:00 2010 uploading src/pkg/unicode/letter_test.go
Thu Aug 26 15:09:15 2010 uploading src/pkg/xml/embed_test.go
Thu Aug 26 15:09:30 2010 uploading src/pkg/time/tick.go
Thu Aug 26 15:09:45 2010 uploading src/pkg/big/rat_test.go
Thu Aug 26 15:10:00 2010 uploading src/pkg/time/sleep_test.go
Thu Aug 26 15:10:15 2010 uploading src/pkg/patch/patch_test.go
Thu Aug 26 15:10:30 2010 uploading src/pkg/rand/rand.go
https://golang.org/cl/1983051

$

R=gri
CC=golang-dev
https://golang.org/cl/2020045
2010-08-26 16:27:42 -04:00
Scott Lawrence
87229f54c3 misc/emacs: make _ a word symbol
Fixes #655.

R=rsc, aclements
CC=golang-dev
https://golang.org/cl/1981041
2010-08-26 13:32:50 -04:00
Corey Thomasson
ec72f9bf18 net: add LookupMX
R=rsc
CC=golang-dev
https://golang.org/cl/1976049
2010-08-26 13:32:45 -04:00
Kyle Consalus
4d903504b3 runtime: special case copy, equal for one-word interface values
Based on the observation that a great number of the types that
are copied or compared in interfaces, maps, and channels are
word-sized, this uses specialized copy and equality functions
for them that use a word instead of 4 or 8 bytes. Seems to yield
0-6% improvements in performance in the benchmarks I've run.
For example, with the regexp benchmarks:

Before:
regexp.BenchmarkLiteral   500000       3.26 µs/op
regexp.BenchmarkNotLiteral    100000      13.67 µs/op
regexp.BenchmarkMatchClass    100000      18.72 µs/op
regexp.BenchmarkMatchClass_InRange    100000      20.04 µs/op
regexp.BenchmarkReplaceAll    100000      27.85 µs/op

After:
regexp.BenchmarkLiteral   500000       3.11 µs/op
regexp.BenchmarkNotLiteral    200000      13.29 µs/op
regexp.BenchmarkMatchClass    100000      17.65 µs/op
regexp.BenchmarkMatchClass_InRange    100000      18.49 µs/op
regexp.BenchmarkReplaceAll    100000      26.34 µs/op

R=rsc
CC=golang-dev
https://golang.org/cl/1967047
2010-08-26 13:32:40 -04:00
Jukka-Pekka Kekkonen
ba5b09f786 crypto/hmac: make Sum idempotent
Fixes #978.

R=rsc
CC=golang-dev
https://golang.org/cl/1967045
2010-08-26 13:32:29 -04:00
Evan Shaw
33cb46903e net/textproto: Handle multi-line responses
This is required for FTP and SMTP; maybe others.

R=rsc
CC=golang-dev
https://golang.org/cl/1892052
2010-08-26 13:32:23 -04:00
Scott Lawrence
6752ce9331 http: obscure passwords in return value of URL.String
Fixes #974.

R=rsc
CC=golang-dev
https://golang.org/cl/1742057
2010-08-26 13:32:16 -04:00
Russ Cox
25410fc57d A+C: Corey Thomasson (individual CLA)
R=iant
CC=golang-dev
https://golang.org/cl/1952047
2010-08-26 13:21:06 -04:00
Ian Lance Taylor
bbaef5f4dc runtime: Correct commonType.kind values to match compiler.
The copy of these values in the reflect package is already
correct.

R=rsc
CC=golang-dev
https://golang.org/cl/2009044
2010-08-26 08:08:57 -07:00
Christian Himpel
2585888118 .hgignore: ignore src/cmd/cc/y.output
R=golang-dev, adg1, adg
CC=golang-dev
https://golang.org/cl/2023044
2010-08-26 16:50:17 +10:00
Andrew Gerrand
f34e191691 doc/go_learning: add links to more German docs
R=r
CC=golang-dev
https://golang.org/cl/1933045
2010-08-26 10:17:14 +10:00
Russ Cox
dbc6d75315 goinstall: use https for Google Code checkouts
This way, if you later want to check things in,
you can (with appropriate authorization).
Using plain http leads to the cryptic error
abort: HTTP Method Not Allowed.

R=r
CC=golang-dev
https://golang.org/cl/1983050
2010-08-25 18:08:16 -04:00
Russ Cox
423e410258 gotest: allow make test of cgo packages (without make install)
R=r
CC=golang-dev, stevvooe
https://golang.org/cl/1995051
2010-08-25 18:00:42 -04:00
Russ Cox
15f336b675 build: let pkg/Makefile coordinate building of Go commands
Commands written in Go depend on Go packages, so they
cannot be built by src/cmd/make.bash.  They have been
built by src/make.bash after all the packages are done, but
we want to be able to use cgo (written in Go) during the build
of package net.  To make this possible, build the commands
from src/pkg/Makefile instead of src/make.bash, so that they
are included in the package dependency analysis.

R=r
CC=golang-dev
https://golang.org/cl/1972046
2010-08-25 17:54:10 -04:00
Russ Cox
5008927c5c libcgo: update Makefile to use Make.inc
Fix printf format string.

R=r
CC=golang-dev
https://golang.org/cl/1959044
2010-08-25 17:53:24 -04:00
Russ Cox
e63086548b codereview: really disable codereview when not available
$ hg p
codereview disabled: cannot open /Users/rsc/g/go/src/pkg/goplan9.googlecode.com/hg/lib/codereview/codereview.cfg
$

R=dsymonds, r
CC=golang-dev
https://golang.org/cl/1998046
2010-08-25 17:52:25 -04:00
Russ Cox
216f5fff36 build: delete Make.386 Make.amd64 Make.arm
obsoleted by Make.inc.

R=r
CC=golang-dev
https://golang.org/cl/2009041
2010-08-25 17:51:48 -04:00
Jukka-Pekka Kekkonen
9401e3d1e4 websocket: fix missing Sec-WebSocket-Protocol on server response.
Due to header key normalization/typo, the server never responds with
the protocol header in place. This breaks all (draft76) applications
that are using the protocol-header.

R=ukai, rsc
CC=golang-dev
https://golang.org/cl/1969046
2010-08-25 12:52:04 -04:00
Russ Cox
3fc7f776d3 A+C: Jukka-Pekka Kekkonen (individual CLA)
R=adg, madari
CC=golang-dev
https://golang.org/cl/2025042
2010-08-25 12:51:36 -04:00
Martin Neubauer
9a04cba807 src/pkg/Makefile: delete use of QUOTED_GOBIN
R=rsc
CC=golang-dev
https://golang.org/cl/1997044
2010-08-25 12:44:13 -04:00
Andrew Gerrand
0c65748e6d A+C: Martin Neubauer
R=r, rsc
CC=golang-dev
https://golang.org/cl/1999044
2010-08-25 12:34:30 -04:00
Russ Cox
b0729cdfe5 go/doc: use correct escaper for URL
Despite the name, URL escaping is for a small subpiece of the URL only.
This particular URL is being emitted in an <a href=""> tag and in that
context it should be HTML escaped, not URL escaped.

In addition to fixing a bug, this change cuts a dependency chain
from go/doc to net, clearing the way for use of cgo
(which imports go/doc) during the compilation of package net.

R=gri
CC=golang-dev
https://golang.org/cl/1960050
2010-08-25 11:00:38 -04:00
Russ Cox
218afb8fbd syscall: change BUG(brainman) to NOTE(brainman)
Avoids the comment appearing in godoc syscall BUGS section.

R=brainman
CC=golang-dev
https://golang.org/cl/1966048
2010-08-25 01:26:35 -04:00
Andrew Gerrand
dd202c1a6b tag release.2010-08-25
R=rsc
CC=golang-dev
https://golang.org/cl/2023042
2010-08-25 15:01:43 +10:00
Andrew Gerrand
deb00ac3f4 release.2010-08-25
R=rsc
CC=golang-dev
https://golang.org/cl/2009043
2010-08-25 14:58:29 +10:00
Rob Pike
d7736413a6 scanner: change package comment to be clearer about its functionality.
No semantic changes.

R=gri, rsc1
CC=golang-dev
https://golang.org/cl/1998045
2010-08-25 13:07:08 +10:00
Russ Cox
2aa77c6b93 gotest: remove lingering references to $GOBIN
(Assumed to be in $PATH.  all.bash ensures that
during the main build and the user must ensure it
when running commands like gotest or gomake
by hand.  This belonged in the earlier CL but I missed it.)

R=r
CC=golang-dev
https://golang.org/cl/1967048
2010-08-24 21:56:32 -04:00
Russ Cox
e3034adfc2 build: fix build again - not sure where the " went. sigh.
R=r
CC=golang-dev
https://golang.org/cl/2024043
2010-08-24 20:43:31 -04:00
Ian Lance Taylor
2b73ad592c time: Remove unused zoneinfo.go (replaced by zoneinfo_unix.go).
R=r, rsc
CC=brainman, golang-dev
https://golang.org/cl/2020043
2010-08-24 17:24:40 -07:00
Russ Cox
8b718b9a37 build: fix build - last CL missed Make.clib
R=r
CC=golang-dev
https://golang.org/cl/1981047
2010-08-24 20:15:52 -04:00
Russ Cox
86920ad81d build: update, streamline documentation for new $GOBIN
R=adg, r
CC=golang-dev
https://golang.org/cl/2025041
2010-08-24 20:00:50 -04:00
Russ Cox
aafe474ec9 build: $GOBIN defaults to $GOROOT/bin
R=r
CC=golang-dev
https://golang.org/cl/1982049
2010-08-24 20:00:33 -04:00
Jan H. Hosang
2100f57e0f time.Parse should not require minutes for time zone
Fixes #1026.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1962048
2010-08-25 07:41:26 +10:00
Ian Lance Taylor
58a25c6de7 test: Add testcase which crashes gccgo.
R=rsc
CC=golang-dev
https://golang.org/cl/1995050
2010-08-24 13:08:05 -07:00
Russ Cox
e1e829b786 runtime: fix freebsd/386 mmap
The runtime only passes 32 bits of file offset,
but the kernel wants 64 bits, so have to add
zeros explicitly in a copy of the arguments.

R=adg, Martin Neubauer
CC=golang-dev
https://golang.org/cl/1933044
2010-08-24 13:04:02 -04:00
Russ Cox
b1311cbc93 gc: fix parenthesization check
Cannot use paren field in Node because all
instances of a given symbol name use the same Node.

Fixes #1022.

R=ken2
CC=golang-dev
https://golang.org/cl/2015043
2010-08-23 23:10:25 -04:00
Rob Pike
7ddbe79842 effective go: fix errors caught by HaWe
R=rsc
CC=golang-dev
https://golang.org/cl/1959043
2010-08-24 12:37:51 +10:00
Ian Lance Taylor
659966a988 doc: Update gccgo information for recent changes.
R=r
CC=golang-dev
https://golang.org/cl/1941052
2010-08-23 17:50:30 -07:00
Scott Lawrence
668f05aaf1 os: make return type of FileInfo.Permission() consistent with related functions
(uint32 rather than int)

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1958048
2010-08-24 10:38:52 +10:00
Russ Cox
d0459447fa http: doc nit
R=r
CC=golang-dev
https://golang.org/cl/2013043
2010-08-23 18:06:28 -04:00
Ken Thompson
96cbdd62b6 better job on 2007043
better registerization

R=rsc
CC=golang-dev
https://golang.org/cl/1955049
2010-08-23 12:38:15 -07:00
Kai Backman
534dbc738f arm: fix build, regenerate syscall files
R=r
CC=golang-dev
https://golang.org/cl/1952046
2010-08-23 13:25:14 +03:00
Andrew Gerrand
4642708984 io: prevent ReadAtLeast spinloop if min > len(buf)
R=r, heresy.mc
CC=golang-dev
https://golang.org/cl/2017042
2010-08-23 12:04:15 +10:00
Scott Lawrence
d125faeed0 net/ipsock.go: fix error checking bug
Check oserr, not err for non-nil (err is never changed)

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1965042
2010-08-22 22:12:56 +10:00
Scott Lawrence
e5518feaf8 http: fix typo in http.Request documentation
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/2004044
2010-08-22 14:44:00 +10:00
Russ Cox
c560c8a9c3 libmach: implement register fetch for 32-bit x86 kernel
Also use memmove to silence some gcc warnings.

Fixes #1036.

R=r, EtherealMachine
CC=golang-dev
https://golang.org/cl/1943049
2010-08-20 20:49:47 -04:00
Robert Griesemer
dbbe32ee53 fix build
Also: Copyright notices only need the year the file was created.

R=rsc
CC=golang-dev, krasin
https://golang.org/cl/2021041
2010-08-20 11:20:12 -07:00
Ivan Krasin
5a0274399a syscall: regenerate syscall/z* files for linux/386, linux/amd64
DISTRIB_DESCRIPTION="Ubuntu 10.04 LTS"

Use <sys/user.h> instead of <linux/user.h>
See http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00834.html for more details.

R=imkrasin, rsc
CC=golang-dev
https://golang.org/cl/1957041
2010-08-20 09:12:21 -04:00