]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agogodoc: fix remote search (use correct URL)
Robert Griesemer [Sat, 12 Nov 2011 00:59:47 +0000 (16:59 -0800)]
godoc: fix remote search (use correct URL)

Also works now together with -html, as in:
godoc -html -q Sin
for an html result.

Fixes #2435.

R=iant
CC=golang-dev
https://golang.org/cl/5375074

13 years agoruntime: remove declarations of nonexistent functions
Ian Lance Taylor [Fri, 11 Nov 2011 22:30:27 +0000 (14:30 -0800)]
runtime: remove declarations of nonexistent functions

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

13 years agogofmt: leave nil nodes of the AST unchanged.
Rémy Oudompheng [Fri, 11 Nov 2011 22:11:30 +0000 (14:11 -0800)]
gofmt: leave nil nodes of the AST unchanged.

Without this check, gofmt panics when trying to apply
the identity transformation on "item.field" expressions.
Fixes #2410.

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

13 years agogc: remove m[k] = x, false
Russ Cox [Fri, 11 Nov 2011 21:48:25 +0000 (16:48 -0500)]
gc: remove m[k] = x, false

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

13 years agobuild: fix check for selinux's allow_execstack on Fedora 16
Bobby Powers [Fri, 11 Nov 2011 21:41:37 +0000 (16:41 -0500)]
build: fix check for selinux's allow_execstack on Fedora 16

Fedora 16 mounts selinux at /sys/fs/selinux, instead of the
traditional /selinux.  Check both locations for the selinux
filesystem in make.bash

Fixes #2448.

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

13 years ago6a, 8a: allow $(-1) for consistency with $1, $(1), $-1.
Russ Cox [Fri, 11 Nov 2011 19:56:49 +0000 (14:56 -0500)]
6a, 8a: allow $(-1) for consistency with $1, $(1), $-1.

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

13 years agoenv.bash: Check for presence of make/gmake
Scott Lawrence [Fri, 11 Nov 2011 19:56:18 +0000 (14:56 -0500)]
env.bash: Check for presence of make/gmake

Without this, a missing gmake will result in bogus error "Did not find
Go environment variables".

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

13 years agonet, io/ioutil: remove use of os.Time
Anthony Martin [Fri, 11 Nov 2011 19:40:41 +0000 (14:40 -0500)]
net, io/ioutil: remove use of os.Time

I had to replace the single use of io/ioutil
in the time package with a bytes.Buffer since
there would've been a dependency cycle.

There are no other uses of os.Time.

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

13 years agold: fix .bss for ldpe.
Wei Guangjing [Fri, 11 Nov 2011 19:40:24 +0000 (14:40 -0500)]
ld: fix .bss for ldpe.

Fixes #2409.

R=mattn.jp, rsc, alex.brainman
CC=golang-dev
https://golang.org/cl/5334046

13 years agoexp/terminal: rename shell to terminal and add SetSize
Adam Langley [Fri, 11 Nov 2011 19:04:33 +0000 (14:04 -0500)]
exp/terminal: rename shell to terminal and add SetSize

It was never really a shell, but the name carried
over from SSH's ServerShell.

Two small functional changes:

Add SetSize, which allows the size of the terminal
to be changed in response, say, to an SSH message.

Don't write the prompt if there's already something
on the current line.

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

13 years agosyscall: fix zerrors for openbsd 386
Joel Sing [Fri, 11 Nov 2011 18:19:09 +0000 (05:19 +1100)]
syscall: fix zerrors for openbsd 386

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

13 years agoexp/terminal: rename terminal.go to util.go
Adam Langley [Fri, 11 Nov 2011 16:18:45 +0000 (11:18 -0500)]
exp/terminal: rename terminal.go to util.go

(This is part of removing the duplicate code between exp/terminal and
exp/ssh, but hg is having a very hard time keeping up so I'm doing it
in small steps.)

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

13 years agosyscall: regenerate z-files for freebsd, openbsd
Mikio Hara [Fri, 11 Nov 2011 15:22:22 +0000 (00:22 +0900)]
syscall: regenerate z-files for freebsd, openbsd

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

13 years agohtml: ignore <col> tag outside tables
Andrew Balholm [Fri, 11 Nov 2011 10:44:01 +0000 (21:44 +1100)]
html: ignore <col> tag outside tables

