summaryrefslogtreecommitdiff
path: root/src/cmd
AgeCommit message (Collapse)AuthorFilesLines
2009-12-03gc: recursive type errorRuss Cox2-0/+5
Fixes issue 245. R=ken2 http://codereview.appspot.com/164094
2009-12-03gc: better diagnosis of initialization loopsRuss Cox5-8/+67
Fixes bug 292. R=ken2 http://codereview.appspot.com/164093
2009-12-03gc: minor import grammar bug fixesRuss Cox1-8/+27
Fixes issue 364. R=ken2 http://codereview.appspot.com/164092
2009-12-02gc: function argument ordering bugRuss Cox1-5/+5
Fixes issue 370. R=ken2 http://codereview.appspot.com/163097
2009-12-02gc: make 'invalid rune in string' a little less crypticRuss Cox1-1/+3
Fixes issue 371. R=ken2 http://codereview.appspot.com/164091
2009-12-02move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.Rob Pike5-17/+19
this breaks the dependency of package io on package bytes. R=rsc CC=golang-dev http://codereview.appspot.com/163085
2009-12-02updated documentation for gofmtRobert Griesemer1-0/+2
R=rsc http://codereview.appspot.com/164085
2009-12-028g: discard tempalloc/tempfree experimentRuss Cox7-141/+61
in favor of tempname. allows optimizer to do more. unfortunately, optimizer seems to be broken; disable it. R=ken2 http://codereview.appspot.com/163091
2009-12-026g etc: groundwork for eliminating redundant bounds checks.Russ Cox7-22/+34
drop check in range over array. drop check in [256]array indexed by byte. R=ken2 http://codereview.appspot.com/163088
2009-12-02Add flag -tabindent to gofmt: forces use ofRobert Griesemer1-13/+21
tabs for indentation even if -spaces is set. Changes to gofmt: - added -tabindent flag - don't recompute parser and printer mode repeatedly Changes to go/printer: - provide new printing mode TabIndent Changes to tabwriter: - implement new mode TabIndent to use tabs independent of the actual padding character for leading empty columns - distinguish between minimal cell width and tab width (tabwidth is only used if the output contains tabs, minwidth and padding are always considered) - fixed and added more comments - some additional factoring By default, -tabindent is disabled and the default gofmt behavior is unchanged. By setting -spaces and -tabindent, gofmt will use tabs for indentation but do any other alignment with spaces. This permits a user to change the visible indentation by simply changing the editor's tab width and the code will remain properly aligned without the need to rerun gofmt. R=rsc http://codereview.appspot.com/163068
2009-12-02gofmt: race condition in error reporting and setting exit codeFazlul Shahriar1-1/+4
How to reproduce: $ mkdir /tmp/foo $ cp /dev/null /tmp/foo/bar.go $ chmod -r /tmp/foo/bar.go $ gofmt /tmp/foo open /tmp/foo/bar.go: permission denied $ echo $? # should echo 2 0 $ Maybe you need to put a call to time.Sleep at the beginning of report(). R=gri CC=golang-dev http://codereview.appspot.com/164073 Committer: Robert Griesemer <gri@golang.org>
2009-12-018g: Match sgen definition to declarationEvan Shaw1-1/+1
R=rsc CC=golang-dev http://codereview.appspot.com/164069 Committer: Russ Cox <rsc@golang.org>
2009-12-01FreeBSD needs #!/usr/bin/env bash (fixes broken build on FreeBSD)Devon H. O'Dell1-1/+1
R=gri http://codereview.appspot.com/163067 Committer: Robert Griesemer <gri@golang.org>
2009-12-018g: fix 386 floating point stack bugCharles L. Dorian3-5/+10
Also fixes issue 310 comment 5 error. Fixes issue 310. R=rsc http://codereview.appspot.com/163042 Committer: Russ Cox <rsc@golang.org>
2009-12-01make test.sh work againRobert Griesemer1-5/+6
R=rsc http://codereview.appspot.com/164059
2009-12-01a couple of usage fixups in profRob Pike1-1/+7
R=rsc http://codereview.appspot.com/161050
2009-12-01gofmt: use os.Stdin instead of opening /dev/stdinFazlul Shahriar1-8/+18
Opening /dev/stdin can sometimes fail. For example, in the acme editor, executing "Edit ,|gofmt" fails with: open /dev/stdin: no such device or address Executing "Edit ,|ls -l /dev/stdin /proc/self/fd/0" gives: lrwxrwxrwx 1 root root 15 2009-09-07 02:17 /dev/stdin -> /proc/self/fd/0 lrwx------ 1 fhs users 64 2009-11-26 22:05 /proc/self/fd/0 -> socket:[5528230] (This is my first change, and I've signed the individual contributor license agreement.) R=rsc, gri CC=golang-dev http://codereview.appspot.com/162041 Committer: Robert Griesemer <gri@golang.org>
2009-12-01some godoc cleanup:Robert Griesemer2-99/+28
- simplified dealing with parse errors: no need to intersperse them in the source - improve visibility of highlighted identifiers by showing them in bold R=rsc http://codereview.appspot.com/163051
2009-11-29cgo: use C type void for opaque types if dwarf.Common().Type returns nothingEden Li1-0/+3
Ideally, the C name would come from the typedef or pointer that references the Size<0 type, but we can't easily generate this without performing a look-ahead to see if any referencing type will become opaque. Fixes issue 334. Fixes issue 281. R=rsc http://codereview.appspot.com/161056 Committer: Russ Cox <rsc@golang.org>
2009-11-24gc: correct type check for x, ok map assignmentRuss Cox1-1/+1
Fixes issue 288. R=ken2 http://codereview.appspot.com/157162
2009-11-24Change to container/vector interface:Robert Griesemer1-1/+1
- removed New(len int) in favor of new(Vector).Resize(len, cap) - removed Init(len int) in favor of Resize(len, cap) - runs all.bash Fixes issue 294. R=rsc, r, r1 http://codereview.appspot.com/157143
2009-11-24godoc: plug file descriptor leakRuss Cox1-0/+1
R=gri CC=r http://codereview.appspot.com/157149
2009-11-23 cgo translates empty function arguments into void instead of dying with ↵Eden Li1-0/+9
'unexpected type: ...'. Fixes issue 162. R=rsc http://codereview.appspot.com/157147 Committer: Russ Cox <rsc@golang.org>
2009-11-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia28-67/+67
the bash scripts and makefiles for building go didn't take into account the fact $GOROOT / $GOBIN could both be directories containing whitespaces, and was not possible to build it in such a situation. this commit adjusts the various makefiles/scripts to make it aware of that possibility, and now it builds successfully when using a path with whitespaces as well. Fixes issue 115. R=rsc, dsymonds1 http://codereview.appspot.com/157067 Committer: Russ Cox <rsc@golang.org>
2009-11-23cmd/cc: change getquoted() to accept whitespaces.Sergio Luis O. B. Correia1-1/+1
getquoted() currently checks for whitespaces and returns nil if it finds one. this prevents us from having go in a path containing whitespaces, as the #pragma dynld directives are processed through the said function. this commit makes getquoted() accept whitespaces, and this is also needed for solving issue #115. R=rsc http://codereview.appspot.com/157066 Committer: Russ Cox <rsc@golang.org>
2009-11-23gofmt -r: documentation and minor fixesRuss Cox2-16/+44
fix a few paren insertion bugs in the printer too. R=gri, r CC=golang-dev http://codereview.appspot.com/157119
2009-11-23two more if(h<0) that gcc 4.3 -O2 miscompilesRuss Cox1-2/+1
R=r http://codereview.appspot.com/160044
2009-11-238g: call throwindex for array out of boundsRuss Cox1-4/+2
R=ken2 http://codereview.appspot.com/160043
2009-11-20gofmt: add -r flag to rewrite source code according to patternRuss Cox3-2/+239
a little slow, but usable (speed unchanged when not using -r) tweak go/printer to handle nodes without line numbers more gracefully in a couple cases. R=gri http://codereview.appspot.com/156103
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox6-16/+16
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-20x[y:] for stringsRuss Cox4-5/+13
R=ken2 http://codereview.appspot.com/157114
2009-11-20x[lo:] - gc and runtime.Russ Cox11-91/+842
* add runtime sliceslice1 for x[lo:] * remove runtime arraytoslice, rewriting &arr into arr[0:len(arr)]. * port cgen_inline into 8g, 5g. * use native memmove in maps R=ken2 http://codereview.appspot.com/157106
2009-11-20cgo: allow .so in subdirectoriesRuss Cox1-1/+1
R=r http://codereview.appspot.com/157103
2009-11-19cgo now renders types with unknown size as [0]byte instead of raising aEden Li1-2/+5
fatal error. Fixes issue 126. R=rsc http://codereview.appspot.com/157101 Committer: Russ Cox <rsc@golang.org>
2009-11-19gc: reject large channel values at compile timeRuss Cox2-0/+13
Fixes issue 144. R=ken2 CC=agl1 http://codereview.appspot.com/156102
2009-11-19update test.sh for gofmtRobert Griesemer1-6/+3
R=rsc http://codereview.appspot.com/157096
2009-11-19Permit omission of hi bound in slices.Robert Griesemer1-0/+3
R=r, rsc http://codereview.appspot.com/157082
2009-11-19Adds benchmark support to gotest.Trevor Strohman2-4/+23
No benchmarks are run unless the --benchmarks=<regexp> flag is specified on the gotest command line. This change includes sample benchmarks for regexp. % gotest --benchmarks=.* (standard test output redacted) testing.BenchmarkSimpleMatch 200000 7799 ns/op testing.BenchmarkUngroupedMatch 20000 76898 ns/op testing.BenchmarkGroupedMatch 50000 38148 ns/op R=r, rsc http://codereview.appspot.com/154173 Committer: Russ Cox <rsc@golang.org>
2009-11-19put copy into goyaccKen Thompson1-40/+16
R=rsc http://codereview.appspot.com/156100
2009-11-18More FreeBSD-touchups. Thundercats are GOOOOO!Devon H. O'Dell2-10/+5
R=rsc CC=golang-dev http://codereview.appspot.com/157074 Committer: Russ Cox <rsc@golang.org>
2009-11-186l, 8l: add trivial hash table for dynamic symbolsRuss Cox2-36/+42
R=r http://codereview.appspot.com/156085
2009-11-18remove bytes.CopyRob Pike1-2/+1
replace all calls with calls to copy use copy in regexp and bytes.Buffer R=rsc CC=golang-dev http://codereview.appspot.com/157073
2009-11-18gc: allow implicit conversion of *[10]int -> []intRuss Cox1-2/+26
when used as arg to copy. R=ken2 http://codereview.appspot.com/157071
2009-11-18ld: move interpreter string into first block of ELF fileRuss Cox4-28/+51
necessary on freebsd. R=r, dho CC=golang-dev http://codereview.appspot.com/157069
2009-11-18slicecopy was always using 16 (sizeof slice) for the size instead of size of ↵Rob Pike1-1/+1
element. R=rsc CC=ken2, golang-dev http://codereview.appspot.com/156083
2009-11-18Mangle C struct fields that happen to be named after Go keywords by ↵Eden Li1-1/+30
prefixing them with _. Collisions with existing fields are resolved by prefixing the new Go identifier with _ until it matches nothing else in the struct. Fixes issue 36. R=rsc http://codereview.appspot.com/157061 Committer: Russ Cox <rsc@golang.org>
2009-11-17FreeBSD/i386 workDevon H. O'Dell3-4/+32
This patchset gets Go to pretty much the same state that FreeBSD/amd64 is in. R=rsc http://codereview.appspot.com/157055 Committer: Russ Cox <rsc@golang.org>
2009-11-17cgo no longer translates function args that are void* intoEden Li1-1/+5
unsafe.Pointer. Fixes issue 254. R=rsc http://codereview.appspot.com/157060 Committer: Russ Cox <rsc@golang.org>
2009-11-17allow copy to be used without a return valueKen Thompson1-8/+8
R=rsc http://codereview.appspot.com/156060
2009-11-17install copy predefinedKen Thompson8-1/+45
did not test 386, but should work shouldnt matter if copy is not used R=rsc http://codereview.appspot.com/156055