1
0
mirror of https://github.com/golang/go synced 2024-10-04 17:21:20 -06:00
Commit Graph

842 Commits

Author SHA1 Message Date
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
Russ Cox
ed39c764b8 gc: do not crash on bad [...]T
Fixes #879.

R=ken2
CC=golang-dev
https://golang.org/cl/1678048
2010-06-30 20:34:31 -07:00
Ken Thompson
2795282b50 compiler fatal error in switch.
fixes #867.

R=rsc
CC=golang-dev
https://golang.org/cl/1691045
2010-06-28 16:30:55 -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
6d8b8101ea gc: fix crash for nested complex division
R=ken2
CC=golang-dev
https://golang.org/cl/1720043
2010-06-23 10:55:50 -04:00
Russ Cox
2fc0b4f01b gc: include struct field tags in type equality
R=ken2
CC=golang-dev
https://golang.org/cl/1667048
2010-06-21 13:06:39 -07:00
Russ Cox
45bdf0367e reflect: add Kind, remove Int8Type, Int8Value, etc.
update other code to match.

R=r
CC=golang-dev
https://golang.org/cl/1680044
2010-06-20 12:16:25 -07:00
Russ Cox
9f002f6892 gc: delete debug print
R=ken2
CC=golang-dev
https://golang.org/cl/1732043
2010-06-20 12:15:10 -07:00
Russ Cox
a212d174ac gc: better error messages for interface failures, conversions
x.go:13: cannot use t (type T) as type Reader in assignment:
	T does not implement Reader (Read method requires pointer receiver)
x.go:19: cannot use q (type Q) as type Reader in assignment:
	Q does not implement Reader (missing Read method)
		have read()
		want Read()
x.go:22: cannot use z (type int) as type Reader in assignment:
	int does not implement Reader (missing Read method)

x.go:24: too many arguments to conversion to complex: complex(1, 3)

R=ken2
CC=golang-dev
https://golang.org/cl/1736041
2010-06-20 11:45:53 -07:00
Russ Cox
ceb868bf0a gc: fix build - subnode not addable in complexgen
R=ken2
CC=golang-dev
https://golang.org/cl/1677047
2010-06-20 11:21:43 -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
d20ad1c75a gc: change -u to require imports to be marked safe
R=ken2
CC=golang-dev
https://golang.org/cl/1597043
2010-06-11 15:28:43 -07:00
Russ Cox
a2a7d473f4 gc: more cleanup
* 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
https://golang.org/cl/1619042
2010-06-09 11:00:55 -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
Robert Griesemer
98b27814ae gc: better error message when ~ operator is found
Fixes #844.

R=ken2, rsc, ken3
CC=golang-dev
https://golang.org/cl/1593041
2010-06-07 18:27:26 -07:00
Robert Griesemer
0c222d6e49 gc: backslash newline is not a legal escape sequence in strings
Fixes #827.

R=ken2
CC=golang-dev, rsc
https://golang.org/cl/1592041
2010-06-07 18:10:48 -07:00
Russ Cox
cd016d7558 gc: fix export of complex types
R=ken2
CC=golang-dev
https://golang.org/cl/1442042
2010-06-01 14:48:57 -07:00
Russ Cox
ea941f09bf gc: more accurate error description
R=ken2
CC=golang-dev
https://golang.org/cl/1284041
2010-05-24 17:07:51 -07:00
Russ Cox
8c2bc4419b gc: fix shift/reduce conflict in go.y export syntax
Fixes #771.

R=ken2
CC=golang-dev
https://golang.org/cl/1267042
2010-05-24 16:55:23 -07:00
Russ Cox
2e9b67afa6 gc: bug277 - new conversion syntax
R=ken2
CC=golang-dev
https://golang.org/cl/1220046
2010-05-24 15:25:30 -07:00
Russ Cox
43c0a46ac6 gc: bug280
Fixes #808.

R=ken2
CC=golang-dev
https://golang.org/cl/1273042
2010-05-24 15:25:09 -07:00
Russ Cox
5e253645d2 gc: bug278
Fixes #804.

