]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years ago5l: stop using R12 as SB
Russ Cox [Sun, 17 Oct 2010 15:41:23 +0000 (11:41 -0400)]
5l: stop using R12 as SB

Because the SB is only good for 8k and Go programs
tend to have much more data than that, SB doesn't
save very much.  A fmt.Printf-based hello world program
has  360 kB text segment.  Removing SB makes the text
500 bytes (0.14%) longer.

R=ken2, r2, ken3
CC=golang-dev
https://golang.org/cl/2487042

14 years ago8l: fix windows build.
Wei Guangjing [Sat, 16 Oct 2010 03:37:14 +0000 (23:37 -0400)]
8l: fix windows build.

R=rsc, brainman
CC=golang-dev
https://golang.org/cl/2543042

14 years ago8l: function at a time code layout
Russ Cox [Sat, 16 Oct 2010 00:19:57 +0000 (20:19 -0400)]
8l: function at a time code layout

R=ken2
CC=golang-dev
https://golang.org/cl/2481042

14 years agolog: roll back the rollback of the deprecation of the old interface.
Rob Pike [Fri, 15 Oct 2010 20:14:29 +0000 (13:14 -0700)]
log: roll back the rollback of the deprecation of the old interface.

R=adg
CC=golang-dev
https://golang.org/cl/2521042

14 years ago8l: blind attempt to fix windows build
Russ Cox [Fri, 15 Oct 2010 19:29:25 +0000 (15:29 -0400)]
8l: blind attempt to fix windows build
or at least gather more information

R=ken2
CC=golang-dev
https://golang.org/cl/2515042

14 years agogc: keep track of real actual type of identifiers.
Luuk van Dijk [Fri, 15 Oct 2010 19:25:34 +0000 (21:25 +0200)]
gc: keep track of real actual type of identifiers.

R=rsc
CC=golang-dev
https://golang.org/cl/2519042

14 years ago6l: function at a time code layout
Russ Cox [Fri, 15 Oct 2010 19:18:47 +0000 (15:18 -0400)]
6l: function at a time code layout

Also change the span-dependent jump algorithm
to use fewer iterations:

* resolve forward jumps at their targets (comefrom list)
* mark jumps as small or big and only do small->big
* record whether a jump failed to be encodable

These changes mean that a function with only small
jumps can be laid out in a single iteration, and the
vast majority of functions take just two iterations.
I was seeing a maximum of 5 iterations before; the
max now is 3 and there are fewer that get even that far.

R=ken2
CC=golang-dev
https://golang.org/cl/2537041

14 years ago6l, 8l: avoid recursion in asmandsz
Russ Cox [Fri, 15 Oct 2010 17:01:03 +0000 (13:01 -0400)]
6l, 8l: avoid recursion in asmandsz

The old code said

if(x) {
handle a
return
}
aa = *a
rewrite aa to make x true
recursivecall(&aa)

The new code says

params = copy out of a
if(!x) {
rewrite params to make x true
}
handle params

but it's hard to see that in the Rietveld diffs because
it gets confused by changes in indentation.

Avoiding the recursion makes other changes easier.

R=ken2
CC=golang-dev
https://golang.org/cl/2533041

14 years ago5l, 6l, 8l: accumulate data image during import
Russ Cox [Fri, 15 Oct 2010 03:48:40 +0000 (23:48 -0400)]
5l, 6l, 8l: accumulate data image during import

Using explicit relocations internally, we can
represent the data for a particular symbol as
an initialized block of memory instead of a
linked list of ADATA instructions.  The real
goal here is to be able to hand off some of the
relocations to the dynamic linker when interacting
with system libraries, but a pleasant side effect is
that the memory image is much more compact
than the ADATA list, so the linkers use less memory.

R=ken2
CC=golang-dev
https://golang.org/cl/2512041

14 years agotag release.2010-10-13.1
Andrew Gerrand [Fri, 15 Oct 2010 01:06:34 +0000 (12:06 +1100)]
tag release.2010-10-13.1

R=r
CC=golang-dev
https://golang.org/cl/2526041

14 years agorelease.2010-10-13.1 weekly.2010-10-13.1
Andrew Gerrand [Fri, 15 Oct 2010 01:05:05 +0000 (12:05 +1100)]
release.2010-10-13.1

R=r, r2
CC=golang-dev
https://golang.org/cl/2493043

