summaryrefslogtreecommitdiff
path: root/src/cmd/gc/subr.c
AgeCommit message (Collapse)AuthorFilesLines
2009-07-07method expansion bugsRuss Cox1-3/+4
R=ken OCL=31310 CL=31310
2009-07-076g, 8g: generate data structures for new reflect interface (CL 31107)Russ Cox1-58/+0
R=ken OCL=31122 CL=31278
2009-07-06various 6g cleanup:Russ Cox1-21/+31
* 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-06allow conversion to interface typeRuss Cox1-2/+2
when implicit assignment would have been okay. R=ken OCL=31225 CL=31227
2009-07-03maps have == so maps are okay as map keys.Russ Cox1-1/+1
alignment issue is fixed. R=ken OCL=31124 CL=31144
2009-06-25bug165Russ Cox1-2/+13
R=ken OCL=30783 CL=30783
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-25better error; clean up lineno in a few placesRuss Cox1-1/+8
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-23fix a 6g crash after type errors.Russ Cox1-1/+4
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-2/+21
R=ken OCL=30519 CL=30534
2009-06-06gc: grammar cleanup:Russ Cox1-24/+23
* 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-1/+1
R=ken OCL=29907 CL=29907
2009-06-04more 8g progress.Russ Cox1-2/+5
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-02minor cleanup, 64-bit /= and %= on 32-bitRuss Cox1-0/+92
R=ken OCL=29806 CL=29808
2009-05-27clean up gmove:Russ Cox1-1/+26
* 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-30/+34
can run 64-bit sieve and powser. interfaces are limping along. next hurdle is floating point. R=ken OCL=29418 CL=29423
2009-05-25static init reenabledKen Thompson1-0/+1
R=r OCL=29358 CL=29358
2009-05-231. check for dups in complex literalsKen Thompson1-1/+4
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-0/+7
R=ken OCL=29209 CL=29216
2009-05-20change representation of interface values.Russ Cox1-4/+4
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-18static initialization of slicesKen Thompson1-0/+14
R=r OCL=29016 CL=29016
2009-05-086g:Russ Cox1-19/+52
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-8/+14
R=ken OCL=28559 CL=28562
2009-05-07if a struct s contains an anonymous interface valueRuss Cox1-1/+17
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-066g: new interface rules (code got simpler!)Russ Cox1-119/+73
R=ken OCL=28374 CL=28378
2009-04-14tweak interface warning heuristic.Russ Cox1-1/+2
some day i will fix this for real. R=ken OCL=27468 CL=27468
2009-04-09change representation of stringsKen Thompson1-2/+2
R=r OCL=27293 CL=27293
2009-04-08yet another attempt at auto-linkingRuss Cox1-2/+2
store only the original import path string (+ .a) if 6g resolves it to an archive file. let 6l re-resolve the .a at link time. this lets libraries build against an archive in the current directory but get used against an installed archive. R=r OCL=27244 CL=27244
2009-04-02type n t;Russ Cox1-1/+1
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 separate lex buf for better errors:Russ Cox1-1/+1
package main func main() { func(){}() + + } x.go:2: syntax error near _f001 becomes x.go:2: syntax error near func R=ken OCL=27047 CL=27047
2009-03-30move portable object routines (especiallyRuss Cox1-96/+0
signature generation) into gc. R=ken OCL=26933 CL=26933
2009-03-30move some portable pieces of 6g/gsubr.c into gc/subr.cRuss Cox1-0/+240
int brcom(int); int brrev(int); void setmaxarg(Type*); Sig* lsort(Sig*, int(*)(Sig*, Sig*)); int dotoffset(Node*, int*, Node**); void stringpool(Node*); void tempname(Node*, Type*); R=ken OCL=26922 CL=26922
2009-03-24throw away most of the compat.h compatibility layerRuss Cox1-2/+2
in favor of the lib9 compatibility layer. no need for two. now that mycreate is gone, .6 files are 0644 not 0755. TBR=r OCL=26679 CL=26679
2009-03-17binary search on type switches.Ken Thompson1-8/+11
new feature 'case nil:' in type switch will match iff the interface is nil. R=r OCL=26404 CL=26404
2009-03-16change format of Sigt and SigiKen Thompson1-5/+0
to allow room for type hash needed for log-time type switch. R=r OCL=26354 CL=26354
2009-03-12make 6g constants behave as ken proposes. (i hope.)Russ Cox1-117/+40
various bug fixes and tests involving constants. test/const1.go is the major new test case. R=ken OCL=26216 CL=26224
2009-03-12chan flags close/closed installedKen Thompson1-0/+2
runtime not finished. R=r OCL=26217 CL=26217
2009-03-11added bitclear operators &^ and &^=Ken Thompson1-0/+1
R=r OCL=26152 CL=26152
2009-03-11complain when trying to put T into an interfaceRuss Cox1-3/+14
if T has pointer methods. this is just a heuristic but it catches the problem robert ran into and lets me put the larger interface issues aside for now. found one bug in pretty. R=ken OCL=26141 CL=26141
2009-03-061. type switchesKen Thompson1-0/+1
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-5/+8
in preparation of type switch. no functional change (yet). R=r OCL=25784 CL=25788
2009-03-04reject invalid map key types at compile timeRuss Cox1-0/+19
R=ken OCL=25720 CL=25720
2009-03-03back to T{x}, stricter handling of T(x) vs x.(T)Russ Cox1-2/+2
R=ken DELTA=131 (60 added, 41 deleted, 30 changed) OCL=25617 CL=25633
2009-02-13add composite literal ( ) syntax.Russ Cox1-2/+3
warn about composite literal { } syntax. R=ken OCL=25018 CL=25023
2009-02-11require type assertions when narrowing.Russ Cox1-14/+59
R=ken OCL=24350 CL=24914
2009-02-06closures - 6g supportRuss Cox1-0/+13
R=ken OCL=24501 CL=24566
2009-02-05bug064Russ Cox1-0/+19
make f(g()) work when g returns multiple args with names different than f expects. func swap(a, b int) (c, d int) { return b, a } swap(swap(1,2)) R=ken OCL=24474 CL=24476
2009-02-05allow methods on funcs.Russ Cox1-0/+1
R=ken OCL=24442 CL=24442
2009-02-04fix interface not satisifed message:Russ Cox1-1/+1
x.go:13: T is not I - missing M() NOT x.go:13: T is not I - missing Mfunc() R=ken OCL=24316 CL=24316
2009-01-30update compiler to new func rulesRuss Cox1-3/+6
R=ken OCL=23958 CL=23961