summaryrefslogtreecommitdiff
path: root/src/cmd/gc/subr.c
AgeCommit message (Collapse)AuthorFilesLines
2008-10-21stop looking for type names beginning with _.Russ Cox1-8/+5
they're gone. R=ken OCL=17569 CL=17569
2008-10-216g:Russ Cox1-6/+30
* print int as int, not P.int * write type info for non-exported types in its own new section. ar: skip over rest of line after $$ R=ken OCL=17568 CL=17568
2008-10-20fix compiler warningsRuss Cox1-1/+0
R=r DELTA=44 (10 added, 9 deleted, 25 changed) OCL=17502 CL=17502
2008-10-16diagnose various conversion problemsRuss Cox1-0/+46
R=ken OCL=17320 CL=17320
2008-10-15interface on arbitrary typesKen Thompson1-3/+84
global signatures for basic types R=r OCL=17238 CL=17240
2008-10-10until 6g implements it, warn about using int in interface.Russ Cox1-0/+4
R=ken OCL=16935 CL=16935
2008-10-08more interface checks:Russ Cox1-0/+4
- pointer to interface cannot have methods - record type names for better runtime error R=r,ken DELTA=85 (80 added, 0 deleted, 5 changed) OCL=16658 CL=16722
2008-10-06change type names to go live at the name, so thatRuss Cox1-1/+1
type T struct { next *T } and type T *struct { next T } are valid without needing forward declarations. add "type T struct" syntax for forward struct declarations. add "type T interface" syntax, but commented out (need to fix semicolons first) R=ken DELTA=452 (259 added, 115 deleted, 78 changed) OCL=16580 CL=16584
2008-10-04bug 026Ken Thompson1-2/+18
R=r OCL=16494 CL=16494
2008-10-03silence gcc warningsRuss Cox1-3/+0
R=ken OCL=16449 CL=16466
2008-10-03new import/export formatRuss Cox1-30/+74
package flag export type flag.Flag struct { name flag.string; usage flag.string; \ value flag.Value; next *flag.Flag } type flag.string string type flag.Value interface { AsBool () (? *flag.BoolValue); \ AsInt () (? *flag.IntValue); AsString () (? *flag.StringValue); \ IsBool () (? flag.bool); IsInt () (? flag.bool); IsString () (? flag.bool); \ Str () (? flag.string); ValidValue (str flag.string) (? flag.bool) } type flag.BoolValue struct { val flag.bool; p *flag.bool } type flag.IntValue struct { val flag.int64; p *flag.int64 } type flag.StringValue struct { val flag.string; p *flag.string } type flag.bool bool func (e *flag.StringValue) AsBool () (? *flag.BoolValue) func (e *flag.StringValue) AsInt () (? *flag.IntValue) ... the \ continuations are for this message, not real. changed delimiter for import from (( )) to $$ $$. replaced mksys.bash with mksys.c changed sys.go to use leading export, fake package name is now SYS not foop don't always require ; on forward func decls R=ken,r DELTA=1827 (446 added, 1083 deleted, 298 changed) OCL=16433 CL=16463
2008-10-03interfaces of all typesKen Thompson1-26/+14
R=r OCL=16462 CL=16462
2008-10-02more on arbitrary receiver typesKen Thompson1-9/+50
this CL passes the tests, but should be considered unstable R=r OCL=16390 CL=16390
2008-10-02added printn and panicnKen Thompson1-0/+2
prints that insert spaces and new line R=r OCL=16370 CL=16370
2008-09-30remove ( ) around mismatch type prints,Russ Cox1-2/+2
so that they don't look like functions. R=ken OCL=16244 CL=16244
2008-09-30pretty types; use 6g -t to disableRuss Cox1-5/+102
R=ken OCL=16240 CL=16242
2008-09-30fix up arg list parsing to handle any names:Russ Cox1-59/+33
type t1 int; type t2 int; type t3 int; func f1(t1, t2, t3); func f2(t1, t2, t3 bool); func f3(t1, t2, x t3); func f4(*t2, x t3); // error: cannot mix func f5(t1, *t3); func (x *t1) f6(y *[]t2) (t1, *t3); func f7() (int, *string); func f8(t1, *t2, x t3); // error: cannot mix func f9() (x int, *string); func f10(*t2, t3); R=ken OCL=16202 CL=16210
2008-09-28toward methods on any typeKen Thompson1-0/+22
R=r OCL=16068 CL=16068
2008-09-22remove extraneous printKen Thompson1-2/+2
R=r OCL=15666 CL=15666
2008-09-22now method/interface codeKen Thompson1-6/+52
R=r OCL=15627 CL=15627
2008-09-20bug103 - but the fix caused otherKen Thompson1-0/+14
things to break. hopefully all fixed now. R=r OCL=15597 CL=15597
2008-09-04rewriting bugsKen Thompson1-1/+0
R=r OCL=14810 CL=14810
2008-09-03map literalsKen Thompson1-0/+1
R=r OCL=14759 CL=14759
2008-09-03array literalsKen Thompson1-27/+6
R=r OCL=14756 CL=14756
2008-09-02structure literalsKen Thompson1-0/+17
R=r OCL=14735 CL=14735
2008-09-02bug in conv(string, bytearray)Ken Thompson1-5/+7
R=r OCL=14732 CL=14732
2008-08-28get rid of static/dynamic array distinctionKen Thompson1-25/+27
R=r OCL=14634 CL=14634
2008-08-27arraysKen Thompson1-14/+37
R=r OCL=14603 CL=14603
2008-08-12fixed bugs in const/caseKen Thompson1-1/+1
R=r DELTA=138 (75 added, 12 deleted, 51 changed) OCL=14129 CL=14131
2008-08-11export large constantsKen Thompson1-5/+1
R=r DELTA=37 (31 added, 4 deleted, 2 changed) OCL=14089 CL=14089
2008-08-08mp constantsKen Thompson1-12/+13
R=r DELTA=381 (142 added, 26 deleted, 213 changed) OCL=14011 CL=14016
2008-08-03add 'export' adjectives to externalKen Thompson1-1/+0
var, const and type declarations. R=r DELTA=49 (12 added, 28 deleted, 9 changed) OCL=13791 CL=13791
2008-08-03make 6a, 6c, 6g, 6l, libmach_amd64 build on 64-bit gcc.Russ Cox1-19/+19
these guys really really want long to be 32-bits, so ,s/long/int32/ (and then manual fixup). still passes all tests. (i started out looking for just those longs that needed to be int32 instead, and it was just too hard to track them down one by one.) the longs were rare enough that i don't think it will cause integration problems. R=ken OCL=13787 CL=13789
2008-07-25read selectKen Thompson1-0/+6
R=r APPROVED=r DELTA=120 (108 added, 0 deleted, 12 changed) OCL=13468 CL=13468
2008-07-24selectKen Thompson1-0/+1
R=r APPROVED=r DELTA=638 (433 added, 21 deleted, 184 changed) OCL=13426 CL=13438
2008-07-20start of selectKen Thompson1-0/+1
random bugs fixed SVN=128149
2008-07-17loop in subtypeKen Thompson1-7/+12
SVN=127933
2008-07-17div bugKen Thompson1-0/+1
[]ptr bug proc reuses old g* structures differnt assignment of offsets to parameters SVN=127888
2008-07-13chanKen Thompson1-0/+1
SVN=126959
2008-07-12more on channelsKen Thompson1-0/+1
arg space magic number for morestack SVN=126936
2008-07-03 a,b := fun()Ken Thompson1-2/+0
SVN=125998
2008-07-03new iotaKen Thompson1-0/+34
SVN=125984
2008-06-28more line numbersKen Thompson1-1/+7
SVN=125265
2008-06-27line numbersKen Thompson1-0/+2
SVN=125228
2008-06-26better line numbersKen Thompson1-19/+28
SVN=125018
2008-06-25autolib (#pragma lib)Ken Thompson1-3/+13
added to 6g to autoload the included import files. SVN=124759
2008-06-24bug miscalculating ullmanKen Thompson1-0/+2
in CALLMETH/DOTMETH SVN=124321
2008-06-21redeclarations of variables in the same block.Ken Thompson1-0/+2
half-step toward multivalued map indexing SVN=124019
2008-06-17more mapsKen Thompson1-0/+10
more semi-colons type assignment of constants SVN=123278
2008-06-17SVN=123250Ken Thompson1-0/+2