14 years agolog: roll back deprecation of old API to apply fix to log.Output in public release.
Rob Pike [Fri, 15 Oct 2010 01:02:08 +0000 (18:02 -0700)]
log: roll back deprecation of old API to apply fix to log.Output in public release.

R=adg
CC=golang-dev
https://golang.org/cl/2525042

14 years agolog: fix custom output bug
Andrew Gerrand [Fri, 15 Oct 2010 00:55:51 +0000 (11:55 +1100)]
log: fix custom output bug

R=r
CC=golang-dev
https://golang.org/cl/2525041

14 years agoarm: enable 6 more tests after net fix
Russ Cox [Thu, 14 Oct 2010 21:15:45 +0000 (17:15 -0400)]
arm: enable 6 more tests after net fix

R=ken2
CC=golang-dev
https://golang.org/cl/2520042

14 years agosyscall: fix arm networking
Russ Cox [Thu, 14 Oct 2010 20:13:44 +0000 (16:13 -0400)]
syscall: fix arm networking

Suggested by fango (fan.howard@gmail.com)

R=r, r2
CC=golang-dev
https://golang.org/cl/2514041

14 years agolog: delete deprecated functionality
Rob Pike [Thu, 14 Oct 2010 19:50:36 +0000 (12:50 -0700)]
log: delete deprecated functionality
Fixes #1195.

R=rsc
CC=golang-dev
https://golang.org/cl/2504043

14 years agoarm: adjust recover for new reflect.call
Russ Cox [Thu, 14 Oct 2010 14:45:32 +0000 (10:45 -0400)]
arm: adjust recover for new reflect.call

R=ken2
CC=golang-dev
https://golang.org/cl/2471043

14 years agodoc: add The Expressiveness of Go talk to docs.html
Andrew Gerrand [Thu, 14 Oct 2010 06:25:23 +0000 (17:25 +1100)]
doc: add The Expressiveness of Go talk to docs.html

R=r, r2
CC=golang-dev
https://golang.org/cl/2494042

14 years agotag release.2010-10-13
Andrew Gerrand [Thu, 14 Oct 2010 03:56:11 +0000 (14:56 +1100)]
tag release.2010-10-13

R=stephenm
CC=golang-dev
https://golang.org/cl/2471042

14 years agorelease.2010-10-13 weekly.2010-10-13
Andrew Gerrand [Thu, 14 Oct 2010 03:52:08 +0000 (14:52 +1100)]
release.2010-10-13

R=r, rsc, r2
CC=golang-dev
https://golang.org/cl/2499041

14 years agomisc: add goplay
Andrew Gerrand [Thu, 14 Oct 2010 03:06:02 +0000 (14:06 +1100)]
misc: add goplay

R=rsc, r
CC=golang-dev
https://golang.org/cl/2473041

14 years agosmtp: new package
Evan Shaw [Thu, 14 Oct 2010 02:07:28 +0000 (22:07 -0400)]
smtp: new package

R=rsc, iant, agl
CC=golang-dev
https://golang.org/cl/2052042

14 years agobufio: bulletproof UnreadRune
Rob Pike [Thu, 14 Oct 2010 00:12:43 +0000 (17:12 -0700)]
bufio: bulletproof UnreadRune
After a fill(), there is nothing to back up.  Make sure UnreadRune
recognizes the situation.

