summaryrefslogtreecommitdiff
path: root/src/cmd/gc/walk.c
AgeCommit message (Collapse)AuthorFilesLines
2009-07-27catchRuss Cox1-3/+9
a := true; a |= a; in the front end. R=ken OCL=32240 CL=32243
2009-07-20explain selectsend problemRuss Cox1-1/+4
R=ken OCL=31865 CL=31867
2009-07-17another baby step.Russ Cox1-0/+1
excluding import data, no yacc node has type Type* anymore. 0 reduce/reduce conflicts. R=ken OCL=31793 CL=31795
2009-07-17baby step: const decls can refer to futureRuss Cox1-35/+129
consts in the same factored block const ( X = Y; Y = 2; ) R=ken OCL=31782 CL=31782
2009-07-17another step toward eliminating forward declarations.Russ Cox1-826/+874
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-13step toward no function prototypes.Russ Cox1-28/+175
delay evaluation of most types (all but func) from parse time to type check time. R=ken OCL=31585 CL=31585
2009-07-10cleanup in preparation for new scoping.Russ Cox1-388/+299
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-09segment faultKen Thompson1-0/+4
R=rsc OCL=31396 CL=31396
2009-07-076g, 8g: generate data structures for new reflect interface (CL 31107)Russ Cox1-16/+5
R=ken OCL=31122 CL=31278
2009-07-06shift typechecking bugsRuss Cox1-1/+1
x << "a" 1 << int(2) R=ken OCL=31244 CL=31244
2009-07-06statements after panicln are unreachable, just like after panic.Russ Cox1-3/+2
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-06allow conversion to interface typeRuss Cox1-1/+8
when implicit assignment would have been okay. R=ken OCL=31225 CL=31227
2009-07-04another seg faultKen Thompson1-1/+2
R=r OCL=31156 CL=31156
2009-07-03maps have == so maps are okay as map keys.Russ Cox1-8/+6
alignment issue is fixed. R=ken OCL=31124 CL=31144
2009-06-25better error; clean up lineno in a few placesRuss Cox1-11/+14
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-256g: update for spec change CL 30586Russ Cox1-9/+5
R=ken OCL=30593 CL=30756
2009-06-23fix a 6g crash after type errors.Russ Cox1-5/+13
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-19implement new spec language regarding conversionsRuss Cox1-15/+26
R=ken OCL=30519 CL=30534
2009-06-06gc: grammar cleanup:Russ Cox1-43/+57
* no longer distinguishes const, var, type, package names. * all the predefined names are not tokens anymore. R=ken OCL=29326 CL=29985
2009-06-03zero struct in T{}Russ Cox1-1/+1
R=ken OCL=29849 CL=29849
2009-06-02minor cleanup, 64-bit /= and %= on 32-bitRuss Cox1-4/+16
R=ken OCL=29806 CL=29808
2009-05-31prevent multiple similar errorsKen Thompson1-14/+35
in complex literals. side effect is fix of error in initializerr.go R=r OCL=29667 CL=29667
2009-05-30bug157Russ Cox1-62/+59
R=ken OCL=29651 CL=29653
2009-05-28print uint64 as uint64.Russ Cox1-1/+4
R=ken OCL=29568 CL=29570
2009-05-27bug 153Ken Thompson1-1/+6
R=r OCL=29479 CL=29479
2009-05-27string([]int) conversionKen Thompson1-1/+19
R=r OCL=29466 CL=29466
2009-05-268g: 64-bit arithmetic and assorted bug fixes;Russ Cox1-0/+29
can run 64-bit sieve and powser. interfaces are limping along. next hurdle is floating point. R=ken OCL=29418 CL=29423
2009-05-26bug 152Ken Thompson1-11/+20
R=r OCL=29419 CL=29419
2009-05-26bug 151Ken Thompson1-6/+15
R=r OCL=29409 CL=29409
2009-05-26bug 150Ken Thompson1-38/+45
R=r OCL=29405 CL=29405
2009-05-231. check for dups in complex literalsKen Thompson1-46/+156
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-21enforce channel directionRuss Cox1-11/+40
R=ken OCL=29209 CL=29216
2009-05-21some array init bugsKen Thompson1-3/+6
renamed 6g/(gen|align|obj).c R=r OCL=29205 CL=29205
2009-05-21stricter rules for assignment.Russ Cox1-1/+46
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-21added key:val extension toKen Thompson1-28/+84
structure and array literals R=r OCL=29190 CL=29190
2009-05-20stricter interface conversion rule: i.(T)Russ Cox1-1/+6
must have non-nil i. R=ken OCL=29136 CL=29136
2009-05-20ifaceop was being called with integersRuss Cox1-14/+29
that came from two different enums. spilt into ifacecvt and ifaceop depending on which enum the argument is. R=ken OCL=29122 CL=29122
2009-05-20change representation of interface values.Russ Cox1-16/+101
this is not a user-visible change. before, all interface values were struct Itype { Sigt *type; Sigi *inter; void *method[n]; } struct Iface { void *addr; Itype *itype; } the itype is basically a vtable, but it's unnecessary if the static type is interface{ }. for interface values with static type empty, the new representation is struct Eface { void *addr; Sigt *type; } this complicates the code somewhat, but it reduces the number of Itypes that have to be computed and cached, it opens up opportunities to avoid function calls in a few common cases, and it will make it possible to lay out interface{} values at compile time, which i think i'll need for the new reflection. R=ken OCL=28701 CL=29121
2009-05-20fix implicit star for range on *map, *[].Russ Cox1-7/+11
do not update lineno from ONAME nodes, because they have declaration lineno not use. show actual name in top-level statement error. before runtime.a:7: x.go:5: walkstate: NAME not a top level statement after x.go:14: walkstate: runtime.Goexit not a top level statement R=ken OCL=29113 CL=29116
2009-05-18static initialization of slicesKen Thompson1-0/+4
R=r OCL=29016 CL=29016
2009-05-17static initialization with DATA statementsKen Thompson1-29/+30
structs and arrays are done slices and maps are yet to do R=r OCL=28977 CL=28977
2009-05-14fix spelling error in messageRob Pike1-1/+1
R=ken OCL=28814 CL=28814
2009-05-086g:Russ Cox1-9/+2
new type equality restrictions better handling of renamed packages "sys" is no longer available to programs R=ken OCL=28553 CL=28578
2009-05-08eqtype(t1, t2, 0) => eqtype(t1, t2)Russ Cox1-16/+16
R=ken OCL=28559 CL=28562
2009-05-07if a struct s contains an anonymous interface valueRuss Cox1-2/+5
with method m, s.m() is ok and m now shows up in s's method set for interface runtime. see http://cl/28419-p2 for new test interface10.go. R=ken OCL=28420 CL=28423
2009-05-076g: error messagesRuss Cox1-5/+61
replace "shape error across CALL" with more information. x.go:7: not enough arguments to CALL a int, b int int x.go:10: assignment count mismatch: 3 = 2 x.go:12: too many arguments to RETURN [no arguments expected] int, int, int also leave type alone after conversion failure, for later errors: bug049.go:6: cannot convert nil constant to string bug049.go:6: illegal types for operand: EQ string nil # this used to be blank R=ken OCL=28405 CL=28407
2009-05-066g: new interface rules (code got simpler!)Russ Cox1-8/+8
R=ken OCL=28374 CL=28378
2009-04-30bug146: array/slice conversion before I left missed conversionsRuss Cox1-27/+10
R=ken OCL=28120 CL=28124
2009-04-24recognize a defined constantKen Thompson1-2/+19
as a new name in a later declaration (bug 144) R=r OCL=27850 CL=27850
2009-04-212 minor bugs.Ken Thompson1-2/+2
lv context for some [] operations calling implicit(*map) before walk. R=r OCL=27706 CL=27706