1
0
mirror of https://github.com/golang/go synced 2024-10-04 09:31:22 -06:00
Commit Graph

1381 Commits

Author SHA1 Message Date
Russ Cox
044ebae2f0 cgo: include line number information to keep go/printer happy
Fixes #443.

R=dho
CC=golang-dev
https://golang.org/cl/179095
2009-12-17 17:04:48 -08:00
Kai Backman
d85bb81878 first stub for softfloats, intercepts float instructions and skips
them in the stream.

R=rsc
https://golang.org/cl/174052
2009-12-17 16:08:42 -08:00
Robert Griesemer
4ddcb0ea73 fix for gofmt rewrite matcher bug
R=rsc
CC=golang-dev
https://golang.org/cl/179096
2009-12-17 15:23:19 -08:00
Russ Cox
6a4b2492b3 gc: fix compiler crash
R=ken2
CC=dho
https://golang.org/cl/179097
2009-12-17 15:08:55 -08:00
Robert Griesemer
7fcf422181 use new tab indentation format in godoc, but convert
leading tabs into spaces to ensure a good outcome in
most browsers

R=rsc
https://golang.org/cl/165051
2009-12-17 14:10:49 -08:00
Devon H. O'Dell
9277b02537 Allow cgo to accept multiple .go inputs for a package
Fixes #342.

R=rsc
CC=golang-dev
https://golang.org/cl/179062
2009-12-17 13:20:56 -08:00
Devon H. O'Dell
7a5f4be97e Use BitSize instead of the field's type native ByteSize when calculating
structs containing bitfields.

Fixes #163.

R=rsc
CC=golang-dev
https://golang.org/cl/180059
2009-12-17 12:38:29 -08:00
Robert Griesemer
59a3cae402 - Parse expressions as opposed to statements for gofmt rewrite patterns.
Allows stand-alone types (e.g. []int as patterns) and doesn't require
a semicolon at the end (which are now mandatory terminators).

- Fix a matcher bug.

R=rsc
CC=golang-dev
https://golang.org/cl/179088
2009-12-16 16:53:56 -08:00
Moriyoshi Koizumi
a8fbf5dc2c This patch enables cgo utility to correctly convert enums in the C source
into consts in the resulting Go source.  Previously known as issue 161047,
which I deleted accidentally.  Fixes issue 207.

R=rsc
https://golang.org/cl/166059
2009-12-15 21:24:17 -08:00
Russ Cox
c715b58dad gc: fix import name resolution
Fixes #403.

R=ken2
https://golang.org/cl/180052
2009-12-15 16:44:28 -08:00
Russ Cox
5d754bfaea gc: bug fixes.
* better error for lookup of unexported field
  * do not assign "ideal string" type to typed string literal
  * do not confuse methods and fields during interface check

Fixes #410.
Fixes #411.
Fixes #426.

R=ken2
https://golang.org/cl/179069
2009-12-15 16:22:04 -08:00
Russ Cox
101f499fa5 gc: allow ... in method lists
R=ken2
https://golang.org/cl/179070
2009-12-15 16:20:37 -08:00
Robert Griesemer
5a1d3323fe 1) Change default gofmt default settings for
parsing and printing to new syntax.

                  Use -oldparser to parse the old syntax,
                  use -oldprinter to print the old syntax.

               2) Change default gofmt formatting settings
                  to use tabs for indentation only and to use
                  spaces for alignment. This will make the code
                  alignment insensitive to an editor's tabwidth.

                  Use -spaces=false to use tabs for alignment.

               3) Manually changed src/exp/parser/parser_test.go
                  so that it doesn't try to parse the parser's
                  source files using the old syntax (they have
                  new syntax now).

               4) gofmt -w src misc test/bench

	       1st set of files.

R=rsc
CC=agl, golang-dev, iant, ken2, r
https://golang.org/cl/180047
2009-12-15 15:33:31 -08:00
Russ Cox
d122bb2193 gc: double-check usage of ...
Fixes #423.

