summaryrefslogtreecommitdiff
path: root/src/cmd/gc/dcl.c
AgeCommit message (Collapse)AuthorFilesLines
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-4/+16
2010-06-14gc: no more ...Russ Cox1-127/+8
various cleanup, deleting unused code R=ken2 CC=golang-dev http://codereview.appspot.com/1663041
2010-06-12gc: less aggressive name binding, for better line numbers in errorsRuss Cox1-20/+4
Cleans up a few other corner cases too. R=ken2 CC=golang-dev http://codereview.appspot.com/1592045
2010-06-08gc: new typechecking rulesRuss Cox1-7/+12
* 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 issue 840. Fixes issue 830. Fixes issue 778. R=ken2 CC=golang-dev http://codereview.appspot.com/1303042
2010-03-31gc: implement panic and recoverRuss Cox1-1/+13
R=ken2, r, ken3 CC=golang-dev http://codereview.appspot.com/831042
2010-02-18gc: fix this morning's bug fixRuss Cox1-1/+2
R=ken2 CC=golang-dev http://codereview.appspot.com/216043
2010-02-18gc: recursive interface embeddingRuss Cox1-17/+27
Fixes issue 287. R=ken2 CC=golang-dev http://codereview.appspot.com/215048
2010-02-01gc: bug250, bug251 - recursive interface typesRuss Cox1-1/+4
Fixes issue 287. R=ken2 CC=golang-dev http://codereview.appspot.com/199057
2010-02-01gc: ... T corner casesRuss Cox1-0/+1
more to come, but should suffice for Printf work. R=ken2 CC=golang-dev http://codereview.appspot.com/197044
2010-02-01gc: add ... T, rework plain ...Russ Cox1-1/+14
No longer a distinct type; now a property of func types. R=ken2 CC=golang-dev http://codereview.appspot.com/197042
2010-01-22eliminate the package global name space assumption in object filesRuss Cox1-10/+9
5g/6g/8g: add import statements to export metadata, mapping package path to package name. recognize "" as the path of the package in export metadata. use "" as the path of the package in object symbol names. 5c/6c/8c, 5a/6a/8a: rewrite leading . to "". so that ·Sin means Sin in this package. 5l/6l/8l: rewrite "" in symbol names as object files are read. gotest: handle new symbol names. gopack: handle new import lines in export metadata. Collectively, these changes eliminate the assumption of a global name space in the object file formats. Higher level pieces such as reflect and the computation of type hashes still depend on the assumption; we're not done yet. R=ken2, r, ken3 CC=golang-dev http://codereview.appspot.com/186263 Committer: Russ Cox <rsc@golang.org>
2010-01-19cleanup toward eliminating package global name spaceRuss Cox1-0/+1
* switch to real dot (.) instead of center dot (·) everywhere in object files. before it was half and half depending on where in the name it appeared. * in 6c/6a/etc identifiers, · can still be used but turns into . immediately. * in export metadata, replace package identifiers with quoted strings (still package names, not paths). R=ken2, r CC=golang-dev http://codereview.appspot.com/190076
2010-01-18gc: bug243Russ Cox1-1/+3
Fixes issue 481. R=ken2 CC=golang-dev http://codereview.appspot.com/186213
2010-01-18gc: more precise handling of import .Russ Cox1-3/+8
Fixes issue 455. R=ken2 CC=golang-dev http://codereview.appspot.com/186212
2009-12-18gc: method expressions on concrete typesRuss Cox1-2/+2
R=ken2 http://codereview.appspot.com/180092
2009-12-15gc: double-check usage of ...Russ Cox1-3/+7
Fixes issue 423. R=ken2 http://codereview.appspot.com/180045
2009-12-03gc: better diagnosis of initialization loopsRuss Cox1-0/+1
Fixes bug 292. R=ken2 http://codereview.appspot.com/164093
2009-11-15gc: five bug fixes, one better error.Russ Cox1-1/+17
* check for struct literal assignment to private fields. * record, fix crash involving parallel map assignment. * avoid infinite recursion in exportassignok. * make floating point bounds check precise. * avoid crash on invalid receiver. * add context to error about implicit assignment. Fixes issue 86. Fixes issue 88. Fixes issue 158. Fixes issue 174. Fixes issue 201. Fixes issue 204. R=ken2 http://codereview.appspot.com/154144
2009-11-01misc cleanupRuss Cox1-1/+1
R=r http://go/go-review/1016017
2009-10-196g bug fixes:Russ Cox1-5/+13
* bug211 * embedded interfaces with lowercase methods * var _ = f() at top level R=ken OCL=35898 CL=35898
2009-10-15rename sys functions to runtime,Russ Cox1-1/+1
because they are in package runtime. another step to enforcing package boundaries. R=r DELTA=732 (114 added, 93 deleted, 525 changed) OCL=35811 CL=35824
2009-10-12sort errors by line numberRuss Cox1-4/+2
turn off testdclstack and "not used" errors when there are syntax errors. BUG=2181825 R=ken OCL=35606 CL=35608
2009-10-08add & fix bug208, from ken.Russ Cox1-0/+8
fix bug198. R=ken OCL=35504 CL=35507
2009-10-07better handling of mistaken top-level variableRuss Cox1-2/+14
references during the parsing of :=. the base problem is that when reading a,b,c,d the parser makes those refer to existing variables, which might create a few stub top-level ones for undefined names, but then if a := is the next token, we need to undo those stubs. this was causing problems in multifile packages in which one file used a := variable named rpc and the other imported a package named rpc. R=ken OCL=35446 CL=35446
2009-09-29missing error checking related to ([...]int){...}Russ Cox1-1/+1
R=ken OCL=35132 CL=35132
2009-09-09a few more blank testsRuss Cox1-2/+2
R=ken OCL=34500 CL=34500
2009-09-09defining package block names must overrideRuss Cox1-8/+1
universe block names. BUG=2097244 R=ken OCL=34295 CL=34473
2009-09-08write-only variable _Russ Cox1-4/+8
R=ken OCL=34465 CL=34470
2009-08-24bug132Russ Cox1-1/+10
R=ken OCL=33792 CL=33803
2009-08-21fix bug195Russ Cox1-1/+1
R=ken OCL=33700 CL=33700
2009-08-19try to do better line number reportingRuss Cox1-22/+14
in the presence of yacc lookahead. better but still not perfect R=ken OCL=33541 CL=33541
2009-08-136g/6l: add go type information to symbol table.Russ Cox1-1/+4
archive size +70% binary size +30% old wreck.mtv=; ls -l /Users/rsc/bin/{godoc,gofmt} -rwxr-xr-x 1 rsc eng 1487922 Aug 13 13:21 /Users/rsc/bin/godoc -rwxr-xr-x 1 rsc eng 995995 Aug 13 13:21 /Users/rsc/bin/gofmt wreck.mtv=; du -sh $GOROOT/pkg/ 9.5M /home/rsc/go/pkg/ wreck.mtv=; new wreck.mtv=; ls -l /Users/rsc/bin/{godoc,gofmt} -rwxr-xr-x 1 rsc eng 2014390 Aug 13 14:25 /Users/rsc/bin/godoc -rwxr-xr-x 1 rsc eng 1268705 Aug 13 14:25 /Users/rsc/bin/gofmt wreck.mtv=; du -sh $GOROOT/pkg 16M /home/rsc/go/pkg wreck.mtv=; R=ken OCL=33217 CL=33220
2009-08-12delete code for forward type declarationsRuss Cox1-117/+4
R=ken OCL=33108 CL=33113
2009-08-12whole-package compilationRuss Cox1-10/+3
R=ken OCL=33063 CL=33095
2009-08-07bug181 - type T *struct { T } is an invalid embedded typeRuss Cox1-1/+3
R=ken OCL=32886 CL=32886
2009-08-07clean up a few error messages;Russ Cox1-1/+1
disable func redeclaration mismatch test; fix golden.out R=ken OCL=32883 CL=32883
2009-08-07forward declarations not necessary.Russ Cox1-400/+355
still to do: * initializer cycle detection * nicer error for type checking cycles R=ken OCL=32855 CL=32880
2009-08-05delay range processing. old2new is goneRuss Cox1-34/+27
R=ken OCL=32780 CL=32780
2009-08-05delay := processingRuss Cox1-0/+77
R=ken OCL=32772 CL=32772
2009-08-04make Syms smaller.Russ Cox1-224/+72
collapse a lot of duplication in dcl.c switch to NodeList* from Dcl* R=ken OCL=32770 CL=32770
2009-08-04move various bits of code aroundRuss Cox1-1205/+823
and delete some dead code. no actual changes here. R=ken OCL=32764 CL=32764
2009-08-04delayed evaluation of var blocksRuss Cox1-38/+57
R=ken OCL=32750 CL=32753
2009-08-03more 6g reorg; checkpoint.Russ Cox1-7/+21
typecheck.c is now responsible for all type checking except for assignment and function argument "..." R=ken OCL=32661 CL=32667
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