Fixes #1137.
(Stops the crash, but doesn't make UnreadRune usable after a Peek()).

R=rsc
CC=golang-dev
https://golang.org/cl/2498041

14 years agoarm: enable 8 more packages
Russ Cox [Wed, 13 Oct 2010 22:16:44 +0000 (18:16 -0400)]
arm: enable 8 more packages

The remaining failures include:

* something about bit operations?
crypto/block
encoding/binary

* something about file I/O?
archive/tar
archive/zip
debug/dwarf
debug/elf
debug/macho
image/png

* floating point
cmath
expvar
flag
fmt
gob
json
math
strconv
template
xml

* network (maybe fixed by a pending CL)
http
netchan
rpc
rpc/jsonrpc
syslog
websocket

* line numbers
log

* haven't bothered / not sure
exp/datafmt
exp/eval
go/printer
os
os/signal
testing/quick

R=ken2
CC=golang-dev
https://golang.org/cl/2496041

14 years agofix arm bug in reflect.call
Ken Thompson [Wed, 13 Oct 2010 20:24:14 +0000 (13:24 -0700)]
fix arm bug in reflect.call

R=rsc
CC=golang-dev
https://golang.org/cl/2475042

14 years agovarious: avoid %ld etc
Russ Cox [Wed, 13 Oct 2010 20:20:22 +0000 (16:20 -0400)]
various: avoid %ld etc

The Plan 9 tools assume that long is 32 bits.
We converted all instances of long to int32 when
importing the code but missed the print formats.
Because int32 is always int on the compilers we use,
it is never correct to use %lux, %ld, etc.  Convert to %ux, %d, etc.

(It matters because on 64-bit gcc, long is 64 bits,
so we were printing 32-bit quantities with 64-bit formats.)

R=ken2
CC=golang-dev
https://golang.org/cl/2491041

14 years ago5l, 6l, 8l: first pass cleanup
Russ Cox [Wed, 13 Oct 2010 19:51:21 +0000 (15:51 -0400)]
5l, 6l, 8l: first pass cleanup

* Maintain Sym* list for text with individual
  prog lists instead of using one huge list and
  overloading p->pcond.
* Comment what each file is for.
* Move some output code from span.c to asm.c.
* Move profiling into prof.c, symbol table into symtab.c.
* Move mkfwd to ld/lib.c.
* Throw away dhog dynamic loading code.
* Throw away Alef become.
* Fix printing of WORD instructions in 5l -a.

Goal here is to be able to handle each piece of text or data
as a separate piece, both to make it easier to load the
occasional .o file and also to make it possible to split the
work across multiple threads.

R=ken2, r, ken3
CC=golang-dev
https://golang.org/cl/2335043

14 years ago5l, 6l, 8l: indent, outdent
Russ Cox [Wed, 13 Oct 2010 19:19:53 +0000 (15:19 -0400)]
5l, 6l, 8l: indent, outdent

This is entirely adding and removing tabs.
It looks weird but will make the diffs for the
next change easier to read.

R=ken2
CC=golang-dev
https://golang.org/cl/2490041

14 years agolog: fix out-of-date package comment
Rob Pike [Wed, 13 Oct 2010 18:05:45 +0000 (11:05 -0700)]
log: fix out-of-date package comment

R=rsc
CC=golang-dev
https://golang.org/cl/2485041

14 years agoruntime: remove done TODO from SetFinalizer
Andrew Gerrand [Wed, 13 Oct 2010 03:40:02 +0000 (14:40 +1100)]
runtime: remove done TODO from SetFinalizer

R=rsc
CC=golang-dev
https://golang.org/cl/2472041

14 years agoimage: add an offset to Tiled.
Nigel Tao [Wed, 13 Oct 2010 01:05:21 +0000 (12:05 +1100)]
image: add an offset to Tiled.

R=r, r2
CC=golang-dev
https://golang.org/cl/2469041

14 years agolog: reduce allocations
Rob Pike [Wed, 13 Oct 2010 00:27:14 +0000 (17:27 -0700)]
log: reduce allocations
Use a bytes.Buffer in log writing instead of string concatenation.
Should reduce the number of allocations significantly.

R=rsc, r2
CC=golang-dev
https://golang.org/cl/2417042

14 years agoEffective Go: update examples to use new logging interface.
Rob Pike [Tue, 12 Oct 2010 23:56:50 +0000 (16:56 -0700)]
Effective Go: update examples to use new logging interface.

R=adg
CC=golang-dev
https://golang.org/cl/2468041

14 years agodoc: add Sydney University video, fix hlint warnings
Andrew Gerrand [Tue, 12 Oct 2010 22:15:28 +0000 (09:15 +1100)]
doc: add Sydney University video, fix hlint warnings

R=r, r2, rsc, uriel
CC=golang-dev
https://golang.org/cl/2433042

14 years agonetchan: export before import when testing.
Roger Peppe [Tue, 12 Oct 2010 22:05:53 +0000 (15:05 -0700)]
netchan: export before import when testing.
Fixes some race conditions.

R=r
CC=golang-dev
https://golang.org/cl/2456041

14 years ago6l: work with OS X nm/otool
Jim McGrath [Tue, 12 Oct 2010 20:52:17 +0000 (16:52 -0400)]
6l: work with OS X nm/otool

6l was skipping emitting the (2 byte) symbol table if there were no imported or exported
symbols. You can't just drop the symbol table entirely - the linker dies if you have
a linkedit section but no table. You can omit the linkedit section or both the linkedit
and the dlyd parts in the right circumstances, but that seems much more risky to me.

R=rsc
CC=golang-dev
https://golang.org/cl/2421042

14 years agolog: new interface
Rob Pike [Tue, 12 Oct 2010 19:59:18 +0000 (12:59 -0700)]
log: new interface

New logging interface simplifies and generalizes.

1) Loggers now have only one output.
2) log.Stdout, Stderr, Crash and friends are gone.
Logging is now always to standard error by default.
3) log.Panic* replaces log.Crash*.
4) Exiting and panicking are not part of the logger's state; instead
the functions Exit* and Panic* simply call Exit or panic after
printing.
5) There is now one 'standard logger'.  Instead of calling Stderr,
use Print etc.  There are now triples, by analogy with fmt:
Print, Println, Printf
What was log.Stderr is now best represented by log.Println,
since there are now separate Print and Println functions
(and methods).
6) New functions SetOutput, SetFlags, and SetPrefix allow global
editing of the standard logger's properties.   This is new
functionality. For instance, one can call
log.SetFlags(log.Lshortfile|log.Ltime|log.Lmicroseconds)
to get all logging output to show file name, line number, and
time stamp.

