Russ Cox
8bf34e3356
gc, runtime: replace closed(c) with x, ok := <-c
...
R=ken2, ken3
CC=golang-dev
https://golang.org/cl/4259064
2011-03-11 14:47:26 -05:00
Russ Cox
cb584707af
gc: remove non-blocking send, receive syntax
...
R=ken2
CC=golang-dev
https://golang.org/cl/4126043
2011-01-31 18:52:16 -05:00
Russ Cox
0849944694
gc: delete float, complex
...
rename cmplx -> complex
R=ken2
CC=golang-dev
https://golang.org/cl/4071041
2011-01-19 23:08:11 -05:00
Russ Cox
b0543ddd8a
gc, runtime: make range on channel safe for multiple goroutines
...
Fixes #397 .
R=ken2
CC=golang-dev
https://golang.org/cl/3994043
2011-01-18 15:59:19 -05:00
Anthony Martin
661bcb773b
gc: fix typed constant declarations
...
Fixes #1411 .
R=rsc, gri, ejsherry
CC=golang-dev
https://golang.org/cl/4035042
2011-01-18 11:24:49 -05:00
Russ Cox
2281ca169c
gc: fix &^=
...
Fixes #1394 .
R=ken2
CC=golang-dev
https://golang.org/cl/3879041
2011-01-06 11:21:18 -05:00
Patrick Gavlin
4e5a59591b
gc: rewrite complex /= to l = l / r.
...
Fixes #1368 .
R=rsc, ejsherry
CC=golang-dev
https://golang.org/cl/3811042
2011-01-04 13:14:17 -05:00
Ken Thompson
8613eb56b2
last of the arm conversions
...
R=rsc
CC=golang-dev
https://golang.org/cl/3053041
2010-11-11 19:54:35 -08:00
Ken Thompson
cb3754fd43
fix error converting result of complex
...
division. resolves issue 1261.
R=rsc
CC=golang-dev
https://golang.org/cl/2985043
2010-11-09 17:39:36 -08:00
Russ Cox
68b4255a96
runtime: ,s/[a-zA-Z0-9_]+/runtime·&/g, almost
...
Prefix all external symbols in runtime by runtime·,
to avoid conflicts with possible symbols of the same
name in linked-in C libraries. The obvious conflicts
are printf, malloc, and free, but hide everything to
avoid future pain.
The symbols left alone are:
** known to cgo **
_cgo_free
_cgo_malloc
libcgo_thread_start
initcgo
ncgocall
** known to linker **
_rt0_$GOARCH
_rt0_$GOARCH_$GOOS
text
etext
data
end
pclntab
epclntab
symtab
esymtab
** known to C compiler **
_divv
_modv
_div64by32
etc (arch specific)
Tested on darwin/386, darwin/amd64, linux/386, linux/amd64.
Built (but not tested) for freebsd/386, freebsd/amd64, linux/arm, windows/386.
R=r, PeterGo
CC=golang-dev
https://golang.org/cl/2899041
2010-11-04 14:00:19 -04:00
Russ Cox
d8b5d039cd
gc: implement append
...
R=ken2
CC=golang-dev
https://golang.org/cl/2757042
2010-10-27 17:56:32 -07:00
Russ Cox
e48c0fb562
5g, 6g, 8g: generate code for string index
...
instead of calling function.
R=ken2
CC=golang-dev
https://golang.org/cl/2762041
2010-10-26 21:11:17 -07:00
Russ Cox
82c6f5e3d1
gc, runtime: copy([]byte, string)
...
R=ken2
CC=golang-dev
https://golang.org/cl/2741041
2010-10-26 08:36:07 -07:00
Russ Cox
01385b400d
gc: ... bug
...
Fixes #1165 .
R=ken2
CC=golang-dev
https://golang.org/cl/2339042
2010-10-06 11:12:30 -04:00
Russ Cox
30dd191171
gc: O(1) string comparison when lengths differ
...
R=ken2
CC=golang-dev
https://golang.org/cl/2331045
2010-10-06 09:53:12 -04:00
Ken Thompson
103d756663
loader fix
...
static init redo
R=rsc
CC=golang-dev
https://golang.org/cl/2254041
2010-09-20 14:23:25 -07:00
Ken Thompson
d348971103
add readonly flag to static initialization
...
R=rsc
CC=golang-dev
https://golang.org/cl/2187042
2010-09-16 16:42:38 -07:00
Russ Cox
f47d403cb4
gc: make string x + y + z + ... + w efficient
...
1 malloc per concatenation.
R=ken2
CC=golang-dev
https://golang.org/cl/2124045
2010-09-12 00:53:04 -04:00
Russ Cox
0acb63769c
gc: const nil bug
...
Fixes #1073 .
R=ken2
CC=golang-dev
https://golang.org/cl/2169043
2010-09-11 15:47:56 -04:00
Russ Cox
82ee481dfc
gc: remove &[10]int -> []int conversion
...
Fixes #829 .
R=ken2
CC=golang-dev
https://golang.org/cl/2124044
2010-09-10 11:53:27 -04:00
Scott Lawrence
fce222a95b
gc: implement new slice spec
...
Fixes #382 .
R=gri, cw, r, rsc
CC=golang-dev
https://golang.org/cl/1957045
2010-09-08 22:20:29 -04:00
Russ Cox
9bac9d23d3
gc: index bounds tests and fixes
...
move constant index checking to front end
x[2:1] is a compile-time error now too
R=ken2
CC=golang-dev
https://golang.org/cl/1848056
2010-08-03 00:26:02 -07:00
Russ Cox
0decedf636
gc: various bug fixes
...
Fixes #935 .
Fixes #936 .
Fixes #941 .
R=ken2
CC=golang-dev
https://golang.org/cl/1867042
2010-07-20 23:45:33 -07:00
Russ Cox
4c0de303ce
gc: bug294
...
Fixes #800 .
R=ken2
CC=golang-dev
https://golang.org/cl/1855043
2010-07-15 16:42:32 -07:00
Russ Cox
ece6a8c549
gc: bug293
...
Fixes #846 .
R=ken2
CC=golang-dev
https://golang.org/cl/1862042
2010-07-15 16:14:06 -07:00
Russ Cox
31c07dfddf
gc: issue 901
...
Fixes #901 .
R=ken2
CC=golang-dev
https://golang.org/cl/1674049
2010-07-15 15:22:51 -07:00
Russ Cox
17f90c68c6
gc: fix handling of types inside function bodies
...
Fixes #849 .
Fixes #920 .
R=ken2
CC=golang-dev
https://golang.org/cl/1841042
2010-07-15 14:25:50 -07:00
Russ Cox
81c3e8cabc
gc: implement new len spec, range bug fix, optimization
...
Fixes #885 .
R=ken2
CC=golang-dev
https://golang.org/cl/1680048
2010-07-01 18:04:25 -07:00
Ken Thompson
33da9afc3e
optimization of static initialization
...
R=rsc
CC=golang-dev
https://golang.org/cl/1677049
2010-06-27 17:37:01 -07:00
Russ Cox
d5a80d0ba4
gc: no more ...
...
various cleanup, deleting unused code
R=ken2
CC=golang-dev
https://golang.org/cl/1663041
2010-06-14 11:24:51 -07:00
Russ Cox
76da2780c3
gc: less aggressive name binding, for better line numbers in errors
...
Cleans up a few other corner cases too.
R=ken2
CC=golang-dev
https://golang.org/cl/1592045
2010-06-12 11:17:24 -07:00
Russ Cox
565b5dc076
gc: new typechecking rules
...
* 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 #840 .
Fixes #830 .
Fixes #778 .
R=ken2
CC=golang-dev
https://golang.org/cl/1303042
2010-06-08 18:50:02 -07:00
Russ Cox
709c5b2481
gc: handle use of builtin function outside function call
...
tweaks & tests of last bug fix too.
R=ken2
CC=golang-dev
https://golang.org/cl/1207044
2010-05-20 22:57:08 -07:00
Russ Cox
b03d7f4d8f
gc: line number bug fix
...
R=ken2
CC=golang-dev
https://golang.org/cl/1243044
2010-05-20 22:19:50 -07:00
Ken Thompson
a3a0a5fdc3
allow data statements for simple
...
external variable assignements.
R=rsc
CC=golang-dev
https://golang.org/cl/1094041
2010-05-03 22:51:30 -07:00
Russ Cox
6361f52fc4
gc: be pickier about slice, chan, array, and map sizes
...
Fixes #589 .
R=ken2
CC=golang-dev
https://golang.org/cl/1032044
2010-05-01 13:15:42 -07:00
Russ Cox
253fd30e66
gc: bug271
...
Fixes #662 .
R=ken2
CC=golang-dev
https://golang.org/cl/978043
2010-04-30 13:27:08 -07:00
Russ Cox
560283c880
gc: bug270
...
Fixes #746 .
R=ken2
CC=golang-dev
https://golang.org/cl/1040042
2010-04-30 13:04:16 -07:00
Russ Cox
d9254d00f9
gc: zero unnamed return values on entry if func has defer
...
R=ken2
CC=golang-dev
https://golang.org/cl/891050
2010-04-12 14:28:27 -07:00
Russ Cox
c9293f0cc7
gc: compile s == "" as len(s) == 0
...
R=ken2
CC=golang-dev
https://golang.org/cl/840043
2010-04-11 15:24:44 -07:00
Russ Cox
f75d0d224f
runtime: turn run time errors checks into panics
...
R=ken2, r
CC=golang-dev
https://golang.org/cl/871042
2010-04-01 22:31:27 -07:00
Russ Cox
9b1507b050
gc: implement panic and recover
...
R=ken2, r, ken3
CC=golang-dev
https://golang.org/cl/831042
2010-03-31 11:46:01 -07:00
Russ Cox
01eaf780a8
gc: add panic and recover (still unimplemented in runtime)
...
main semantic change is to enforce single argument to panic.
runtime: change to 1-argument panic.
use String method on argument if it has one.
R=ken2, r
CC=golang-dev
https://golang.org/cl/812043
2010-03-30 10:53:16 -07:00
Russ Cox
3908c16ffe
gc: bug265
...
Fixes #700 .
R=ken2
CC=golang-dev
https://golang.org/cl/839041
2010-03-29 15:27:59 -07:00
Russ Cox
97d0e8fe6c
gc: allow taking address of out parameters
...
Fixes #186 .
R=ken2
CC=golang-dev
https://golang.org/cl/793041
2010-03-26 18:01:02 -07:00
Ken Thompson
623dfd1b07
depricate panicln
...
R=rsc
CC=golang-dev
https://golang.org/cl/743041
2010-03-24 16:53:54 -07:00
Russ Cox
4408659e81
gc: various map-related bug fixes
...
Fixes #687 .
R=ken2
CC=golang-dev
https://golang.org/cl/680042
2010-03-22 18:51:14 -07:00
Ken Thompson
f229c8b546
identical complex implementation
...
for 6g and 8g. can also be used
for 5g. 5g is still a stub.
R=rsc
CC=golang-dev
https://golang.org/cl/362041
2010-03-09 12:49:24 -08:00
Russ Cox
4f89dcdf99
5g/6g/8g: fix double function call in slice
...
Fixes #654 .
R=ken2
CC=golang-dev
https://golang.org/cl/310041
2010-03-08 14:19:28 -08:00
Ken Thompson
426099f42e
6g complex type usable
...
8g and 5g have stubs to ignore complex
R=rsc
CC=golang-dev
https://golang.org/cl/257042
2010-03-05 20:16:04 -08:00