R=ken2
https://golang.org/cl/180045
2009-12-15 14:26:50 -08:00
Russ Cox
0282cc5e74 gc: var x, ok = m[y]
Fixes #384.

R=ken2
https://golang.org/cl/179061
2009-12-15 14:26:33 -08:00
Robert Griesemer
8793f622e6 don't show semicolons anymore with godoc
R=rsc
https://golang.org/cl/174078
2009-12-14 09:14:00 -08:00
Hector Chu
977e19d69f 8l: add support for PE output.
R=rsc
https://golang.org/cl/166080
2009-12-13 12:39:20 -08:00
Hector Chu
31645cc0bb Ported godefs to Windows.
R=rsc
https://golang.org/cl/164049
2009-12-13 12:21:44 -08:00
Russ Cox
978c3e96d1 gc: fix comment
R=gri
CC=golang-dev
https://golang.org/cl/174077
2009-12-13 12:11:56 -08:00
Rob Pike
f646296185 Update goyacc to new syntax, still with semicolons.
Update units.y too.
Fixes #417.

R=rsc
CC=golang-dev
https://golang.org/cl/176063
2009-12-14 06:34:51 +11:00
Ken Thompson
bedfc2c2f1 more on the optimizer
trying to get alizses
to optimize

R=rsc
https://golang.org/cl/176061
2009-12-12 14:36:52 -08:00
Robert Griesemer
222462ed4f Various cleanups:
- no need to replace comments for stand-alone blocks
- always print string concatenations with interspersed "+"
  (remove option)
- minor cleanups

R=rsc
https://golang.org/cl/174076
2009-12-11 16:42:14 -08:00
Russ Cox
3997495dc3 gc: semicolons
Fixes #89.
Fixes #92.
Fixes #118.
Fixes #182.
Fixes #328.
Fixes #340.

R=ken2, ken3
CC=golang-dev
https://golang.org/cl/172049
2009-12-11 15:59:41 -08:00
Ken Thompson
cd00bc78da bug in 6g optimizer
8g still needs fixing

R=rsc
https://golang.org/cl/176057
2009-12-11 15:55:09 -08:00
Devon H. O'Dell
857d4cf1a9 Remove GOBIN in PATH dependency; don't assume cwd is $GOROOT/src
This change removes the necessity to have GOBIN in $PATH,
and also doesn't assume that the build is being run from
$GOROOT/src. This is a minimal set of necessary changes
to get Go to build happily from the FreeBSD ports
collection.

R=rsc
CC=golang-dev
https://golang.org/cl/171044
2009-12-11 15:14:09 -08:00
Yongjian Xu
8b3b1edc04 mkbuiltin: generate builtin.c directly
R=golang-dev, rsc
https://golang.org/cl/173041
2009-12-11 12:41:33 -08:00
Robert Griesemer
67aa1399d6 - make make test working again
- some factoring for easier experimentation

R=rsc
https://golang.org/cl/174048
2009-12-10 19:07:10 -08:00
Robert Griesemer
bda2074193 New flags for gofmt:
- oldparser            parse old syntax (required semicolons)
- oldprinter           print old syntax (required semicolons)

By default, these flags are enabled for now.
Setting -oldparser=false has no effect until go/parser is changed
to accept the new syntax.

Enabled exp/parser in Makefile; update dependent exp/eval.

R=rsc
https://golang.org/cl/174051
2009-12-10 19:03:28 -08:00
Robert Griesemer
295ceb4526 remove uses of string concatenation from src and misc directory
R=rsc
https://golang.org/cl/172041
2009-12-09 16:54:07 -08:00
Charles L. Dorian
3ca1b1d27f Continuation of issue 221 fix. When 8g or 6g or 5g are called with a
UTF-8 string, Yconv() converts it into an octal sequence. If the
string converted to more than 30 bytes, the str buffer would
overflow. For example, 4 Greek runes became 32 bytes, 3 Hiragana
runes became 36 bytes, and 2 Gothic runes became 32 bytes. In
8l, 6l and 5l the function is Sconv(). For some reason, only 5l uses
the constant STRINGSZ (defined as 200) for the buffer size.