Pass tests1.dat, test 109:
<table><col><tbody><col><tr><col><td><col></table><col>

| <html>
|   <head>
|   <body>
|     <table>
|       <colgroup>
|         <col>
|       <tbody>
|       <colgroup>
|         <col>
|       <tbody>
|         <tr>
|       <colgroup>
|         <col>
|       <tbody>
|         <tr>
|           <td>
|       <colgroup>
|         <col>

Also pass test 110:
<table><colgroup><tbody><colgroup><tr><colgroup><td><colgroup></table><colgroup>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5369069

13 years agohtml: parse column groups
Andrew Balholm [Fri, 11 Nov 2011 00:41:46 +0000 (11:41 +1100)]
html: parse column groups

Pass tests1.dat, test 108:
<table><colgroup><col><colgroup><col><col><col><colgroup><col><col><thead><tr><td></table>

| <html>
|   <head>
|   <body>
|     <table>
|       <colgroup>
|         <col>
|       <colgroup>
|         <col>
|         <col>
|         <col>
|       <colgroup>
|         <col>
|         <col>
|       <thead>
|         <tr>
|           <td>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5369061

13 years agoruntime, syscall: convert from godefs to cgo
Russ Cox [Fri, 11 Nov 2011 00:08:28 +0000 (19:08 -0500)]
runtime, syscall: convert from godefs to cgo

R=golang-dev, mikioh.mikioh, r
CC=golang-dev
https://golang.org/cl/5348052

13 years agogodefs: delete, replaced by cgo -godefs
Russ Cox [Fri, 11 Nov 2011 00:08:04 +0000 (19:08 -0500)]
godefs: delete, replaced by cgo -godefs

Godefs was a C program that ran gcc and then parsed the
stabs debugging information in the resulting object file to
generate C or Go code for bootstrapping as part of
package runtime or package syscall.

Cgo does the same work, but using the dwarf debugging
information.  Add -godefs and -cdefs options to cgo that
mimic godefs's output, albeit with different input
(a Go program, not a C program).

This has been a "nice to have" for a while but was forced
by Apple removing stabs debugging output from their
latest compilers.

Fixes #835.
Fixes #2338.

R=golang-dev, bradfitz, r, dave, iant
CC=golang-dev
https://golang.org/cl/5367043

13 years agotutorial: describe unidirectional channels
Rob Pike [Thu, 10 Nov 2011 22:02:14 +0000 (14:02 -0800)]
tutorial: describe unidirectional channels

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

13 years agotime: add ISOWeek method to Time
Volker Dobler [Thu, 10 Nov 2011 20:40:50 +0000 (12:40 -0800)]
time: add ISOWeek method to Time

As the ISO 8601 week number is untrivial to compute a new method
on *Time provides year and number of week.

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

13 years agotesting: add file:line stamps to messages.
Rob Pike [Thu, 10 Nov 2011 19:59:50 +0000 (11:59 -0800)]
testing: add file:line stamps to messages.

A single-line error looks like this:
--- FAIL: foo_test.TestFoo (0.00 seconds)
        foo_test.go:123: Foo(8) = "10" want "100"

A multi-line error looks like this:
--- FAIL: foo_test.TestFoo (0.00 seconds)
        foo_test.go:456: Foo(88) = "100"
                want "1000"

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

13 years agoruntime: fix semasleep() duration for openbsd
Joel Sing [Thu, 10 Nov 2011 19:42:01 +0000 (11:42 -0800)]
runtime: fix semasleep() duration for openbsd

The timespec passed to thrsleep() needs to be an absolute/realtime
value, so add the current nanotime to ns.

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

13 years agomath/big: Correcting typo in SetBit() documentation
David G. Andersen [Thu, 10 Nov 2011 19:41:24 +0000 (14:41 -0500)]
math/big: Correcting typo in SetBit() documentation

z is set to x+bit change, not z+bit change

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

13 years agohtml: parse framesets
Andrew Balholm [Thu, 10 Nov 2011 12:56:13 +0000 (23:56 +1100)]
html: parse framesets

Pass tests1.dat, test 106:
<frameset><frame><frameset><frame></frameset><noframes></noframes></frameset>

