summaryrefslogtreecommitdiff
path: root/src/cmd/gc
AgeCommit message (Collapse)AuthorFilesLines
2009-07-07bug167Russ Cox1-2/+3
R=ken OCL=31295 CL=31295
2009-07-076g, 8g: generate data structures for new reflect interface (CL 31107)Russ Cox9-506/+727
R=ken OCL=31122 CL=31278
2009-07-07runtime: use new reflect data structures (CL 31107)Russ Cox1-11/+11
in place of sigi, sigt. R=ken OCL=31118 CL=31277
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-06shift typechecking bugsRuss Cox2-5/+12
x << "a" 1 << int(2) R=ken OCL=31244 CL=31244
2009-07-06various 6g cleanup:Russ Cox3-28/+74
* give genwrapper and genembedtramp the same signature. * move duint8, duint16, duint32, duint64, duintptr into gc. * tidy genwrapper. * bug involving struct field symbols in signature list. (hash-order dependent so hard to trigger) * new Type print format %#-T like %#T but omits names on function arguments. R=ken OCL=31237 CL=31237
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-06another piece for cross-file forward struct declarations.Russ Cox1-1/+14
R=ken OCL=31233 CL=31233
2009-07-06fix bug involving typed nil constants:Russ Cox1-1/+1
interface = (*int)(nil) is not the same as interface = nil. package main func main() { var x interface{} = (*int)(nil); println(x.(*int)); } R=ken OCL=31232 CL=31232
2009-07-06fix forward struct declarationsRuss Cox1-1/+0
R=ken OCL=31230 CL=31230
2009-07-06allow conversion to interface typeRuss Cox2-3/+10
when implicit assignment would have been okay. R=ken OCL=31225 CL=31227
2009-07-06more precise error messageRuss Cox2-2/+12
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-07-04another seg faultKen Thompson1-1/+2
R=r OCL=31156 CL=31156
2009-07-03bug163Russ Cox1-1/+1
R=ken OCL=31149 CL=31149
2009-07-03maps have == so maps are okay as map keys.Russ Cox2-9/+7
alignment issue is fixed. R=ken OCL=31124 CL=31144
2009-06-30change alignment rules: roll receiver intoRuss Cox1-2/+2
input parameters, move output parameters into their own struct. R=ken OCL=30954 CL=30966
2009-06-29bug163 bug164 bug166Russ Cox2-5/+9
R=ken OCL=30889 CL=30889
2009-06-29allow forward declaration of struct in another fileRuss Cox3-22/+51
(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 Cox3-2/+26
R=ken OCL=30783 CL=30783
2009-06-25separate local path lookup from standard package directoriesRuss Cox1-10/+26
R=ken OCL=30760 CL=30779
2009-06-25allowRuss Cox1-1/+1
package main type t interface type t interface{ m(map[t]bool) } type m map[t] int making it work without the forward declaration will require a second pass. R=ken OCL=30773 CL=30773
2009-06-25the any fix was too aggressive; allow any in any import.Russ Cox1-3/+6
R=ken OCL=30768 CL=30768
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-25better error; clean up lineno in a few placesRuss Cox3-15/+24
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-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-25disable "any" except during canned imports.Russ Cox2-1/+14
new flag -A enables it during mkbuiltin. avoids mysterious errors in programs that refer to any accidentally. R=ken OCL=30763 CL=30763
2009-06-256g: update for spec change CL 30586Russ Cox1-9/+5
R=ken OCL=30593 CL=30756
2009-06-246g crash re mail from gri jun 18.Ken Thompson1-1/+1
R=r OCL=30719 CL=30719
2009-06-23fix a 6g crash after type errors.Russ Cox5-8/+24
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 Cox2-17/+47
R=ken OCL=30519 CL=30534
2009-06-18better diagnostics for eof in a string.Ken Thompson1-6/+16
this assumes that embedded newlines are legal in back-quote strings. R=r OCL=30502 CL=30502
2009-06-15b/1909731Russ Cox2-0/+7
package main func f(a *c.b) {} func main() {} BUG=1909731 R=ken OCL=30322 CL=30322
2009-06-06implement optional semicolons with help from the lexer,Russ Cox3-284/+179
instead of having to double the type and statement grammars. R=ken OCL=29987 CL=29998
2009-06-06gc: grammar cleanup:Russ Cox9-858/+827
* no longer distinguishes const, var, type, package names. * all the predefined names are not tokens anymore. R=ken OCL=29326 CL=29985
2009-06-05more build refinements:Russ Cox1-4/+6
* use new Make.$GOARCH files in gobuild. * rename 6ar to arch-generic gopack. * place objects in $GOROOT/pkg/$GOOS_$GOARCH (makes cross-compiling easier, and no one ever types these paths by hand anyway). R=r DELTA=29 (6 added, 8 deleted, 15 changed) OCL=29923 CL=29967
2009-06-05restructure makefiles, scripts to factor out O= logic.Russ Cox1-1/+8
remove a few hardcoded paths elsewhere too. R=r,gri DELTA=123 (44 added, 15 deleted, 64 changed) OCL=29914 CL=29945
2009-06-04bug161, fixedRuss Cox2-1/+7
R=ken OCL=29907 CL=29907
2009-06-04more 8g progress.Russ Cox2-3/+6
likely to go back to registers for most temporaries. most tests in lib pass. these fail: datafmt fmt go/scanner log reflect strconv template R=ken OCL=29896 CL=29898
2009-06-04fix handling of floating point zero constant 0p+0Russ Cox1-0/+3
R=r DELTA=25 (25 added, 0 deleted, 0 changed) OCL=29875 CL=29875
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 Cox3-4/+111
R=ken OCL=29806 CL=29808
2009-05-31prevent multiple similar errorsKen Thompson2-19/+35
in complex literals. side effect is fix of error in initializerr.go R=r OCL=29667 CL=29667
2009-05-30bug157Russ Cox3-166/+190
R=ken OCL=29651 CL=29653
2009-05-30bug 158Ken Thompson1-3/+11
R=r OCL=29646 CL=29646
2009-05-29bug 156Ken Thompson1-7/+2
R=r OCL=29623 CL=29623
2009-05-29bug 149Ken Thompson1-1/+4
R=r OCL=29612 CL=29612
2009-05-28print uint64 as uint64.Russ Cox3-1/+6
R=ken OCL=29568 CL=29570
2009-05-28detect recursive initializationKen Thompson4-25/+51
R=r OCL=29544 CL=29544
2009-05-28better 64-bit handling in 8g.Russ Cox1-1/+1
fewer moves, fewer stupid LEALs. powser1 runs (with evaln commented out). beginnings of floating point. R=ken OCL=29540 CL=29543