R=rsc
https://golang.org/cl/168045
2009-12-09 11:56:45 -08:00
Russ Cox
b73b43ea31 6l, 8l: make string buffer big enough for 8 chars (and then some)
Fixes #221.

R=ken2
https://golang.org/cl/165086
2009-12-07 22:01:59 -08:00
Russ Cox
33649bd278 runtime: introduce unsafe.New and unsafe.NewArray
to provide functionality previously hacked in to
    reflect and gob.

R=r
https://golang.org/cl/165076
2009-12-07 15:51:58 -08:00
Roger Peppe
80e17d6797 the AST walker currently provides no way to find out how the
nodes in the tree are nested with respect to one another.
a simple change to the Visitor interface makes it possible
to do this (for example to maintain a current node-depth, or a
knowledge of the name of the current function).

Visit(nil) is called at the end of a node's children;
this make possible the channel-based interface below,
amongst other possibilities.

It is still just as simple to get the original behaviour - just
return the same Visitor from Visit.

Here are a couple of possible Visitor types.

// closure-based
type FVisitor func(n interface{}) FVisitor
func (f FVisitor) Visit(n interface{}) Visitor {
	return f(n);
}

// channel-based
type CVisitor chan Visit;
type Visit struct {
	node interface{};
	reply chan CVisitor;
};
func (v CVisitor) Visit(n interface{}) Visitor
{
	if n == nil {
		close(v);
	} else {
		reply := make(chan CVisitor);
		v <- Visit{n, reply};
		r := <-reply;
		if r == nil {
			return nil;
		}
		return r;
	}
	return nil;
}

R=gri
CC=rsc
https://golang.org/cl/166047
2009-12-07 10:33:45 -08:00
Russ Cox
864c757a1c gc/runtime: pass type structure to makeslice.
* inform garbage collector about memory with no pointers in it

1.9s	gcc reverse-complement.c

reverse-complement.go
4.5s / 3.5s	original, with/without bounds checks
3.5s / 3.3s	bounds check reduction
3.3s / 2.8s	smarter garbage collector
2.6s / 2.3s		assembler bytes.IndexByte
2.5s / 2.1s	even smarter garbage collector (this CL)

R=r
https://golang.org/cl/165064
2009-12-04 21:44:05 -08:00
Russ Cox
6f14cada11 gc: walk pointer in range on slice/array
R=ken2
https://golang.org/cl/166071
2009-12-04 20:40:21 -08:00
Russ Cox
7c4aeec868 6g/8g optimizer fix: throw functions now in runtime
R=ken2
https://golang.org/cl/166070
2009-12-04 20:37:32 -08:00
Russ Cox
d7402cea8c gotest: stop if the // gotest commands fail
R=r
https://golang.org/cl/166067
2009-12-04 18:34:59 -08:00
Russ Cox
01f0f16ebc gotest: ignore *_test.pb.go
R=r
https://golang.org/cl/166064
2009-12-04 17:08:54 -08:00
Russ Cox
f2c7a20142 8l: fix print line number format, buffer overflow
R=ken2
https://golang.org/cl/165059
2009-12-03 23:29:48 -08:00
Russ Cox
9da6666a8a gc: check for assignment to private fields during initialization
R=ken2
https://golang.org/cl/165055
2009-12-03 22:09:58 -08:00
Ken Thompson
62be24d949 6g code gen bug
R=rsc
https://golang.org/cl/166052
2009-12-03 20:28:24 -08:00
Christopher Wedgwood
7e7008fa5e gc: Allow allow data types up to 1GB
R=rsc
https://golang.org/cl/164095
2009-12-03 12:46:34 -08:00
Russ Cox
c6e316a4b9 gc: handle _ = <-c in select.
Fixes #238.