| <html>
|   <head>
|   <frameset>
|     <frame>
|     <frameset>
|       <frame>
|     <noframes>

Also pass test 107:
<h1><table><td><h3></table><h3></h1>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5373050

13 years agoruntime: fix freebsd build
Mikio Hara [Thu, 10 Nov 2011 01:02:24 +0000 (10:02 +0900)]
runtime: fix freebsd build

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

13 years agoeffective_go: a little more about comma ok and type assertion
Rob Pike [Thu, 10 Nov 2011 00:14:18 +0000 (16:14 -0800)]
effective_go: a little more about comma ok and type assertion
Fixes #2416.

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

13 years agomisc/windows: Go for Windows installer in MSI format
Joe Poirier [Wed, 9 Nov 2011 23:20:34 +0000 (17:20 -0600)]
misc/windows: Go for Windows installer in MSI format

Requesting suggestions for the comment and description strings in installer.wxs.
Fixes #2394.

R=rsc, alex.brainman, tjyang2001
CC=golang-dev
https://golang.org/cl/5339046

13 years agoeffective_go: fix up the description of cipher blocks and streams
Rob Pike [Wed, 9 Nov 2011 22:40:49 +0000 (14:40 -0800)]
effective_go: fix up the description of cipher blocks and streams

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

13 years agocrypto: update incorrect references to Cipher interface; should be Block.
Rob Pike [Wed, 9 Nov 2011 22:22:44 +0000 (14:22 -0800)]
crypto: update incorrect references to Cipher interface; should be Block.

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

13 years agoos/exec: Fix documentation references to os.DevNull
Scott Lawrence [Wed, 9 Nov 2011 21:50:13 +0000 (13:50 -0800)]
os/exec: Fix documentation references to os.DevNull

R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5372049

13 years agoFAQ: rearrange and expand the discussion of testing
Rob Pike [Wed, 9 Nov 2011 21:19:23 +0000 (13:19 -0800)]
FAQ: rearrange and expand the discussion of testing

R=gri, r, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5369052

13 years agohtml: don't emit text token for empty raw text elements.
Andrew Balholm [Wed, 9 Nov 2011 21:09:54 +0000 (08:09 +1100)]
html: don't emit text token for empty raw text elements.

Pass tests1.dat, test 99:
<script></script></div><title></title><p><p>

| <html>
|   <head>
|     <script>
|     <title>
|   <body>
|     <p>
|     <p>

Also pass tests through test 105:
<ul><li><ul></li><li>a</li></ul></li></ul>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5373043

13 years agocgo: print error instead of panic on undeclared enums/structs
Rémy Oudompheng [Wed, 9 Nov 2011 21:01:55 +0000 (16:01 -0500)]
cgo: print error instead of panic on undeclared enums/structs

Types are left as nil if no DWARF information is found and
checking in the rewriting pass so that appropriate errors
with line numbers can be printed.
Fixes #2408.

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

13 years ago6l: add MOVQ xmm_reg, xmm_reg
Michał Derkacz [Wed, 9 Nov 2011 21:01:17 +0000 (16:01 -0500)]
6l: add MOVQ xmm_reg, xmm_reg

Added handler for:
        MOVQ xmm_reg, xmm_reg/mem64
        MOVQ xmm_reg/mem64, xmm_reg
using native MOVQ (it take precedence above REX.W MOVD)
I don't understood 6l code enough to be sure that my small changes
didn't broke it. But now 6l works with MOVQ xmm_reg, xmm_reg and
all.bash reports "0 unexpected bugs".

There is test assembly source:
MOVQ    X0, X1
MOVQ    AX, X1
MOVQ    X1, AX
MOVQ    xxx+8(FP), X2
MOVQ    X2, xxx+8(FP)

and generated code (gdb disassemble /r):

0x000000000040f112 <+0>:   f3 0f 7e c8        movq  %xmm0,%xmm1
0x000000000040f116 <+4>:   66 48 0f 6e c8     movq  %rax,%xmm1
0x000000000040f11b <+9>:   66 48 0f 7e c8     movq  %xmm1,%rax
0x000000000040f120 <+14>:  f3 0f 7e 54 24 10  movq  0x10(%rsp),%xmm2
0x000000000040f126 <+20>:  66 0f d6 54 24 10  movq  %xmm2,0x10(%rsp)

