summaryrefslogtreecommitdiff
path: root/src/cmd/gc/dcl.c
AgeCommit message (Collapse)AuthorFilesLines
2009-07-31checkpoint; still plenty to clean upRuss Cox1-1/+1
R=ken OCL=32576 CL=32580
2009-07-30typechecking checkpoint.Russ Cox1-9/+9
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-29convert walkexpr to take Node**; drop indirRuss Cox1-13/+13
R=ken OCL=32421 CL=32421
2009-07-28make every func literal expression allocate,Russ Cox1-68/+60
so that == on func means that the functions originated in the same execution of a func literal or definition. before, there was an inconsistency: func() {x++} != func() {x++} but func() {} == func() {} this CL makes the second case != too, just like make(map[int]int) != make(map[int]int) R=r DELTA=202 (71 added, 62 deleted, 69 changed) OCL=32393 CL=32398
2009-07-27do not insert implicit "return;" in empty function bodyRuss Cox1-1/+1
R=ken OCL=32239 CL=32239
2009-07-17another baby step.Russ Cox1-6/+18
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-39/+58
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-225/+163
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-74/+82
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-34/+42
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-10segfaultKen Thompson1-1/+2
R=rsc OCL=31467 CL=31467
2009-07-08another nil referenceKen Thompson1-0/+2
R=rsc OCL=31373 CL=31373
2009-07-07bug167Russ Cox1-2/+3
R=ken OCL=31295 CL=31295
2009-07-06another piece for cross-file forward struct declarations.Russ Cox1-1/+14
R=ken OCL=31233 CL=31233
2009-06-29allow forward declaration of struct in another fileRuss Cox1-12/+13
(in the same package). allow forward method declaration to be satisfied by implementation in another file (in the same package). all methods must be declared in the same file as the receiver type. R=ken OCL=30864 CL=30869
2009-06-25bug165Russ Cox1-0/+11
R=ken OCL=30783 CL=30783
2009-06-25package mainRuss Cox1-2/+11
const foo = []int{1,2} x.go:3: expression must be a constant instead of x.go:3: fatal error: gettype: addtop R=ken OCL=30767 CL=30767
2009-06-25package mainRuss Cox1-1/+1
func foo(y) { } was: x.go:2: NONAME-y G0 u(1) a(1) l(77) x(-1000000000) is not a type now: x.go:2: y is not a type R=ken OCL=30764 CL=30764
2009-06-246g crash re mail from gri jun 18.Ken Thompson1-1/+1
R=r OCL=30719 CL=30719
2009-06-15b/1909731Russ Cox1-0/+2
package main func f(a *c.b) {} func main() {} BUG=1909731 R=ken OCL=30322 CL=30322
2009-06-06gc: grammar cleanup:Russ Cox1-70/+145
* no longer distinguishes const, var, type, package names. * all the predefined names are not tokens anymore. R=ken OCL=29326 CL=29985
2009-06-04bug161, fixedRuss Cox1-0/+6
R=ken OCL=29907 CL=29907
2009-05-28detect recursive initializationKen Thompson1-23/+45
R=r OCL=29544 CL=29544
2009-05-27clean up gmove:Russ Cox1-1/+1
* conversions all in one place. * no separate load, store phases; direct memory addressing when possible (this is the x86 after all!). avoids extra registers, extra MOVQs. * fixes int32 -> uint64 bug (was zero-extending) R=ken OCL=29482 CL=29484
2009-05-268g: 64-bit arithmetic and assorted bug fixes;Russ Cox1-2/+2
can run 64-bit sieve and powser. interfaces are limping along. next hurdle is floating point. R=ken OCL=29418 CL=29423
2009-05-22simplifying grammar: delete LBASETYPE and LACONST.Russ Cox1-4/+12
take 2 R=ken OCL=29304 CL=29306
2009-05-22Automated g4 rollback of changelist 29302.Russ Cox1-12/+4
*** Reason for rollback *** too many files included *** Original change description *** simplifying grammar: delete LBASETYPE and LACONST R=ken OCL=29303 CL=29303
2009-05-22simplifying grammar: delete LBASETYPE and LACONSTRuss Cox1-4/+12
R=ken OCL=29300 CL=29302
2009-05-21added key:val extension toKen Thompson1-232/+0
structure and array literals R=r OCL=29190 CL=29190
2009-05-18static initialization of slicesKen Thompson1-22/+66
R=r OCL=29016 CL=29016
2009-05-17static initialization with DATA statementsKen Thompson1-1/+189
structs and arrays are done slices and maps are yet to do R=r OCL=28977 CL=28977
2009-05-16static initializationKen Thompson1-0/+2
structure set up - no change yet R=r OCL=28966 CL=28966
2009-05-086g:Russ Cox1-3/+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-3/+3
R=ken OCL=28559 CL=28562
2009-05-07if a struct s contains an anonymous interface valueRuss Cox1-4/+25
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/+14
part 2; missing files R=ken OCL=28408 CL=28410
2009-05-066g: new interface rules (code got simpler!)Russ Cox1-2/+1
R=ken OCL=28374 CL=28378
2009-05-056g tweaksRuss Cox1-3/+7
* byteastring is no longer used * do not generate ODCL, OAS for globals (wasn't generating any code but might save one or two init functions) * do not call self from Init function R=ken OCL=28309 CL=28309
2009-05-01code optmizationKen Thompson1-0/+37
drip init function if it doesnt do anything R=r OCL=28180 CL=28180
2009-04-09change representation of stringsKen Thompson1-1/+1
R=r OCL=27293 CL=27293
2009-04-02type n t;Russ Cox1-2/+12
was copying a bit too much about t into n, like whether the signature was queued to be printed. (bug reported by anton) was also editing t, meaning you could do type T int; func (p int) Meth() { } both fixed. R=ken OCL=27052 CL=27052
2009-04-02use _f007·filename for func literals.Russ Cox1-1/+1
this avoids problems people have run into with multiple closures in the same package. when preparing filename, only cut off .go, not .anything. this fixes a bug tgs ran into with foo.pb.go and foo.go in the same package. also turn bad identifier chars from filename into underscores: a-b.pb.go => a_b_pb R=ken OCL=27050 CL=27050
2009-03-30fix http://b/1748082Russ Cox1-0/+6
package main var f = func(a, b int) int { return a + b } R=ken OCL=26935 CL=26935
2009-03-30closure bug: carry along outnamed flag.Russ Cox1-0/+1
R=ken OCL=26930 CL=26930
2009-03-30don't crash onRuss Cox1-0/+1
unsafe.Alignof(struct{x float}{0}.x) R=ken OCL=26911 CL=26913
2009-03-12make 6g constants behave as ken proposes. (i hope.)Russ Cox1-5/+15
various bug fixes and tests involving constants. test/const1.go is the major new test case. R=ken OCL=26216 CL=26224
2009-02-17fix unsafe.Sizeof("abc")Ken Thompson1-5/+13
R=rsc OCL=25105 CL=25105
2009-02-16embedded interface types in interfaces.Russ Cox1-3/+33
R=ken OCL=25072 CL=25072
2009-02-10Implement unsafe.Alignof.Ian Lance Taylor1-1/+18
R=ken DELTA=20 (19 added, 0 deleted, 1 changed) OCL=24719 CL=24771
2009-02-07unsafe.Sizeof and unsafe.OffsetofKen Thompson1-0/+51
R=r OCL=24639 CL=24639