In short, for most purposes
log.Stderr -> log.Println or log.Print
log.Stderrf -> log.Printf
log.Crash -> log.Panicln or log.Panic
log.Crashf -> log.Panicf
log.Exit -> log.Exitln or log.Exit
log.Exitf -> log.Exitf (no change)

This has a slight breakage: since loggers now write only to one
output, existing calls to log.New() need to delete the second argument.
Also, custom loggers with exit or panic properties will need to be
reworked.

All package code updated to new interface.

The test has been reworked somewhat.

The old interface will be removed after the new release.
For now, its elements are marked 'deprecated' in their comments.

Fixes #1184.

R=rsc
CC=golang-dev
https://golang.org/cl/2419042

14 years agoarm: fix syscall build again
Russ Cox [Tue, 12 Oct 2010 19:16:47 +0000 (15:16 -0400)]
arm: fix syscall build again

R=ken2
CC=golang-dev
https://golang.org/cl/2465041

14 years agoarm: regenerate ztypes_linux_arm.go (fix build)
Russ Cox [Tue, 12 Oct 2010 14:24:55 +0000 (10:24 -0400)]
arm: regenerate ztypes_linux_arm.go (fix build)

R=adg
CC=golang-dev
https://golang.org/cl/2404043

14 years agosyscall: add sockaddr_ll support for linux/386, linux/amd64
Mikio Hara [Tue, 12 Oct 2010 13:48:56 +0000 (09:48 -0400)]
syscall: add sockaddr_ll support for linux/386, linux/amd64

R=rsc, albert.strasheim
CC=golang-dev
https://golang.org/cl/2356042

14 years agosyscall: implement WaitStatus and Wait4() for windows
Wei Guangjing [Tue, 12 Oct 2010 04:42:07 +0000 (15:42 +1100)]
syscall: implement WaitStatus and Wait4() for windows

R=brainman, rsc, kardia, Joe Poirier
CC=golang-dev
https://golang.org/cl/1910041

14 years agoarm: fix build
Russ Cox [Tue, 12 Oct 2010 03:58:51 +0000 (23:58 -0400)]
arm: fix build

Effectively reverts https://code.google.com/p/go/source/detail?r=8c52477401ad
Should make ARM build pass again, but untested.
Probably still bugs involving reflect.call somewhere.

R=ken2
CC=golang-dev
https://golang.org/cl/2416042

14 years agoimage: another build fix regarding ColorImage.
Nigel Tao [Tue, 12 Oct 2010 03:33:37 +0000 (14:33 +1100)]
image: another build fix regarding ColorImage.

R=adg
TBR=adg
CC=golang-dev
https://golang.org/cl/2449041

14 years agoexp/draw: unbreak build.
Nigel Tao [Tue, 12 Oct 2010 03:05:50 +0000 (14:05 +1100)]
exp/draw: unbreak build.

R=adg
CC=golang-dev
https://golang.org/cl/2448041

14 years agoimage: add image.Tiled type, the Go equivalent of Plan9's repl bit.
Nigel Tao [Tue, 12 Oct 2010 02:44:11 +0000 (13:44 +1100)]
image: add image.Tiled type, the Go equivalent of Plan9's repl bit.
Make ColorImage methods' receiver type be a pointer.

R=r, rsc
CC=golang-dev
https://golang.org/cl/2345043

14 years agoMake.cmd: remove $(OFILES)
Eric Clark [Tue, 12 Oct 2010 02:39:37 +0000 (22:39 -0400)]
Make.cmd: remove $(OFILES)