Fixes #2418.

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

13 years ago6l: Fixes opcode for PSLLQ imm8, xmm_reg
Michał Derkacz [Wed, 9 Nov 2011 21:00:24 +0000 (16:00 -0500)]
6l: Fixes opcode for PSLLQ imm8, xmm_reg

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

13 years agoA+C: Michał Derkacz (individual CLA)
Russ Cox [Wed, 9 Nov 2011 21:00:17 +0000 (16:00 -0500)]
A+C: Michał Derkacz (individual CLA)

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

13 years agoA+C: Rémy Oudompheng (individual CLA)
Russ Cox [Wed, 9 Nov 2011 20:59:57 +0000 (15:59 -0500)]
A+C: Rémy Oudompheng (individual CLA)

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

13 years agomath: faster Lgamma
Charles L. Dorian [Wed, 9 Nov 2011 20:44:49 +0000 (15:44 -0500)]
math: faster Lgamma

Converting from polynomial constants to counted array speeds up Lgamma from 51.3 to 37.7 ns/op. Variables renamed in Gamma to avoid overlap in Lgamma.

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

13 years agoruntime: add timer support, use for package time
Russ Cox [Wed, 9 Nov 2011 20:17:05 +0000 (15:17 -0500)]
runtime: add timer support, use for package time

This looks like it is just moving some code from
time to runtime (and translating it to C), but the
runtime can do a better job managing the goroutines,
and it needs this functionality for its own maintenance
(for example, for the garbage collector to hand back
unused memory to the OS on a time delay).
Might as well have just one copy of the timer logic,
and runtime can't depend on time, so vice versa.

It also unifies Sleep, NewTicker, and NewTimer behind
one mechanism, so that there are no claims that one
is more efficient than another.  (For example, today
people recommend using time.After instead of time.Sleep
to avoid blocking an OS thread.)

Fixes #1644.
Fixes #1731.
Fixes #2190.

R=golang-dev, r, hectorchu, iant, iant, jsing, alex.brainman, dvyukov
CC=golang-dev
https://golang.org/cl/5334051

13 years agocgo: fix g0 stack guard
Dmitriy Vyukov [Wed, 9 Nov 2011 20:11:48 +0000 (23:11 +0300)]
cgo: fix g0 stack guard
Fixes crash when cgo consumes more than 8K
of stack and makes a callback.

Fixes #1328.

R=golang-dev, rogpeppe, rsc
CC=golang-dev, mpimenov
https://golang.org/cl/5371042

13 years agodoc: htmlescape weekly notes
Russ Cox [Wed, 9 Nov 2011 18:52:02 +0000 (13:52 -0500)]
doc: htmlescape weekly notes

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

13 years agobuiltin: document delete
Rob Pike [Wed, 9 Nov 2011 18:49:41 +0000 (10:49 -0800)]
builtin: document delete
Fixes #2434.

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

13 years agoregexp: fix doc comment
Russ Cox [Wed, 9 Nov 2011 18:46:54 +0000 (13:46 -0500)]
regexp: fix doc comment

Fixes #2432.

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

13 years agogopack: fixes for Plan 9 build
Lucio De Re [Wed, 9 Nov 2011 18:24:36 +0000 (13:24 -0500)]
gopack: fixes for Plan 9 build

. removed an unnexessary initialisation.
. replaced 0 with 0L to match print format that in turn matched
  the type of the original function return value.

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

13 years agoundo CL 5375043 / ea8b178f9b73
Russ Cox [Wed, 9 Nov 2011 17:36:51 +0000 (12:36 -0500)]
undo CL 5375043 / ea8b178f9b73

Never lasts long.

««« original CL description
gc: add GOEXPERIMENT=reorg

This won't last long but may ease conversions.

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

R=ken2, ken
CC=golang-dev
https://golang.org/cl/5370043

13 years agogc: add GOEXPERIMENT=reorg
Russ Cox [Wed, 9 Nov 2011 17:35:45 +0000 (12:35 -0500)]
gc: add GOEXPERIMENT=reorg

This won't last long but may ease conversions.

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