R=ken2
https://golang.org/cl/163098
2009-12-03 01:30:19 -08:00
Russ Cox
05a1eb1ab0 gc: recursive type error
Fixes #245.

R=ken2
https://golang.org/cl/164094
2009-12-03 01:12:02 -08:00
Russ Cox
41861a8812 gc: better diagnosis of initialization loops
Fixes bug 292.

R=ken2
https://golang.org/cl/164093
2009-12-03 00:51:03 -08:00
Russ Cox
e733766dda gc: minor import grammar bug fixes
Fixes #364.

R=ken2
https://golang.org/cl/164092
2009-12-03 00:10:32 -08:00
Russ Cox
272d156357 gc: function argument ordering bug
Fixes #370.

R=ken2
https://golang.org/cl/163097
2009-12-02 23:54:51 -08:00
Russ Cox
8777759f59 gc: make 'invalid rune in string' a little less cryptic
Fixes #371.

R=ken2
https://golang.org/cl/164091
2009-12-02 23:23:11 -08:00
Rob Pike
b0683bd77a move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.
this breaks the dependency of package io on package bytes.

R=rsc
CC=golang-dev
https://golang.org/cl/163085
2009-12-02 22:02:14 -08:00
Robert Griesemer
c0efa07c65 updated documentation for gofmt
R=rsc
https://golang.org/cl/164085
2009-12-02 19:32:15 -08:00
Russ Cox
69c0edd59b 8g: discard tempalloc/tempfree experiment
in favor of tempname.
allows optimizer to do more.
unfortunately, optimizer seems to be broken; disable it.

R=ken2
https://golang.org/cl/163091
2009-12-02 18:31:29 -08:00
Russ Cox
fdb030d86f 6g etc: groundwork for eliminating redundant bounds checks.
drop check in range over array.
	drop check in [256]array indexed by byte.

R=ken2
https://golang.org/cl/163088
2009-12-02 17:30:07 -08:00
Robert Griesemer
dc7355a974 Add flag -tabindent to gofmt: forces use of
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
https://golang.org/cl/163068
2009-12-02 16:57:15 -08:00
Fazlul Shahriar
0aa13c999b gofmt: race condition in error reporting and setting exit code
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
https://golang.org/cl/164073
2009-12-02 13:02:42 -08:00
Evan Shaw
1664e81585 8g: Match sgen definition to declaration
R=rsc
CC=golang-dev
https://golang.org/cl/164069
2009-12-01 21:42:35 -08:00
Devon H. O'Dell
fd7e1a2d87 FreeBSD needs #!/usr/bin/env bash (fixes broken build on FreeBSD)
R=gri
https://golang.org/cl/163067
2009-12-01 19:30:17 -08:00
Charles L. Dorian
e1c347ca59 8g: fix 386 floating point stack bug
Also fixes issue 310 comment 5 error.
Fixes #310.

R=rsc
https://golang.org/cl/163042
2009-12-01 15:53:50 -08:00
Robert Griesemer
749da968e4 make test.sh work again
R=rsc
https://golang.org/cl/164059
2009-12-01 13:08:36 -08:00
Rob Pike
67dc2ae3a6 a couple of usage fixups in prof
R=rsc
https://golang.org/cl/161050
2009-12-01 11:35:34 -08:00
Fazlul Shahriar
db18ce2f53 gofmt: use os.Stdin instead of opening /dev/stdin
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
https://golang.org/cl/162041
2009-12-01 09:32:22 -08:00
Robert Griesemer
9e450880e9 some godoc cleanup:
- 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
https://golang.org/cl/163051
2009-12-01 09:15:05 -08:00
Eden Li
354b100567 cgo: use C type void for opaque types if dwarf.Common().Type returns nothing
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 #334.
Fixes #281.

R=rsc
https://golang.org/cl/161056
2009-11-29 18:14:39 -08:00
Russ Cox
b7c4314ecb gc: correct type check for x, ok map assignment
Fixes #288.

R=ken2
https://golang.org/cl/157162
2009-11-24 16:11:48 -08:00
Robert Griesemer
001a8b11ff Change to container/vector interface:
- 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 #294.