The linker doesn't support multiple object files (maybe it did in the past?)

R=rsc
CC=golang-dev
https://golang.org/cl/2444041

14 years agoexp/iterable: delete
Russ Cox [Tue, 12 Oct 2010 02:38:42 +0000 (22:38 -0400)]
exp/iterable: delete

Package iterable has outlived its utility.

It is an interesting demonstration, but it encourages
people to use iteration over channels where simple
iteration over array indices or a linked list would be
cheaper, simpler, and have fewer races.

R=dsymonds, r
CC=golang-dev
https://golang.org/cl/2436041

14 years agobuild: fix darwin/386 build
Andrew Gerrand [Tue, 12 Oct 2010 00:49:05 +0000 (11:49 +1100)]
build: fix darwin/386 build

R=rsc
CC=golang-dev
https://golang.org/cl/2443041

14 years agold: be less picky about bad line number info
Russ Cox [Mon, 11 Oct 2010 20:21:03 +0000 (16:21 -0400)]
ld: be less picky about bad line number info

Fixes #1175.

R=lvd
CC=golang-dev
https://golang.org/cl/2439041

14 years agonew command gotry.
Rob Pike [Mon, 11 Oct 2010 19:40:13 +0000 (12:40 -0700)]
new command gotry.
An exercise in reflection and an unusual tool.

From the usage message:

usage: gotry [packagedirectory] expression ...
Given one expression, gotry attempts to evaluate that expression.
Given multiple expressions, gotry treats them as a list of arguments
and result values and attempts to find a function in the package
that, given the first few expressions as arguments, evaluates to
the remaining expressions as results.  If the first expression has
methods, it will also search for applicable methods.

If there are multiple expressions, a package directory must be
specified. If there is a package argument, the expressions are
evaluated in an environment that includes
import . "packagedirectory"

Examples:
gotry 3+4
# evaluates to 7
gotry strings '"abc"' '"c"' 7-5
# finds strings.Index etc.
gotry regexp 'MustCompile("^[0-9]+")' '"12345"' true
# finds Regexp.MatchString

R=rsc, PeterGo, r2
CC=golang-dev
https://golang.org/cl/2352043

14 years agonetchan: zero out request to ensure correct gob decoding.
Roger Peppe [Mon, 11 Oct 2010 19:36:16 +0000 (12:36 -0700)]
netchan: zero out request to ensure correct gob decoding.
Gob decoding does not overwrite fields which are zero
in the encoder.
Fixes #1174.

R=r, r2
CC=golang-dev
https://golang.org/cl/2337044

14 years ago6l: correct offset for __nl_symbol_ptr in Mach-O.
Jim McGrath [Mon, 11 Oct 2010 18:45:01 +0000 (14:45 -0400)]
6l: correct offset for __nl_symbol_ptr in Mach-O.

Fixes malformed object message from nm etc.
Fixes #1180.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/2390042

14 years ago6l: fix Mach-O LC_RPATH
Jim McGrath [Mon, 11 Oct 2010 18:39:41 +0000 (14:39 -0400)]
6l: fix Mach-O LC_RPATH

Fixes #1177.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/2387042

14 years agoA+C: Jim McGrath (individual CLA)
Russ Cox [Mon, 11 Oct 2010 18:32:25 +0000 (14:32 -0400)]
A+C: Jim McGrath (individual CLA)

R=r, r2
CC=golang-dev
https://golang.org/cl/2438041

14 years agoexpvar: add (*Int).Set
Sam Thorogood [Mon, 11 Oct 2010 17:14:07 +0000 (13:14 -0400)]
expvar: add (*Int).Set

R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/2336044

14 years agoCONTRIBUTORS: link sam.thorogood@gmail.com for code review
Russ Cox [Mon, 11 Oct 2010 17:13:57 +0000 (13:13 -0400)]
CONTRIBUTORS: link sam.thorogood@gmail.com for code review

R=Sam
CC=golang-dev
https://golang.org/cl/2437041

14 years ago crypto/tls: make SetReadTimeout work.
Adam Langley [Mon, 11 Oct 2010 14:41:01 +0000 (10:41 -0400)]
crypto/tls: make SetReadTimeout work.

        Fixes #1181.

R=rsc, agl1, cw, r2
CC=golang-dev
https://golang.org/cl/2414041