13 years agogc: better error for non-calling use of unsafe builtins.
Luuk van Dijk [Wed, 9 Nov 2011 17:30:54 +0000 (18:30 +0100)]
gc: better error for non-calling use of unsafe builtins.

Fixes #1951

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

13 years agohttp: add a disabled failing test for Issue 2357
Brad Fitzpatrick [Wed, 9 Nov 2011 16:12:26 +0000 (08:12 -0800)]
http: add a disabled failing test for Issue 2357

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

13 years agogc: Preserve original blank name for .anon substitution on out params.
Luuk van Dijk [Wed, 9 Nov 2011 10:27:27 +0000 (11:27 +0100)]
gc: Preserve original blank name for .anon substitution on out params.

Fixes #1802.

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

13 years agogc: Fail on implicit assigment to non-exported fields in copy and append.
Luuk van Dijk [Wed, 9 Nov 2011 10:17:06 +0000 (11:17 +0100)]
gc: Fail on implicit assigment to non-exported fields in copy and append.

Fixes #1387.

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

13 years agogc: Better typechecks and errors in switches.
Luuk van Dijk [Wed, 9 Nov 2011 09:58:53 +0000 (10:58 +0100)]
gc: Better typechecks and errors in switches.

Allow any type in switch on interface value.
Statically check typeswitch early.

Fixes #2423.
Fixes #2424.

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

13 years agohtml: correctly parse </html> in <head> element.
Andrew Balholm [Wed, 9 Nov 2011 08:18:26 +0000 (19:18 +1100)]
html: correctly parse </html> in <head> element.

Pass tests1.dat, test 92:
<head></html><meta><p>

| <html>
|   <head>
|   <body>
|     <meta>
|     <p>

Also pass tests through test 98:
<p><b><div><marquee></p></b></div>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5359054

13 years agonet/http: use t.Errorf from alternate goroutine in test.
David Symonds [Wed, 9 Nov 2011 05:11:47 +0000 (16:11 +1100)]
net/http: use t.Errorf from alternate goroutine in test.

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

13 years agonet/http: fix sniffing when using ReadFrom.
David Symonds [Wed, 9 Nov 2011 04:48:05 +0000 (15:48 +1100)]
net/http: fix sniffing when using ReadFrom.

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

13 years agodoc: fix anchor ID in weekly.html.
David Symonds [Wed, 9 Nov 2011 04:43:21 +0000 (15:43 +1100)]
doc: fix anchor ID in weekly.html.

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

13 years agohttp: make httputil's chunked reader/writer code a direct copy
Andrew Gerrand [Wed, 9 Nov 2011 03:55:52 +0000 (14:55 +1100)]
http: make httputil's chunked reader/writer code a direct copy

Arrange the code so that it's easier to keep edits in sync.

R=golang-dev, mikioh.mikioh, bradfitz, andybalholm, rsc
CC=golang-dev
https://golang.org/cl/5345041

13 years agoruntime: add comments for various functions in proc.c
Ian Lance Taylor [Wed, 9 Nov 2011 02:16:25 +0000 (18:16 -0800)]
runtime: add comments for various functions in proc.c

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

13 years agoFAQ: update
Rob Pike [Wed, 9 Nov 2011 00:26:03 +0000 (16:26 -0800)]
FAQ: update

R=bradfitz, r, dsymonds, edsrzf, rsc
CC=golang-dev
https://golang.org/cl/5345055

13 years agofix .hgtags
Andrew Gerrand [Wed, 9 Nov 2011 00:22:25 +0000 (11:22 +1100)]
fix .hgtags

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

13 years agotag weekly.2011-11-09
Andrew Gerrand [Wed, 9 Nov 2011 00:17:39 +0000 (11:17 +1100)]
tag weekly.2011-11-09

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

13 years agoweekly.2011-11-09 weekly.2011-11-09
Andrew Gerrand [Tue, 8 Nov 2011 23:57:09 +0000 (10:57 +1100)]
weekly.2011-11-09

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

13 years agorenaming_4: gofix -r everything/but/src/pkg
Rob Pike [Tue, 8 Nov 2011 23:43:02 +0000 (15:43 -0800)]
renaming_4: gofix -r everything/but/src/pkg

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

