summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-06-15fmt.Scan: fix %c in the case where the input does not implement ReadRune itself.Rob Pike2-29/+100
While we're at it, clean up and test the code to guarantee we see every byte when the text is erroneous UTF-8. Fixes issue 866. R=rsc CC=golang-dev http://codereview.appspot.com/1712042
2010-06-15bytes.Buffer.ReadFrom: fix bug.Rob Pike1-1/+1
Fixes issue 852. R=rsc CC=golang-dev http://codereview.appspot.com/1680042
2010-06-14Effective Go: update ... discussion.Rob Pike1-11/+28
R=rsc CC=golang-dev http://codereview.appspot.com/1698041 Committer: Rob Pike <r@golang.org>
2010-06-14runtime: correct fault for 16-bit divide on LeopardRuss Cox4-14/+10
R=r CC=golang-dev http://codereview.appspot.com/1703041
2010-06-14fmt.Printf: write tests for %T.Rob Pike2-1/+7
Fix a bug that caused it to ignore field widths. R=rsc CC=golang-dev http://codereview.appspot.com/1704041
2010-06-14fmt.Print*: reimplement to switch on type first.Rob Pike6-626/+457
This shortens, simplifies and regularizes the code significantly. (Improvements to reflect could make another step.) Passes all.bash. One semantic change occurs: The String() method changes behavior. It used to run only for string formats such as %s and %q. Instead, it now runs whenever the item has the method and the result is then processed by the format as a string. Besides the regularization, this has three effects: 1) width is honored for String() items 2) %x works for String() items 3) implementations of String that merely recur will recur forever Regarding point 3, example from the updated documentation: type X int func (x X) String() string { return Sprintf("%d", x) } should cast the value before recurring: func (x X) String() string { return Sprintf("%d", int(x)) } R=rsc CC=golang-dev http://codereview.appspot.com/1613045
2010-06-15html: sync testdata/webkit to match WebKit tip.Nigel Tao1-0/+44
R=rsc CC=golang-dev http://codereview.appspot.com/1701041
2010-06-14Add test for division by zero.Rob Pike2-0/+180
It fails with 6g. Once 6g is fixed up I will extend the value tests. R=rsc, iant CC=golang-dev http://codereview.appspot.com/1677043
2010-06-14Add IndexFunc and LastIndexFunc.Roger Peppe2-36/+187
Change TrimRight and TrimLeft to use these functions. Incidentally fix minor bug in TrimRight. Add some test cases for this. YMMV whether it's worth saving the closure allocation. R=r, r2 CC=golang-dev, hoisie, rsc http://codereview.appspot.com/1198044 Committer: Rob Pike <r@golang.org>
2010-06-14tutorial: update discussion of variadic functionsRob Pike2-15/+25
R=rsc CC=golang-dev http://codereview.appspot.com/1677042
2010-06-14gc: no more ...Russ Cox17-838/+497
various cleanup, deleting unused code R=ken2 CC=golang-dev http://codereview.appspot.com/1663041
2010-06-14remove uses of ... from tree, add one testRuss Cox9-47/+54
R=r CC=golang-dev http://codereview.appspot.com/1662041
2010-06-14exp/draw: small draw.drawGlyphOver optimization.Nigel Tao1-10/+11
Make dpix variable names consistent. R=rsc CC=golang-dev http://codereview.appspot.com/1563041
2010-06-12spec: remove ... (keeping ...T)Russ Cox1-60/+21
R=gri, iant, ken2, r, r2 CC=golang-dev http://codereview.appspot.com/1632041
2010-06-12gc: less aggressive name binding, for better line numbers in errorsRuss Cox9-82/+155
Cleans up a few other corner cases too. R=ken2 CC=golang-dev http://codereview.appspot.com/1592045
2010-06-12runtime: fix 386 signal handler bugRuss Cox2-15/+35
Cannot assume that g == m->curg at time of signal. Must save actual g and restore. Fixes flaky crashes with messages like throw: malloc mlookup throw: malloc/free - deadlock throw: unwindstack on self throw: free mlookup (and probably others) when running cgo. R=iant CC=golang-dev http://codereview.appspot.com/1648043
2010-06-12gopack: add S flag to force marking a package as safeRuss Cox2-4/+16
R=r CC=golang-dev http://codereview.appspot.com/1597044
2010-06-11spec: clarify that result parameters are always zeroed before the function ↵Rob Pike1-2/+5
executes. R=golang-dev CC=golang-dev http://codereview.appspot.com/1641043
2010-06-118l: correct test for sp == top of stack in 8l -K codeRuss Cox1-1/+1
R=ken2 CC=golang-dev http://codereview.appspot.com/1627042
2010-06-11gopack: simplify go metadata codeRuss Cox1-314/+36
There's only one Go object file per package now, so there's no need to parse the metadata and merge metadata from multiple files. Just save the original and use it as __.PKGDEF verbatim. R=r CC=golang-dev http://codereview.appspot.com/1647042
2010-06-11gc: change -u to require imports to be marked safeRuss Cox5-3/+22
R=ken2 CC=golang-dev http://codereview.appspot.com/1597043
2010-06-11Pad Go symbol table out to page boundary when linking dynamically.Ian Lance Taylor3-7/+11
This avoids a crash when using cgo where glibc's malloc thinks that it can use some of the memory following the symbol table. This fails because the symbol table is mapped read-only, which affects the whole page. R=rsc CC=golang-dev http://codereview.appspot.com/1616042
2010-06-11runtime: switch to OS stack during Windows syscallAlex Brainman5-56/+163
R=rsc CC=golang-dev http://codereview.appspot.com/1381041 Committer: Russ Cox <rsc@golang.org>
2010-06-11runtime: free lock handles on WindowsAlex Brainman1-0/+2
R=rsc CC=golang-dev http://codereview.appspot.com/1652041 Committer: Russ Cox <rsc@golang.org>
2010-06-10test: check that surrogate pair runes and huge rune values are rejectedRuss Cox1-0/+25
R=r CC=golang-dev http://codereview.appspot.com/1615042
2010-06-09.hgignore: ignore doc/htmlgenPaolo Giarrusso1-0/+1
R=golang-dev, rsc CC=golang-dev http://codereview.appspot.com/1555042 Committer: Russ Cox <rsc@golang.org>
2010-06-09codereview: avoid exception in matchPaolo Giarrusso1-1/+2
R=rsc CC=golang-dev http://codereview.appspot.com/1585041 Committer: Russ Cox <rsc@golang.org>
2010-06-09A+C: James Whitehead and Paolo Giarrusso (both individual CLA)Russ Cox2-0/+4
R=r CC=golang-dev http://codereview.appspot.com/1649041
2010-06-09add path.Base, analogous to Unix basenameRob Pike2-0/+45
R=rsc CC=golang-dev http://codereview.appspot.com/1633042
2010-06-09asn1: allow '*' in PrintableString.Adam Langley2-1/+6
Although technically incorrect, we want this in order to parse X.509 certificates where a wildcard hostname ("*.example.com") has been put into a PrintableString. Fixes issue 850. R=rsc CC=golang-dev http://codereview.appspot.com/1615043
2010-06-09bug286: test caseRobert Griesemer2-0/+101
R=r CC=golang-dev http://codereview.appspot.com/1644042
2010-06-09exp/eval test: fix buildRobert Griesemer1-3/+3
R=r CC=golang-dev http://codereview.appspot.com/1599043
2010-06-09go/scanner: report illegal escape sequencesRobert Griesemer2-21/+30
R=golang-dev, r CC=golang-dev http://codereview.appspot.com/1636043
2010-06-09release.2010-06-09 tagAndrew Gerrand0-0/+0
R=rsc CC=golang-dev http://codereview.appspot.com/1626043
2010-06-09release.2010-06-09Andrew Gerrand1-0/+47
R=rsc CC=golang-dev http://codereview.appspot.com/1644041
2010-06-09gc: more cleanupRuss Cox6-40/+120
* disallow surrogate pair runes. * diagnose impossible type assertions * eliminate another static buffer. * do not overflow lexbuf. * add -u flag to disable package unsafe. R=ken2 CC=golang-dev http://codereview.appspot.com/1619042
2010-06-08fix build: invalid character literalsRuss Cox1-6/+6
R=r CC=golang-dev http://codereview.appspot.com/1631041
2010-06-08gc: new typechecking rulesRuss Cox29-1330/+1469
* Code for assignment, conversions now mirrors spec. * Changed some snprint -> smprint. * Renamed runtime functions to separate interface conversions from type assertions: convT2I, assertI2T, etc. * Correct checking of \U sequences. Fixes issue 840. Fixes issue 830. Fixes issue 778. R=ken2 CC=golang-dev http://codereview.appspot.com/1303042
2010-06-08misc cleanup: gofmt + &x -> x[0:] conversionRuss Cox10-141/+149
R=gri CC=golang-dev http://codereview.appspot.com/1620042
2010-06-08go/printer: deleted dead codeRobert Griesemer2-23/+14
(remains of the semicolon conversion) R=rsc CC=golang-dev http://codereview.appspot.com/1623041
2010-06-08gofmt: update test script so it can run to completion againRobert Griesemer1-1/+2
R=rsc CC=golang-dev http://codereview.appspot.com/1621041
2010-06-08go/parser: correct position of empty statement ';'Robert Griesemer3-10/+9
(caused certain files to not be idempotent under gofmt) - corrected golden files for go/printer - slightly simplified some code in nodes.go (no impact on formatting) - these changes have no impact on gofmt output of .go files under src, misc fallthrough statement considered harmful! R=rsc CC=golang-dev http://codereview.appspot.com/1593042
2010-06-08fix buildRuss Cox2-21/+22
R=gri CC=golang-dev http://codereview.appspot.com/1616041
2010-06-08doc: add Google I/O talk and programsRuss Cox6-0/+722
R=r CC=golang-dev http://codereview.appspot.com/1614041
2010-06-08bug284: make conversion legal, fix error patternsRuss Cox1-6/+10
R=gri CC=golang-dev http://codereview.appspot.com/1612041
2010-06-08bug285: delete invalid map assignmentRuss Cox1-3/+1
*T2 implements I2, but T2 does not. R=gri CC=golang-dev http://codereview.appspot.com/1613041
2010-06-07gc: better error message when ~ operator is foundRobert Griesemer1-1/+1
Fixes issue 844. R=ken2, rsc, ken3 CC=golang-dev http://codereview.appspot.com/1593041
2010-06-07gc: backslash newline is not a legal escape sequence in stringsRobert Griesemer1-4/+0
Fixes issue 827. R=ken2 CC=golang-dev, rsc http://codereview.appspot.com/1592041
2010-06-07go spec: rename "assignment compatible" -> "assignable"Robert Griesemer1-27/+25
R=r, rsc CC=golang-dev http://codereview.appspot.com/1590041
2010-06-08http: add Head function for making HTTP HEAD requestsAndrew Gerrand2-1/+23
R=rsc CC=golang-dev http://codereview.appspot.com/1581041