14 years ago crypto/tls: better error messages for certificate issues.
Adam Langley [Mon, 11 Oct 2010 14:39:56 +0000 (10:39 -0400)]
crypto/tls: better error messages for certificate issues.

        Fixes #1146.

R=rsc, agl1
CC=golang-dev
https://golang.org/cl/2380042

14 years agotime: add After
Andrew Gerrand [Mon, 11 Oct 2010 02:45:26 +0000 (13:45 +1100)]
time: add After

Permits one to easily put a timeout in a select:

select {
case <-ch:
// foo
case <-time.After(1e6):
// bar
}

R=r, rog, rsc, sameer1, PeterGo, iant, nigeltao_gnome
CC=golang-dev
https://golang.org/cl/2321043

14 years agoexp/draw/x11: support X11 vendors other than "The X.Org Foundation".
Nigel Tao [Sat, 9 Oct 2010 00:22:14 +0000 (11:22 +1100)]
exp/draw/x11: support X11 vendors other than "The X.Org Foundation".

R=adg, ehog.hedge
CC=golang-dev
https://golang.org/cl/2385041

14 years agobug in stack size in arm.
Ken Thompson [Fri, 8 Oct 2010 23:46:05 +0000 (16:46 -0700)]
bug in stack size in arm.
stack is off by one if calling
through reflect.Call

R=rsc
CC=golang-dev
https://golang.org/cl/2400041

14 years agobuild: add GOHOSTOS and GOHOSTARCH environment variables.
Andrew Gerrand [Fri, 8 Oct 2010 07:52:28 +0000 (18:52 +1100)]
build: add GOHOSTOS and GOHOSTARCH environment variables.

Auto-detect both if not set, and if GOARCH is not set use GOHOSTARCH.

GOHOSTARCH is used to set the -m32 or -m64 flags for gcc.

This is so that 64-bit can build binaries that run on 32-bit systems.

R=rsc, iant, brainman
CC=golang-dev
https://golang.org/cl/2342045

14 years agobig: fix panic and round correctly in Rat.FloatString
Anthony Martin [Thu, 7 Oct 2010 14:10:48 +0000 (16:10 +0200)]
big: fix panic and round correctly in Rat.FloatString

R=gri, rsc
CC=golang-dev
https://golang.org/cl/2212044

14 years ago5l, 8l: dregs
Russ Cox [Thu, 7 Oct 2010 11:51:37 +0000 (07:51 -0400)]
5l, 8l: dregs

R=ken2
CC=golang-dev
https://golang.org/cl/2390041

14 years agoruntime: fix tiny build
Russ Cox [Thu, 7 Oct 2010 10:46:01 +0000 (06:46 -0400)]
runtime: fix tiny build

Reported by Jeff Allen.

R=r, r2
CC=golang-dev
https://golang.org/cl/2385042

14 years agonet: allow _ in names
Russ Cox [Thu, 7 Oct 2010 10:45:50 +0000 (06:45 -0400)]
net: allow _ in names

Enables lookup of _jabber._tcp.gmail.com's SRV record.

Fixes #1167.

R=r, r2
CC=golang-dev
https://golang.org/cl/2353043

14 years agoruntime: fix argument dump in traceback
Russ Cox [Thu, 7 Oct 2010 10:45:40 +0000 (06:45 -0400)]
runtime: fix argument dump in traceback

Was printing words at SP instead of at FP
after shuffle due to nascent flag.

R=r, r2
CC=golang-dev
https://golang.org/cl/2316044

14 years agogc: maybe the code is only mostly dead
Russ Cox [Thu, 7 Oct 2010 10:36:39 +0000 (06:36 -0400)]
gc: maybe the code is only mostly dead

R=ken2
CC=golang-dev
https://golang.org/cl/2346044

14 years ago[568]a: precise linenumbers for statements.
Luuk van Dijk [Thu, 7 Oct 2010 09:13:06 +0000 (11:13 +0200)]
[568]a: precise linenumbers for statements.

R=rsc, ken2, r, rsc1
CC=golang-dev
https://golang.org/cl/2297042

14 years agolife: fix for new slice rules
Graham Miller [Thu, 7 Oct 2010 08:52:13 +0000 (04:52 -0400)]
life: fix for new slice rules

R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/2341049

14 years agogc: better error for method non-call
Russ Cox [Thu, 7 Oct 2010 08:42:44 +0000 (04:42 -0400)]
gc: better error for method non-call

was
x.go:7: must call (&b).*Buffer·Write

now
x.go:7: method b.Write is not an expression, must be called