13 years agorenaming_3: gofix -r go1pkgrename src/pkg/[m-z]*
Rob Pike [Tue, 8 Nov 2011 23:41:54 +0000 (15:41 -0800)]
renaming_3: gofix -r go1pkgrename src/pkg/[m-z]*

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

13 years agorenaming_2: gofix -r go1pkgrename src/pkg/[a-l]*
Rob Pike [Tue, 8 Nov 2011 23:40:58 +0000 (15:40 -0800)]
renaming_2: gofix -r go1pkgrename src/pkg/[a-l]*

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

13 years agorenaming_1: hand-edited files for go 1 renaming
Rob Pike [Tue, 8 Nov 2011 23:38:47 +0000 (15:38 -0800)]
renaming_1: hand-edited files for go 1 renaming
This contains the files that required handiwork, mostly
Makefiles with updated TARGs, plus the two packages
with modified package names.
html/template/doc.go needs a separate edit pass.
test/fixedbugs/bug358.go is not legal go so gofix fails on it.

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

13 years agogofix: add go1pkgrename
Rob Pike [Tue, 8 Nov 2011 23:34:23 +0000 (15:34 -0800)]
gofix: add go1pkgrename
This will do the package import renamings for Go 1.

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

13 years agotag weekly.2011-11-08
Andrew Gerrand [Tue, 8 Nov 2011 23:29:16 +0000 (10:29 +1100)]
tag weekly.2011-11-08

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

13 years agoweekly.2011-11-08 weekly.2011-11-08
Andrew Gerrand [Tue, 8 Nov 2011 23:27:22 +0000 (10:27 +1100)]
weekly.2011-11-08

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

13 years agohtml: treat <image> as <img>
Andrew Balholm [Tue, 8 Nov 2011 22:43:55 +0000 (09:43 +1100)]
html: treat <image> as <img>

Pass tests1.dat, test 90:
<p><image></p>

| <html>
|   <head>
|   <body>
|     <p>
|       <img>

Also pass test 91:
<a><table><a></table><p><a><div><a>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5339052

13 years agotext/template: make redefinition of a template in a set more consistent.
Rob Pike [Tue, 8 Nov 2011 22:33:07 +0000 (14:33 -0800)]
text/template: make redefinition of a template in a set more consistent.
Also make it agree with the documentation. You get an error, unless you're
calling Add explicitly, in which case it panics since that's almost certainly
a bug. The discrepancy was caused by a panic that wasn't turned into
an error along one path; deleted the offending function for clarity.

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

13 years agoruntime: add timespec definition for freebsd
Joel Sing [Tue, 8 Nov 2011 16:43:58 +0000 (11:43 -0500)]
runtime: add timespec definition for freebsd

R=golang-dev, devon.odell
CC=golang-dev
https://golang.org/cl/5340058

13 years agoos, syscall: fix Plan 9 build
Anthony Martin [Tue, 8 Nov 2011 14:06:02 +0000 (09:06 -0500)]
os, syscall: fix Plan 9 build

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

13 years agohtml: parse <body>, <base>, <link>, <meta>, and <title> tags inside page body
Andrew Balholm [Tue, 8 Nov 2011 06:55:17 +0000 (17:55 +1100)]
html: parse <body>, <base>, <link>, <meta>, and <title> tags inside page body

Pass tests1.dat, test 87:
<body><body><base><link><meta><title><p></title><body><p></body>

| <html>
|   <head>
|   <body>
|     <base>
|     <link>
|     <meta>
|     <title>
|       "<p>"
|     <p>

Handling the last <body> tag requires correcting the original insertion mode in useTheRulesFor.

Also pass test 88:
<textarea><p></textarea>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5364047

13 years agoruntime: add windows callback tests
Alex Brainman [Tue, 8 Nov 2011 05:53:31 +0000 (16:53 +1100)]
runtime: add windows callback tests

Just a copy of cgo callback tests from misc/cgo/test.

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

13 years agogotest: don't run examples that have no expected output
Andrew Gerrand [Mon, 7 Nov 2011 23:11:07 +0000 (10:11 +1100)]
gotest: don't run examples that have no expected output

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

13 years agohtml: fix typo in package docs.
Nigel Tao [Mon, 7 Nov 2011 23:09:17 +0000 (10:09 +1100)]
html: fix typo in package docs.