R=rsc, r, r1
https://golang.org/cl/157143
2009-11-24 13:43:18 -08:00
Russ Cox
7c9acae2f1 godoc: plug file descriptor leak
R=gri
CC=r
https://golang.org/cl/157149
2009-11-24 13:21:14 -08:00
Eden Li
a9d0da75f1 cgo translates empty function arguments into void instead of dying with 'unexpected type: ...'.
Fixes #162.

R=rsc
https://golang.org/cl/157147
2009-11-23 22:02:12 -08:00
Sergio Luis O. B. Correia
6fc820729e go: makes it build for the case $GOROOT has whitespaces
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 #115.

R=rsc, dsymonds1
https://golang.org/cl/157067
2009-11-23 17:32:51 -08:00
Sergio Luis O. B. Correia
2b1133ff86 cmd/cc: change getquoted() to accept whitespaces.
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
https://golang.org/cl/157066
2009-11-23 16:00:26 -08:00
Russ Cox
edf7485a6e gofmt -r: documentation and minor fixes
fix a few paren insertion bugs in the printer too.

R=gri, r
CC=golang-dev
https://golang.org/cl/157119
2009-11-23 15:44:27 -08:00
Russ Cox
e69f12ae1d two more if(h<0) that gcc 4.3 -O2 miscompiles
R=r
https://golang.org/cl/160044
2009-11-23 14:23:14 -08:00
Russ Cox
dc30800c28 8g: call throwindex for array out of bounds
R=ken2
https://golang.org/cl/160043
2009-11-23 12:58:28 -08:00
Russ Cox
28e392d4bd gofmt: add -r flag to rewrite source code according to pattern
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
https://golang.org/cl/156103
2009-11-20 15:09:54 -08:00
Russ Cox
9ac4449cb2 gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg
R=r, gri
CC=golang-dev
https://golang.org/cl/156115
2009-11-20 11:45:05 -08:00
Russ Cox
aa4c638b7b x[y:] for strings
R=ken2
https://golang.org/cl/157114
2009-11-20 11:42:28 -08:00
Russ Cox
652f55672d x[lo:] - gc and runtime.
* 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
https://golang.org/cl/157106
2009-11-20 09:11:46 -08:00
Russ Cox
9bc6a404d5 cgo: allow .so in subdirectories
R=r
https://golang.org/cl/157103
2009-11-20 00:31:03 -08:00
Eden Li
b30f753dc3 cgo now renders types with unknown size as [0]byte instead of raising a
fatal error.
Fixes #126.

R=rsc
https://golang.org/cl/157101
2009-11-19 22:09:01 -08:00
Russ Cox
d116a32727 gc: reject large channel values at compile time
Fixes #144.

R=ken2
CC=agl1
https://golang.org/cl/156102
2009-11-19 18:20:06 -08:00
Robert Griesemer
398927e63b update test.sh for gofmt
R=rsc
https://golang.org/cl/157096
2009-11-19 16:42:49 -08:00
Robert Griesemer
b48f71213a Permit omission of hi bound in slices.
R=r, rsc
https://golang.org/cl/157082
2009-11-19 16:42:05 -08:00
Trevor Strohman
61660adc63 Adds benchmark support to gotest.
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
https://golang.org/cl/154173
2009-11-19 16:35:34 -08:00
Ken Thompson
d9014dc98a put copy into goyacc
R=rsc
https://golang.org/cl/156100
2009-11-19 15:34:11 -08:00
Devon H. O'Dell
60b1a17b9e More FreeBSD-touchups. Thundercats are GOOOOO!
R=rsc
CC=golang-dev
https://golang.org/cl/157074
2009-11-18 16:51:59 -08:00
Russ Cox
dc43b74eb1 6l, 8l: add trivial hash table for dynamic symbols
R=r
https://golang.org/cl/156085
2009-11-18 15:58:44 -08:00
Rob Pike
e70cedfaec remove bytes.Copy
replace all calls with calls to copy
use copy in regexp and bytes.Buffer