R=ken2
CC=golang-dev
https://golang.org/cl/1224045
2010-05-24 14:22:54 -07:00
Russ Cox
80ac15ec12 gc: fix unsafe.Sizeof on ideal constants
R=ken2
CC=golang-dev
https://golang.org/cl/1280041
2010-05-24 14:18:15 -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
09b2de77b5 fix bug 275
R=rsc
CC=golang-dev
https://golang.org/cl/1198046
2010-05-20 20:56:28 -07:00
Russ Cox
9e497c3656 gc: disallow · in Go programs
Fixes #793.

R=ken2
CC=golang-dev
https://golang.org/cl/1249043
2010-05-20 17:34:22 -07:00
Ken Thompson
b0283611e4 fix issue 798
cannot allocate an audomatic temp
while real registers are allocated.
there is a chance that the automatic
will be allocated to one of the
allocated registers. the fix is to
not registerize such variables.

R=rsc
CC=golang-dev
https://golang.org/cl/1202042
2010-05-20 17:31:28 -07:00
Evan Shaw
d2aa74118c gc: Better error when computing remainder of non-int
Previously the compiler would just emit "internal compiler error" when
trying to compute the remainder of floats or complex types.

R=rsc
CC=golang-dev
https://golang.org/cl/1243041
2010-05-18 22:41:12 -07:00
Russ Cox
6dbba67214 gc: distinguish array, slice literal in error messages
R=ken2
CC=golang-dev
https://golang.org/cl/1138041
2010-05-06 09:34:12 -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
32df678894 gc: bug264
Fixes #692.

R=ken2
CC=golang-dev
https://golang.org/cl/1092041
2010-05-03 17:51:48 -07:00
Russ Cox
b5f54db359 gc: bug267
R=ken2
CC=golang-dev
https://golang.org/cl/1067042
2010-05-03 15:29:59 -07:00
Russ Cox
371b77ad20 gc: error for nested functions, one semicolon problem
R=ken2
CC=golang-dev
https://golang.org/cl/1046042
2010-05-03 15:02:32 -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
77817e08d5 gc: never include ( ) on singleton func return type
Fixes #749.

R=ken2
CC=golang-dev
https://golang.org/cl/963043
2010-04-29 16:07:14 -07:00
Russ Cox
10eb76b04e gc: bug268
Fixes #745.

R=ken2
CC=golang-dev
https://golang.org/cl/1008045
2010-04-29 15:52:27 -07:00
Russ Cox
69a2e1dc52 gc: better windows detection
R=ken2
CC=golang-dev
https://golang.org/cl/944043
2010-04-27 17:19:15 -07:00
Russ Cox
3bcef5ac30 gc: fix islocalname on windows
Fixes #732.

R=ken2
CC=golang-dev
https://golang.org/cl/956050
2010-04-27 13:52:43 -07:00
Russ Cox
d6e4e18c8c gc: more specific error for statements at top level
R=ken2, r, ken3
CC=golang-dev
https://golang.org/cl/1006041
2010-04-26 22:35:27 -07:00
Russ Cox
4ba177ae36 gc: print x[y:] correctly
R=ken2
CC=golang-dev
https://golang.org/cl/955041
2010-04-20 17:39:31 -07:00
Russ Cox
d97bbabbaa gc: cmplx typecheck bug fix
Fixes #729.

R=ken2
CC=golang-dev
https://golang.org/cl/875048
2010-04-19 09:21:51 -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
9475cafa73 gc: distinguish fatal compiler bug from error+exit
R=ken2
CC=golang-dev
https://golang.org/cl/902044
2010-04-11 14:52:06 -07:00
Russ Cox
fe7826858c gc: make sure main.main has correct type
R=ken2
CC=golang-dev
https://golang.org/cl/883049
2010-04-11 14:51:35 -07:00
Russ Cox
2379fdec04 gc: good syntax error for defer func() {} - missing final ()
R=ken2
CC=golang-dev
https://golang.org/cl/855044
2010-04-04 23:27:26 -07:00