Fixes #2419.

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

13 years agonet: fix build comment
Mikio Hara [Mon, 7 Nov 2011 21:56:35 +0000 (06:56 +0900)]
net: fix build comment

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

13 years agogc: Clean up dostruct/stotype, detect broken fields and propagate up to structs and...
Luuk van Dijk [Mon, 7 Nov 2011 20:35:13 +0000 (21:35 +0100)]
gc: Clean up dostruct/stotype, detect broken fields and propagate up to structs and functions to supress spurious errors.

Fixes #1556.

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

13 years agogo/ast: fix bugs in SortImports
Russ Cox [Mon, 7 Nov 2011 19:44:06 +0000 (14:44 -0500)]
go/ast: fix bugs in SortImports

Tests are in gofix, since the bugs arise in rewritten ASTs.

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

13 years agolib9: fix windows build
Russ Cox [Mon, 7 Nov 2011 19:16:00 +0000 (14:16 -0500)]
lib9: fix windows build

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

13 years agolib9: add ctime
Russ Cox [Mon, 7 Nov 2011 18:15:16 +0000 (13:15 -0500)]
lib9: add ctime

ctime differs across Unix vs Plan 9 so add to portability library

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

13 years agoruntime/cgo: fix data declaration to be extern
Russ Cox [Mon, 7 Nov 2011 18:15:06 +0000 (13:15 -0500)]
runtime/cgo: fix data declaration to be extern

Otherwise some OS X toolchains complain about the redeclaration
of libcgo_thread_start by multiple object files.  The real definition
is in util.c.

Fixes #2167.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5364045

13 years agoexp/ssh: improved client authentication support
Dave Cheney [Mon, 7 Nov 2011 17:37:05 +0000 (12:37 -0500)]
exp/ssh: improved client authentication support

This CL adds an API for handling the various SSH
authenticaton methods. None and password continue
to be the only supported methods.

R=bradfitz, agl, n13m3y3r, rsc, cw
CC=golang-dev
https://golang.org/cl/5328045

13 years agoruntime: fix prototype for openbsd thrsleep
Joel Sing [Mon, 7 Nov 2011 16:57:34 +0000 (11:57 -0500)]
runtime: fix prototype for openbsd thrsleep

- Fix function prototype for thrsleep().
- Provide enums for clock identifiers.
- Provide timespec structure for use with thrsleep().

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

13 years agogc: use HEADER_IO macro from gopack
Ron Minnich [Mon, 7 Nov 2011 16:42:13 +0000 (11:42 -0500)]
gc: use HEADER_IO macro from gopack