R=rsc
CC=golang-dev
https://golang.org/cl/157073
2009-11-18 15:24:24 -08:00
Russ Cox
9be56adf3c gc: allow implicit conversion of *[10]int -> []int
when used as arg to copy.

R=ken2
https://golang.org/cl/157071
2009-11-18 14:26:28 -08:00
Russ Cox
91cf0af181 ld: move interpreter string into first block of ELF file
necessary on freebsd.

R=r, dho
CC=golang-dev
https://golang.org/cl/157069
2009-11-18 13:51:05 -08:00
Rob Pike
7518613430 slicecopy was always using 16 (sizeof slice) for the size instead of size of element.
R=rsc
CC=ken2, golang-dev
https://golang.org/cl/156083
2009-11-18 13:43:48 -08:00
Eden Li
652bb7c2be Mangle C struct fields that happen to be named after Go keywords by 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 #36.

R=rsc
https://golang.org/cl/157061
2009-11-18 09:59:10 -08:00
Devon H. O'Dell
b3f538a4fd FreeBSD/i386 work
This patchset gets Go to pretty much the same state that
FreeBSD/amd64 is in.

R=rsc
https://golang.org/cl/157055
2009-11-17 23:58:51 -08:00
Eden Li
2115f514d0 cgo no longer translates function args that are void* into
unsafe.Pointer.
Fixes #254.

R=rsc
https://golang.org/cl/157060
2009-11-17 23:42:21 -08:00
Ken Thompson
01c2de0c15 allow copy to be used without a return value
R=rsc
https://golang.org/cl/156060
2009-11-17 22:00:59 -08:00
Ken Thompson
c4606d05da install copy predefined
did not test 386, but should work
shouldnt matter if copy is not used

R=rsc
https://golang.org/cl/156055
2009-11-17 20:41:44 -08:00
Ken Thompson
26b55e44d9 fix botch
R=rsc
https://golang.org/cl/157046
2009-11-17 14:11:50 -08:00
Ken Thompson
8a6da2f6a0 change a n^2 algorithm in
data initialization to n*log(n)

R=rsc
https://golang.org/cl/158041
2009-11-17 13:59:38 -08:00
Sergio Luis O. B. Correia
bae4f5085e cmd/cc: Fix -I switch to handle a path with blankspaces correctly
Currently, -I switch can't deal with a path containing spaces.
This commit simplify setinclude(), by removing the special case
of a string that had spaces. After this change, setinclude() will
merely add the given directories to the include path, if it does
not yet exist, and this approach works.

Will be needed for solving issue 115.

R=agl1, rsc, iant2, r
https://golang.org/cl/155059
2009-11-17 09:02:47 -08:00
Devon H. O'Dell
0489a260da FreeBSD-specific porting work.
cgo/libmach remain unimplemented. However, compilers, runtime,
and packages are 100%. I still need to go through and implement
missing syscalls (at least make sure they're all listed), but
for all shipped functionality, this is done. Ship! ;)

R=rsc, VenkateshSrinivas
https://golang.org/cl/152142
2009-11-17 08:20:58 -08:00
Russ Cox
1ee83f851d gc: change "can we const evaluate this" from blacklist to whitelist
R=ken2
https://golang.org/cl/155074
2009-11-16 17:40:47 -08:00
Russ Cox
44e51fad28 6l: fix divide by zero in glibc linker.
repeats 8l change http://code.google.com/p/go/source/detail?r=7594e16b5cf9

Fixes #179.

R=iant
https://golang.org/cl/154145
2009-11-16 17:40:03 -08:00
Robert Griesemer
e86afaf456 Don't emit line tags when source code is printed as part of
package documentation using templates. The line tag interferes
with the anchor tag introduces by the template.

This fixes an an issue where some headers lost their ability
to link to the respective source code.

R=rsc
https://golang.org/cl/154166
2009-11-16 14:26:29 -08:00