Commit Graph

10324 Commits

Author SHA1 Message Date
Andrew Balholm
ddc5ec642d 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
2011-11-10 08:09:54 +11:00
Rémy Oudompheng
23ffbe611d 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
2011-11-09 16:01:55 -05:00
Michał Derkacz
17105870ff 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
2011-11-09 16:01:17 -05:00
Michał Derkacz
c8a2be8c38 6l: Fixes opcode for PSLLQ imm8, xmm_reg
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5340056
2011-11-09 16:00:24 -05:00
Russ Cox
7be2a7d95f A+C: Michał Derkacz (individual CLA)
R=golang-dev
CC=golang-dev
https://golang.org/cl/5375046
2011-11-09 16:00:17 -05:00
Russ Cox
5524b646e5 A+C: Rémy Oudompheng (individual CLA)
R=golang-dev
CC=golang-dev
https://golang.org/cl/5376045
2011-11-09 15:59:57 -05:00
Charles L. Dorian
300b443ade 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
2011-11-09 15:44:49 -05:00
Russ Cox
3b860269ee 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
2011-11-09 15:17:05 -05:00
Dmitriy Vyukov
fbfed49134 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
2011-11-09 23:11:48 +03:00
Russ Cox
98321731f2 doc: htmlescape weekly notes
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5370046
2011-11-09 13:52:02 -05:00
Rob Pike
e99f68f064 builtin: document delete
Fixes #2434.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5370045
2011-11-09 10:49:41 -08:00
Russ Cox
7a6a9755a9 regexp: fix doc comment
Fixes #2432.

R=r, r
CC=golang-dev
https://golang.org/cl/5376041
2011-11-09 13:46:54 -05:00
Lucio De Re
74f61fc656 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
2011-11-09 13:24:36 -05:00
Russ Cox
1eadb89ee1 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
2011-11-09 12:36:51 -05:00
Russ Cox
ae7a003cf9 gc: add GOEXPERIMENT=reorg
This won't last long but may ease conversions.

R=ken2
CC=golang-dev
https://golang.org/cl/5375043
2011-11-09 12:35:45 -05:00
Luuk van Dijk
924ea515cf gc: better error for non-calling use of unsafe builtins.
Fixes #1951

R=rsc
CC=golang-dev
https://golang.org/cl/5372041
2011-11-09 18:30:54 +01:00
Brad Fitzpatrick
21f5057639 http: add a disabled failing test for Issue 2357
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5372044
2011-11-09 08:12:26 -08:00
Luuk van Dijk
d5a5855ba1 gc: Preserve original blank name for .anon substitution on out params.
Fixes #1802.

R=rsc
CC=golang-dev
https://golang.org/cl/5364043
2011-11-09 11:27:27 +01:00
Luuk van Dijk
151b2f1509 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
2011-11-09 11:17:06 +01:00
Luuk van Dijk
13e92e4d75 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
2011-11-09 10:58:53 +01:00
Andrew Balholm
820523d091 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
2011-11-09 19:18:26 +11:00
David Symonds
929070ee62 net/http: use t.Errorf from alternate goroutine in test.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5348051
2011-11-09 16:11:47 +11:00
David Symonds
9c6a73e478 net/http: fix sniffing when using ReadFrom.
R=golang-dev, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5362046
2011-11-09 15:48:05 +11:00
David Symonds
e5373c01f8 doc: fix anchor ID in weekly.html.
R=adg, rsc
CC=golang-dev
https://golang.org/cl/5359055
2011-11-09 15:43:21 +11:00
Andrew Gerrand
bad305c27b 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
2011-11-09 14:55:52 +11:00
Ian Lance Taylor
4ac425fcdd runtime: add comments for various functions in proc.c
R=rsc
CC=golang-dev
https://golang.org/cl/5357047
2011-11-08 18:16:25 -08:00
Rob Pike
8649444002 FAQ: update
R=bradfitz, r, dsymonds, edsrzf, rsc
CC=golang-dev
https://golang.org/cl/5345055
2011-11-08 16:26:03 -08:00
Andrew Gerrand
520f9dea13 fix .hgtags
R=golang-dev
CC=golang-dev
https://golang.org/cl/5346049
2011-11-09 11:22:25 +11:00
Andrew Gerrand
bb818622f7 tag weekly.2011-11-09
R=r
CC=golang-dev
https://golang.org/cl/5341051
2011-11-09 11:17:39 +11:00
Andrew Gerrand
d83cc435e4 weekly.2011-11-09
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5344055
2011-11-09 10:57:09 +11:00
Rob Pike
f9489bed72 renaming_4: gofix -r everything/but/src/pkg
R=rsc
CC=golang-dev
https://golang.org/cl/5338043
2011-11-08 15:43:02 -08:00
Rob Pike
45e3bcb343 renaming_3: gofix -r go1pkgrename src/pkg/[m-z]*
R=rsc
CC=golang-dev
https://golang.org/cl/5345045
2011-11-08 15:41:54 -08:00
Rob Pike
30aa701fec renaming_2: gofix -r go1pkgrename src/pkg/[a-l]*
R=rsc
CC=golang-dev
https://golang.org/cl/5358041
2011-11-08 15:40:58 -08:00
Rob Pike
6ab6c49fce 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
2011-11-08 15:38:47 -08:00
Rob Pike
e50479ca88 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
2011-11-08 15:34:23 -08:00
Andrew Gerrand
816f12285c tag weekly.2011-11-08
R=r
CC=golang-dev
https://golang.org/cl/5364050
2011-11-09 10:29:16 +11:00
Andrew Gerrand
4b39d115a0 weekly.2011-11-08
R=r
CC=golang-dev
https://golang.org/cl/5351049
2011-11-09 10:27:22 +11:00
Andrew Balholm
ce4eec2e0a 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
2011-11-09 09:43:55 +11:00
Rob Pike
3e94e757ef 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
2011-11-08 14:33:07 -08:00
Joel Sing
0e5cd9d3f6 runtime: add timespec definition for freebsd
R=golang-dev, devon.odell
CC=golang-dev
https://golang.org/cl/5340058
2011-11-08 11:43:58 -05:00
Anthony Martin
cabe0e6ad3 os, syscall: fix Plan 9 build
R=rsc
CC=golang-dev
https://golang.org/cl/5330067
2011-11-08 09:06:02 -05:00
Andrew Balholm
f2b602ed42 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
2011-11-08 17:55:17 +11:00
Alex Brainman
b776b9e724 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
2011-11-08 16:53:31 +11:00
Andrew Gerrand
2fcb045242 gotest: don't run examples that have no expected output
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5364041
2011-11-08 10:11:07 +11:00
Nigel Tao
46ee09eff1 html: fix typo in package docs.
Fixes #2419.

R=dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5352046
2011-11-08 10:09:17 +11:00
Mikio Hara
2d89db65c0 net: fix build comment
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5353045
2011-11-08 06:56:35 +09:00
Luuk van Dijk
087bec3dcd 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
2011-11-07 21:35:13 +01:00
Russ Cox
dfe03bb204 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
2011-11-07 14:44:06 -05:00
Russ Cox
2547ad6b01 lib9: fix windows build
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5362045
2011-11-07 14:16:00 -05:00
Russ Cox
3f4a91d778 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
2011-11-07 13:15:16 -05:00