Use HEADER_IO macro from gopack to read archive header
The HEADER_IO macro portably reads archive headers. The
current arsize code fails in the case of archive headers produced
on plan 9 6c and read on other systems (it's not portable).
Modify lex.c to use the portable macro
Build tested (including tests) on OSX.

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

13 years agogc: format nits
Lucio De Re [Mon, 7 Nov 2011 16:42:08 +0000 (11:42 -0500)]
gc: format nits

src/cmd/gc/bits.c: corrected a mistaken format;
src/cmd/gc/go.h: %E can accept uints.

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

13 years agoCONTRIBUTORS: add David Crawshaw's codereview account
Russ Cox [Mon, 7 Nov 2011 16:18:38 +0000 (11:18 -0500)]
CONTRIBUTORS: add David Crawshaw's codereview account

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

13 years agoxml: allow parsing of <_> </_>.
David Crawshaw [Mon, 7 Nov 2011 15:47:44 +0000 (10:47 -0500)]
xml: allow parsing of <_> </_>.

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

13 years agoarchive/zip: actually close file opened with OpenReader.
Dmitry Chestnykh [Mon, 7 Nov 2011 05:33:53 +0000 (16:33 +1100)]
archive/zip: actually close file opened with OpenReader.

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

13 years agonet/http: fix whitespace handling in sniffer.
David Symonds [Mon, 7 Nov 2011 00:55:33 +0000 (11:55 +1100)]
net/http: fix whitespace handling in sniffer.

A single character typo ("\n" instead of "\r") meant that
HTML data using DOS line breaks (CRLF) was not detected as HTML.

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

13 years agoruntime: windows_386 sighandler to use correct g
Alex Brainman [Mon, 7 Nov 2011 00:00:14 +0000 (11:00 +1100)]
runtime: windows_386 sighandler to use correct g

Fixes #2403.

R=hectorchu
CC=golang-dev
https://golang.org/cl/5309071

13 years agohtml: be able to test more than one testdata file.
Nigel Tao [Sun, 6 Nov 2011 22:38:40 +0000 (09:38 +1100)]
html: be able to test more than one testdata file.

R=andybalholm
CC=golang-dev
https://golang.org/cl/5351041

13 years agogc: Better error message for range over non-receive channel.
Luuk van Dijk [Sun, 6 Nov 2011 21:14:15 +0000 (22:14 +0100)]
gc: Better error message for range over non-receive channel.

Fixes #2354

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

13 years agogc: Switch related errors should use plain format.
Luuk van Dijk [Sun, 6 Nov 2011 21:13:54 +0000 (22:13 +0100)]
gc: Switch related errors should use plain format.

Fixes #2422.

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

13 years agomath: faster Gamma
Charles L. Dorian [Sat, 5 Nov 2011 19:25:36 +0000 (12:25 -0700)]
math: faster Gamma

Having the compiler count the number of array elements speeds up Gamma from 63.7 to 56.6 ns/op.

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

13 years agogofix: avoid panic on body-less functions in netudpgroup.
David Symonds [Sat, 5 Nov 2011 00:28:23 +0000 (11:28 +1100)]
gofix: avoid panic on body-less functions in netudpgroup.

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

13 years agotest: make closedchan.go exit with failure if something fails
Ian Lance Taylor [Fri, 4 Nov 2011 21:12:35 +0000 (14:12 -0700)]
test: make closedchan.go exit with failure if something fails

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

13 years agomath: improved high-angle test for Cos, Sin and Tan
Charles L. Dorian [Fri, 4 Nov 2011 19:35:59 +0000 (15:35 -0400)]
math: improved high-angle test for Cos, Sin and Tan

Maximum error for 386 is "close" (1e-14). For amd64, it's "veryclose" (4e-16).

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

13 years agogoinstall: allow packages from launchpad.net/~user branches.
Jani Monoses [Fri, 4 Nov 2011 19:07:34 +0000 (15:07 -0400)]
goinstall: allow packages from launchpad.net/~user branches.

The permitted filename characters should include ~ to allow
the names of user-owned branches in Launchpad.

R=golang-dev, rsc, n13m3y3r, gustavo
CC=golang-dev, gustavo.niemeyer
https://golang.org/cl/5280052

13 years agoCONTRIBUTORS: add Rietveld address for Jani Monoses
Gustavo Niemeyer [Fri, 4 Nov 2011 19:05:32 +0000 (15:05 -0400)]
CONTRIBUTORS: add Rietveld address for Jani Monoses

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

13 years agohtml/template: wraps package template instead of exposing func Escape
Mike Samuel [Fri, 4 Nov 2011 17:09:21 +0000 (13:09 -0400)]
html/template: wraps package template instead of exposing func Escape

This does escaping on first execution.

template.go defines the same interface elements as package template.
It requires rather more duplication of code than I'd like, but I'm
not clear how to avoid that.

Maybe instead of

    mySet.ParseGlob(...)
    template.ParseSetGlob(...)
    mySet.ParseFiles(...)
    mySet.ParseTemplateFiles(...)
    template.ParseTemplateFiles(...)

we combine these into a fileset abstraction that can be wrapped

    var fileset template.FileSet
    fileset.Glob(...)  // Load a few files by glob
    fileset.Files(...)  // Load a few {{define}}d files
    fileset.TemplateFiles(...)  // Load a few files as template bodies
    fileset.Funcs(...)  // Make the givens func available to templates
    // Do the parsing.
    set, err := fileset.ParseSet()
    // or set, err := fileset.ParseInto(set)

or provide an interface that can receive filenames and functions and
parse messages:

    type Bundle interface {
      TemplateFile(string)
      File(string)
      Funcs(FuncMap)
    }

and define template.Parse* to handle the file-system stuff and send
messages to a bundle:

    func ParseFiles(b Bundle, filenames ...string)

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