summaryrefslogtreecommitdiff
path: root/src/cmd/gc/swt.c
AgeCommit message (Collapse)AuthorFilesLines
2015-01-15Imported Upstream version 1.4upstream/1.4Tianon Gravi1-0/+1
2014-06-19Imported Upstream version 1.3upstream/1.3Michael Stapelberg1-1/+1
2013-12-03Imported Upstream version 1.2upstream/1.2Michael Stapelberg1-3/+6
2013-05-14Imported Upstream version 1.1upstream/1.1Michael Stapelberg1-0/+6
2013-03-04Imported Upstream version 1.1~hg20130304upstream/1.1_hg20130304Michael Stapelberg1-11/+26
2012-04-06Imported Upstream version 1upstream/1Ondřej Surý1-18/+45
2011-09-13Imported Upstream version 60upstream/60Ondřej Surý1-0/+896
2011-09-13Imported Upstream version 60Ondřej Surý1-896/+0
2011-06-30Imported Upstream version 58upstream/58Ondřej Surý1-1/+4
2011-04-28Imported Upstream version 2011.04.27upstream/2011.04.27Ondřej Surý1-3/+1
2010-06-28compiler fatal error in switch.Ken Thompson1-5/+6
fixes issue 867. R=rsc CC=golang-dev http://codereview.appspot.com/1691045
2010-06-14gc: no more ...Russ Cox1-16/+8
various cleanup, deleting unused code R=ken2 CC=golang-dev http://codereview.appspot.com/1663041
2010-01-25runtime, type switch: eliminate package global name space assumptionRuss Cox1-66/+97
bonus: type switch now detects multiple uses of identical interface types. bonus: interface types are now order-independent, following the spec. R=ken2 CC=golang-dev http://codereview.appspot.com/194053
2009-11-08bug212, bug213.Russ Cox1-3/+7
R=ken http://go/go-review/1026032
2009-10-12sort errors by line numberRuss Cox1-6/+2
turn off testdclstack and "not used" errors when there are syntax errors. BUG=2181825 R=ken OCL=35606 CL=35608
2009-09-21ideal bools and related fixesRuss Cox1-1/+1
R=ken OCL=34859 CL=34865
2009-09-09update type switch to match spec.Russ Cox1-19/+61
R=ken OCL=34471 CL=34471
2009-09-02the last bug involving type hashesRuss Cox1-1/+1
R=ken OCL=34244 CL=34249
2009-09-01type switch bug involving function parameter namesRuss Cox1-2/+2
R=ken OCL=34232 CL=34232
2009-08-04type checking of assignments, switch, if, forRuss Cox1-121/+62
R=ken OCL=32716 CL=32720
2009-07-31checkpoint; still plenty to clean upRuss Cox1-3/+3
R=ken OCL=32576 CL=32580
2009-07-30typechecking checkpoint.Russ Cox1-3/+18
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-3/+3
R=ken OCL=32421 CL=32421
2009-07-17baby step: const decls can refer to futureRuss Cox1-9/+19
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-131/+121
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-10cleanup in preparation for new scoping.Russ Cox1-8/+8
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-06insert ODCL in type switch case.Russ Cox1-2/+4
needed for heap allocation if variable escapes. package main func main(){ var i interface{} = 42; switch v := i.(type) { case int: println(&v, v); } } R=ken OCL=31245 CL=31245
2009-07-06more precise error messageRuss Cox1-1/+1
package main func main() { var x interface {} = 42; switch x := x.(type) { case int: case foo: } } before: x.go:7: non-type case in type switch x.go:7: inappropriate case for a type switch now: x.go:7: foo: undefined R=ken OCL=31221 CL=31221
2009-07-06better error message + line numbersRuss Cox1-4/+10
package main func main() { var x interface{}; switch x { case 41: case "b": } } before: x.go:5: fatal error: exprcmp now: x.go:5: illegal types for operand: EQ interface { } int x.go:6: illegal types for operand: EQ interface { } string R=ken OCL=31217 CL=31219
2009-05-30bug157Russ Cox1-59/+45
R=ken OCL=29651 CL=29653
2009-05-30bug 158Ken Thompson1-3/+11
R=r OCL=29646 CL=29646
2009-05-20change representation of interface values.Russ Cox1-2/+7
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-04-02compiler falut for forgettingKen Thompson1-0/+7
the assignment on a type switch R=r OCL=27048 CL=27048
2009-04-01typeswitch - expression evaluatedKen Thompson1-1/+1
twice instead of once. R=r OCL=27015 CL=27015
2009-03-22rewrote switchKen Thompson1-434/+524
fixed bug 141 R=r OCL=26627 CL=26627
2009-03-18remove assignment cases from switchKen Thompson1-57/+3
R=r OCL=26480 CL=26480
2009-03-17switch on false errorKen Thompson1-1/+1
R=r OCL=26434 CL=26434
2009-03-17binary search on type switches.Ken Thompson1-114/+231
new feature 'case nil:' in type switch will match iff the interface is nil. R=r OCL=26404 CL=26404
2009-03-12make 6g constants behave as ken proposes. (i hope.)Russ Cox1-16/+20
various bug fixes and tests involving constants. test/const1.go is the major new test case. R=ken OCL=26216 CL=26224
2009-03-10bug with interaction of variablesKen Thompson1-5/+26
declared in cases and heap allocation R=r OCL=26064 CL=26064
2009-03-07binary search for constant case statements.Ken Thompson1-3/+212
R=r OCL=25890 CL=25890
2009-03-061. type switchesKen Thompson1-48/+187
2. fixed fault on bug128 3. got rid of typeof 4. fixed bug in t,ok = I2T R=r OCL=25873 CL=25873
2009-03-05new switch implementationKen Thompson1-0/+333
in preparation of type switch. no functional change (yet). R=r OCL=25784 CL=25788