Russ Cox
2609731736
delay range processing. old2new is gone
...
R=ken
OCL=32780
CL=32780
2009-08-05 02:33:30 -07:00
Russ Cox
54b403723b
delay := processing
...
R=ken
OCL=32772
CL=32772
2009-08-05 00:42:44 -07:00
Russ Cox
dbe004efe4
delayed evaluation of var blocks
...
R=ken
OCL=32750
CL=32753
2009-08-04 16:53:06 -07:00
Russ Cox
f7a867e1a6
move select into its own file.
...
split into typecheck + walk
R=ken
OCL=32726
CL=32726
2009-08-04 12:57:48 -07:00
Russ Cox
d8c19c80dc
type checking of assignments, switch, if, for
...
R=ken
OCL=32716
CL=32720
2009-08-04 10:26:29 -07:00
Russ Cox
9dc22b6d6f
more 6g reorg; checkpoint.
...
typecheck.c is now responsible for all type checking
except for assignment and function argument "..."
R=ken
OCL=32661
CL=32667
2009-08-03 11:58:52 -07:00
Russ Cox
a2b8e38766
checkpoint; still plenty to clean up
...
R=ken
OCL=32576
CL=32580
2009-07-31 09:29:28 -07:00
Russ Cox
b754b4348f
delete some code from walkexpr that is now
...
handled by typecheck.
second switch is gone
move floating point minus into back end
R=ken
OCL=32558
CL=32558
2009-07-30 18:56:44 -07:00
Russ Cox
ff3a73b407
typechecking checkpoint.
...
started to move typechecking to another file.
can build entire tree still, but lots of work
is duplicated. much to clean up.
R=ken
OCL=32536
CL=32543
2009-07-30 16:53:08 -07:00
Russ Cox
9271c6402e
introduce typecheck pass before walkexpr.
...
not complete but compiler still works.
R=ken
OCL=32424
CL=32426
2009-07-29 12:47:51 -07:00
Russ Cox
056940d84b
convert walkexpr to take Node**; drop indir
...
R=ken
OCL=32421
CL=32421
2009-07-29 12:00:34 -07:00
Russ Cox
18840f5429
constant keys for array initializers
...
R=ken
OCL=32261
CL=32261
2009-07-27 17:58:25 -07:00
Russ Cox
a587d9a73f
multiple return in := bug
...
R=ken
OCL=32253
CL=32253
2009-07-27 16:59:10 -07:00
Russ Cox
059bbdd340
print(1<<x)
...
R=ken
OCL=32252
CL=32252
2009-07-27 16:17:09 -07:00
Russ Cox
811e59f2fa
named string type bugs
...
R=ken
OCL=32244
CL=32244
2009-07-27 15:16:28 -07:00
Russ Cox
03b25a92a3
catch
...
a := true;
a |= a;
in the front end.
R=ken
OCL=32240
CL=32243
2009-07-27 14:55:14 -07:00
Russ Cox
f664d0e904
explain selectsend problem
...
R=ken
OCL=31865
CL=31867
2009-07-20 13:29:56 -07:00
Russ Cox
35e5906f91
another baby step.
...
excluding import data,
no yacc node has type Type* anymore.
0 reduce/reduce conflicts.
R=ken
OCL=31793
CL=31795
2009-07-17 14:42:14 -07:00
Russ Cox
db508ccbff
baby step: const decls can refer to future
...
consts in the same factored block
const (
X = Y;
Y = 2;
)
R=ken
OCL=31782
CL=31782
2009-07-17 13:38:16 -07:00
Russ Cox
e52e9ca82e
another step toward eliminating forward declarations.
...
introduce NodeList* type in compiler to replace OLIST.
this clarifies where lists can and cannot occur.
list append and concatenation are now cheap.
the _r rules are gone from yacc.
rev and unrev are gone.
no more lists of lists.
the representation of assignments is a bit clunkier.
split into OAS (1=1) and OAS2 (2 or more on one side).
delete dead chanrecv3 code.
delay construction of func types.
R=ken
OCL=31745
CL=31762
2009-07-17 01:00:44 -07:00
Russ Cox
be16caf872
step toward no function prototypes.
...
delay evaluation of most types (all but func)
from parse time to type check time.
R=ken
OCL=31585
CL=31585
2009-07-13 23:38:39 -07:00
Russ Cox
0dadc4fe4f
cleanup in preparation for new scoping.
...
walkstate -> walkstmt
walktype -> walkexpr; stmts moved to walkstmt
walktype and friends have a final Node **init
argument that can have side effects appended,
making it more explicit when they do and do not happen.
this replaces the old global addtop and addtotop.
delete switch map and interface conversion cases
(dropped from the language months ago).
R=ken
OCL=31465
CL=31468
2009-07-10 16:29:26 -07:00
Ken Thompson
5ff7d84892
segment fault
...
R=rsc
OCL=31396
CL=31396
2009-07-09 11:41:06 -07:00
Russ Cox
541e638f9b
6g, 8g: generate data structures for new reflect interface (CL 31107)
...
R=ken
OCL=31122
CL=31278
2009-07-07 11:03:04 -07:00
Russ Cox
0aa1b1508a
shift typechecking bugs
...
x << "a"
1 << int(2)
R=ken
OCL=31244
CL=31244
2009-07-06 23:33:17 -07:00
Russ Cox
74b546aefd
statements after panicln are unreachable, just like after panic.
...
missing break after error.
dot symbol bug fix: leave sym alone
(was incorrect for inserted cross-package dots).
R=ken
OCL=31234
CL=31236
2009-07-06 22:25:54 -07:00
Russ Cox
d436a70193
allow conversion to interface type
...
when implicit assignment would have been okay.
R=ken
OCL=31225
CL=31227
2009-07-06 17:20:48 -07:00
Ken Thompson
6bb3c48d3d
another seg fault
...
R=r
OCL=31156
CL=31156
2009-07-04 13:59:08 -07:00
Russ Cox
75fe1303c1
maps have == so maps are okay as map keys.
...
alignment issue is fixed.
R=ken
OCL=31124
CL=31144
2009-07-03 09:44:59 -07:00
Russ Cox
70a273476b
better error; clean up lineno in a few places
...
wreck.mtv=; cat x.go
package main
var x = string.Split()
wreck.mtv=; 6g x.go
x.go:2: type string used as expression
x.go:2: undefined DOT Split on string
x.go:3: illegal types for operand: AS
undefined
wreck.mtv=;
BUG=1938751
R=ken
OCL=30766
CL=30766
2009-06-25 16:32:33 -07:00
Russ Cox
111ae83bb7
6g: update for spec change CL 30586
...
R=ken
OCL=30593
CL=30756
2009-06-25 14:44:45 -07:00
Russ Cox
0aef57e37f
fix a 6g crash after type errors.
...
do not bother warning about marks left
on stack after syntax errors.
leave OCONV nodes in tree to avoid type errors
arising from multiple walks.
R=ken
OCL=30639
CL=30662
2009-06-23 15:30:59 -07:00
Russ Cox
7f3eb2738f
implement new spec language regarding conversions
...
R=ken
OCL=30519
CL=30534
2009-06-19 14:00:53 -07:00
Russ Cox
8f4af6d205
gc: grammar cleanup:
...
* no longer distinguishes const, var, type, package names.
* all the predefined names are not tokens anymore.
R=ken
OCL=29326
CL=29985
2009-06-06 12:46:38 -07:00
Russ Cox
ea7f5505d1
zero struct in T{}
...
R=ken
OCL=29849
CL=29849
2009-06-03 16:10:13 -07:00
Russ Cox
f1f970ad21
minor cleanup, 64-bit /= and %= on 32-bit
...
R=ken
OCL=29806
CL=29808
2009-06-02 23:21:58 -07:00
Ken Thompson
c17ce9f94f
prevent multiple similar errors
...
in complex literals. side effect is
fix of error in initializerr.go
R=r
OCL=29667
CL=29667
2009-05-31 13:02:24 -07:00
Russ Cox
d6a9817051
bug157
...
R=ken
OCL=29651
CL=29653
2009-05-30 21:18:15 -07:00
Russ Cox
0a6d83567e
print uint64 as uint64.
...
R=ken
OCL=29568
CL=29570
2009-05-28 22:24:03 -07:00
Ken Thompson
b3f303ec9a
bug 153
...
R=r
OCL=29479
CL=29479
2009-05-27 18:37:02 -07:00
Ken Thompson
64c3fe05bf
string([]int) conversion
...
R=r
OCL=29466
CL=29466
2009-05-27 15:38:02 -07:00
Russ Cox
a8e4ed6a3d
8g: 64-bit arithmetic and assorted bug fixes;
...
can run 64-bit sieve and powser.
interfaces are limping along.
next hurdle is floating point.
R=ken
OCL=29418
CL=29423
2009-05-26 21:07:26 -07:00
Ken Thompson
b46e7c4d3c
bug 152
...
R=r
OCL=29419
CL=29419
2009-05-26 19:48:39 -07:00
Ken Thompson
51ddddc67e
bug 151
...
R=r
OCL=29409
CL=29409
2009-05-26 16:30:35 -07:00
Ken Thompson
850cd6a2fe
bug 150
...
R=r
OCL=29405
CL=29405
2009-05-26 15:56:37 -07:00
Ken Thompson
4238b18344
1. check for dups in complex literals
...
structtype{a:1, a:2}
maptypetype{"xx":1, "xx":2}
arraytypetype{5:1, 5:2}
2. bug in registerization concerning
alias of a struct and one of its elements
3. code optimization of struct.field
(which exposed bug in 2)
R=r
OCL=29315
CL=29315
2009-05-23 15:34:29 -07:00
Russ Cox
f4d3d22a94
enforce channel direction
...
R=ken
OCL=29209
CL=29216
2009-05-21 17:32:44 -07:00
Ken Thompson
bba10b3f49
some array init bugs
...
renamed 6g/(gen|align|obj).c
R=r
OCL=29205
CL=29205
2009-05-21 15:44:06 -07:00
Russ Cox
8b6b380605
stricter rules for assignment.
...
when assigning a multifield object
(structs or arrays of structs) they
must not contain any fields that could
not be assigned individually.
R=ken
OCL=29192
CL=29194
2009-05-21 14:06:24 -07:00
Ken Thompson
a016081f43
added key:val extension to
...
structure and array literals
R=r
OCL=29190
CL=29190
2009-05-21 13:46:07 -07:00