Fixes #1171.

R=ken2
CC=golang-dev
https://golang.org/cl/2384042

14 years agogc: elide dead code
Russ Cox [Thu, 7 Oct 2010 08:42:26 +0000 (04:42 -0400)]
gc: elide dead code

R=ken2
CC=golang-dev
https://golang.org/cl/2365044

14 years agogc: fix error for 1 <- "foo"
Russ Cox [Thu, 7 Oct 2010 07:33:42 +0000 (03:33 -0400)]
gc: fix error for 1 <- "foo"

was
x.go:4: invalid operation: 1 <- "foo" (send to receive-only type int)

now
x.go:4: invalid operation: 1 <- "foo" (send to non-chan type int)

R=ken2
CC=golang-dev
https://golang.org/cl/2330042

14 years agoruntime: faster strequal, memequal
Graham Miller [Thu, 7 Oct 2010 07:13:24 +0000 (03:13 -0400)]
runtime: faster strequal, memequal

Fixes #1161.

R=rsc, cwvh
CC=golang-dev
https://golang.org/cl/2317044

14 years agoA+C: Graham Miller (individual CLA)
Russ Cox [Thu, 7 Oct 2010 07:07:35 +0000 (03:07 -0400)]
A+C: Graham Miller (individual CLA)

R=gmiller, adg
CC=golang-dev
https://golang.org/cl/2362043

14 years agocodereview: disallow submit of *.[chys] files indented with spaces
Russ Cox [Wed, 6 Oct 2010 22:10:23 +0000 (18:10 -0400)]
codereview: disallow submit of *.[chys] files indented with spaces

R=r
CC=golang-dev
https://golang.org/cl/2383041

14 years agoplayground.html: filesystem is not a word.
Rob Pike [Wed, 6 Oct 2010 21:56:13 +0000 (23:56 +0200)]
playground.html: filesystem is not a word.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/2370043

14 years agonet: comment pedantry
Russ Cox [Wed, 6 Oct 2010 15:54:53 +0000 (11:54 -0400)]
net: comment pedantry

Fixes #1167.

R=r, r2
CC=golang-dev
https://golang.org/cl/2290044

14 years agoruntime: correct iteration of large map values
Russ Cox [Wed, 6 Oct 2010 15:54:41 +0000 (11:54 -0400)]
runtime: correct iteration of large map values

The hash_next_and_deref was a dreg from a
previous large value scheme.

Fixes #1163.

R=r, r2
CC=golang-dev
https://golang.org/cl/2369043

14 years agobuild: disable archive/zip for nacl (fix build)
Russ Cox [Wed, 6 Oct 2010 15:25:40 +0000 (11:25 -0400)]
build: disable archive/zip for nacl (fix build)

TBR=adg
CC=golang-dev
https://golang.org/cl/2290045

14 years agogc: ... bug
Russ Cox [Wed, 6 Oct 2010 15:12:30 +0000 (11:12 -0400)]
gc: ... bug

Fixes #1165.

R=ken2
CC=golang-dev
https://golang.org/cl/2339042

14 years agogc: O(1) string comparison when lengths differ
Russ Cox [Wed, 6 Oct 2010 13:53:12 +0000 (09:53 -0400)]
gc: O(1) string comparison when lengths differ

R=ken2
CC=golang-dev
https://golang.org/cl/2331045

14 years agold: share asmlc
Russ Cox [Wed, 6 Oct 2010 13:52:54 +0000 (09:52 -0400)]
ld: share asmlc

R=ken2
CC=golang-dev
https://golang.org/cl/2373043

14 years agohttp: return the correct error if a header line is too long.
Stephen Ma [Wed, 6 Oct 2010 11:04:18 +0000 (22:04 +1100)]
http: return the correct error if a header line is too long.

R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/2372042

14 years agonet: fix comment
Mikio Hara [Wed, 6 Oct 2010 10:47:25 +0000 (21:47 +1100)]
net: fix comment

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/2358041

14 years agosyscall: add ucred structure for SCM_CREDENTIALS over UNIX sockets.
Albert Strasheim [Wed, 6 Oct 2010 10:32:31 +0000 (21:32 +1100)]
syscall: add ucred structure for SCM_CREDENTIALS over UNIX sockets.

Working on issue 1101.

R=golang-dev, rsc, adg
CC=golang-dev
https://golang.org/cl/2338042

14 years agoA+C: Albert Strasheim
Andrew Gerrand [Wed, 6 Oct 2010 10:30:34 +0000 (21:30 +1100)]
A+C: Albert Strasheim

R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/2336042

14 years agobufio: minor documentation fix.
Stephen Ma [Wed, 6 Oct 2010 08:39:30 +0000 (19:39 +1100)]
bufio: minor documentation fix.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/2301045

14 years ago6g: set kind to KindUnsafePointer where appropriate in reflect structures.
Luuk van Dijk [Tue, 5 Oct 2010 19:17:16 +0000 (21:17 +0200)]
6g: set kind to KindUnsafePointer where appropriate in reflect structures.

R=rsc, ken2, r
CC=golang-dev
https://golang.org/cl/2355043

14 years agowebsocket: enable tests on windows
Alex Brainman [Tue, 5 Oct 2010 00:02:15 +0000 (11:02 +1100)]
websocket: enable tests on windows

Fixes #1110.

R=golang-dev, adg
CC=Joe Poirier, golang-dev
https://golang.org/cl/2367041

14 years agofmt: allow %d on []byte
Rob Pike [Mon, 4 Oct 2010 09:57:48 +0000 (11:57 +0200)]
fmt: allow %d on []byte
Fixes #1159.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/2305043

14 years agoos: make tests work on windows
Alex Brainman [Mon, 4 Oct 2010 06:31:49 +0000 (17:31 +1100)]
os: make tests work on windows

Fixes #1105.

R=golang-dev, r
CC=Joe Poirier, golang-dev
https://golang.org/cl/2343043

14 years agoadd _testmain.go to .hgignore
Alex Brainman [Mon, 4 Oct 2010 03:56:44 +0000 (14:56 +1100)]
add _testmain.go to .hgignore

R=rsc, r2
CC=golang-dev
https://golang.org/cl/2332042

14 years agogc: various bugs
Russ Cox [Sun, 3 Oct 2010 15:50:44 +0000 (11:50 -0400)]
gc: various bugs

Fixes #1016.
Fixes #1152.
Fixes #1153.

R=ken2
CC=golang-dev
https://golang.org/cl/2344042

14 years agoMake.pkg: remove .so before installing new one
Russ Cox [Fri, 1 Oct 2010 20:02:18 +0000 (16:02 -0400)]
Make.pkg: remove .so before installing new one

On Linux, overwriting an mmap'ed file causes
all the MAP_PRIVATE pages to get refreshed
with the new content, even ones that have been
modified by the process that did the mmap.

One specific instance of this is that after the
dynamic linker has relocated a page from a .so,
overwriting the .so will un-relocate it, making
the next use of one of the no-longer-relocated
addresses incorrect and probably crash the
program.

Linux must go out of its way to break programs
in this way: the pages have already been copied
on write, so they're not shared with the file system
cache, and it trashes them anyway.  The manual
says the behavior when the file gets overwritten
is "undefined".  Removing before copy avoids the
undefined behavior.

R=iant
CC=golang-dev, msolo
https://golang.org/cl/2333045

14 years agoarm: enable 9 more package tests
Russ Cox [Fri, 1 Oct 2010 04:18:07 +0000 (00:18 -0400)]
arm: enable 9 more package tests

R=ken2
CC=golang-dev
https://golang.org/cl/2345041

14 years agoUse Errorf where appropriate.
Andrew Gerrand [Fri, 1 Oct 2010 04:14:18 +0000 (14:14 +1000)]
Use Errorf where appropriate.

R=r, r2
CC=golang-dev
https://golang.org/cl/2308043

14 years agofmt: add Errorf helper function
Andrew Gerrand [Fri, 1 Oct 2010 04:04:55 +0000 (14:04 +1000)]
fmt: add Errorf helper function

This crops up in a lot of places.
It's just a one-liner, but doesn't add any dependancies.
Seems worth it.

R=r, r2
CC=golang-dev
https://golang.org/cl/2344041

14 years agocode gen error for
Ken Thompson [Fri, 1 Oct 2010 01:02:38 +0000 (18:02 -0700)]
code gen error for
lv += f()
fixes asn1 and maybe more

R=rsc
CC=golang-dev
https://golang.org/cl/2341042

14 years agogc: bug308
Russ Cox [Thu, 30 Sep 2010 19:05:01 +0000 (15:05 -0400)]
gc: bug308

confused by using isddd for both ONAME and OCALL

Fixes #1136.

R=ken2
CC=golang-dev
https://golang.org/cl/2314043