summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-04-02require ";" separator after function literalsRobert Griesemer1-0/+1
R=rsc DELTA=1 (1 added, 0 deleted, 0 changed) OCL=27057 CL=27059
2009-04-02- don't show methods of non-exported typesRobert Griesemer1-5/+7
(even if the methods are exported) R=rsc OCL=27056 CL=27056
2009-04-02- renamed hasPostfix -> hasSuffixRobert Griesemer2-3/+4
- fixed printing of function literals (require separating ";") R=rsc OCL=27055 CL=27055
2009-04-02- moved functions before types in doc output (per rsc)Robert Griesemer2-28/+50
- use /src and /doc prefix in URL to distinguish output type (per rsc) - fixed a bug in an internal string function - ignore files ending in _test.go (consider them test files) R=rsc OCL=27054 CL=27054
2009-04-02special case check for this situationRuss Cox1-0/+3
; cat >http.go package main import "http" // intended the library, not this file ^D ; 6g http.go ; 6g http.go http.go:4: export/package mismatch: init ; new error: http.6:7 http.go:3: cannot import package main R=ken OCL=27053 CL=27053
2009-04-02type n t;Russ Cox3-3/+14
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 _f007·filename for func literals.Russ Cox2-3/+11
this avoids problems people have run into with multiple closures in the same package. when preparing filename, only cut off .go, not .anything. this fixes a bug tgs ran into with foo.pb.go and foo.go in the same package. also turn bad identifier chars from filename into underscores: a-b.pb.go => a_b_pb R=ken OCL=27050 CL=27050
2009-04-02Daily snapshot:Robert Griesemer7-206/+282
first round of cleanups: - removed extra .html templates (reduced to one) - removed dependencies on various local files - minor fixes throughout Basic docserver is now operational: Automatically finds all (multi-file) packages under a root and serves either file or package documentation. R=r OCL=27049 CL=27049
2009-04-02compiler falut for forgettingKen Thompson1-0/+7
the assignment on a type switch R=r OCL=27048 CL=27048
2009-04-02use separate lex buf for better errors:Russ Cox3-13/+14
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-04-02turn gc of unused data/code back on in loaders.Russ Cox1-2/+2
turned it off while debugging 8 runtime problem, checked in the change accidentally. R=r DELTA=4 (0 added, 0 deleted, 4 changed) OCL=27040 CL=27046
2009-04-02implement some more 8gRuss Cox5-2/+158
package main func main() { println("hello,", 123); } R=ken OCL=27043 CL=27043
2009-04-02clarification suggested by robRuss Cox1-0/+4
R=r DELTA=4 (4 added, 0 deleted, 0 changed) OCL=26983 CL=27041
2009-04-02- adjustments for changed ASTRobert Griesemer7-255/+473
- renamed gds -> godoc - functionality to find and serve packages (to get a list of packages provide dir path + "?p") Next steps: cleanups, better formatting, fine-tuning of output R=r OCL=27037 CL=27039
2009-04-02- Ident node now takes a string Value instead of a []bytesRobert Griesemer2-11/+11
(this removes a lot of string() conversions down the road) - a few minor adjustments R=rsc DELTA=11 (0 added, 0 deleted, 11 changed) OCL=27029 CL=27038
2009-04-02Adjustements related to AST changes.Robert Griesemer2-122/+88
R=r OCL=27026 CL=27028
2009-04-02Some AST tuning:Robert Griesemer2-89/+89
- have explicit XSpec nodes for declarations - have a general GenDecl node instead of DeclList R=rsc DELTA=164 (52 added, 52 deleted, 60 changed) OCL=27005 CL=27027
2009-04-01Add a DeepEqual function to the reflect packageDaniel Nadasi3-1/+168
R=r,rsc APPROVED=rsc DELTA=167 (166 added, 0 deleted, 1 changed) OCL=26982 CL=27017
2009-04-01typeswitch - expression evaluatedKen Thompson1-1/+1
twice instead of once. R=r OCL=27015 CL=27015
2009-04-01use range in vector iteratorRob Pike1-2/+2
R=rsc DELTA=2 (0 added, 0 deleted, 2 changed) OCL=27003 CL=27003
2009-04-01More gds functionality:Robert Griesemer1-101/+200
- package headers - constants - variables - formatted comments Next steps: - sorted output - collection of all files belonging to a package - fine-tuning of output R=r OCL=26997 CL=26997
2009-04-01change smoketest from parser.go to astprinter.go,Russ Cox1-1/+1
the largest remaining source file in this directory. TBR=gri OCL=26984 CL=26984
2009-04-01fix runtime stack overflow bug that gri ran into:Russ Cox4-161/+231
160 - 75 was just barely not enough for deferproc + morestack. added enum names and bumped to 256 - 128. added explanation. changed a few mal() (garbage-collected) to malloc()/free() (manually collected). R=ken OCL=26981 CL=26981
2009-03-31Bail out of gotest immediately if compiling fails.David Symonds1-2/+2
R=rsc APPROVED=rsc DELTA=4 (2 added, 2 deleted, 0 changed) OCL=26978 CL=26978
2009-03-31- also associate factory methods to a type in documentationRobert Griesemer2-38/+69
R=r OCL=26974 CL=26976
2009-03-31test for and fix bug involving reflect v.Interface() and ==.Russ Cox3-7/+158
R=r DELTA=156 (149 added, 2 deleted, 5 changed) OCL=26973 CL=26973
2009-03-31daily snapshot:Robert Griesemer10-3622/+338
- adjustments to match new ast/parser interface - removed printer.go; functionality now in astprinter.go and docprinter.go (more cleanups pending) - enabled new doc printing in gds (lots of fine tuning missing, but pieces falling into place; e.g. methods associated with types. Consts, Vars, to come. Collection of all files belonging to a package to come) R=r OCL=26970 CL=26972
2009-03-311) Move parser.go into src/lib/goRobert Griesemer5-25/+2054
- minor adjustments as suggested by rsc 2) Added parser_test fragment 3) Renamed some types in AST.go per rsc request R=rsc DELTA=2053 (2027 added, 0 deleted, 26 changed) OCL=26963 CL=26971
2009-03-31more 386 runtime:Russ Cox11-12/+939
remove use of _subv in vlrt.c darwin/386/signal.c darwin/386/* linux/386/* (forgotten before) can run empty program on darwin/386 now. R=r DELTA=1140 (1021 added, 114 deleted, 5 changed) OCL=26942 CL=26968
2009-03-31multiple bugs in bitfield handlingRuss Cox1-3/+6
R=r DELTA=6 (3 added, 0 deleted, 3 changed) OCL=26944 CL=26967
2009-03-31- incorporation of suggestions by rscRobert Griesemer2-53/+68
R=rsc OCL=26959 CL=26959
2009-03-31minimal 8g. can compileRuss Cox6-0/+1231
package main func main() { } and not much else. R=ken OCL=26943 CL=26943
2009-03-31* move go-specific loader codeRuss Cox13-644/+692
into gc directory, where it gets included as ../gc/ldbody this is similar to the assemblers including ../cc/lexbody and ../cc/macbody. * hook go-specific loader code into 8l. * make current 8.out.h and 6.out.h backward compatible with plan 9's versions. i had added some constants in the middle of enums and have now moved them to the end. this keeps us from invalidating old .8 and .6 files. not sure how much it really matters, but easy to do. R=r DELTA=1314 (667 added, 623 deleted, 24 changed) OCL=26938 CL=26941
2009-03-31move tiny gsubr functions together at the top of the file.Russ Cox1-75/+75
delete unused mkenam file R=ken OCL=26940 CL=26940
2009-03-30Separate the alignment of a field from the alignment of theIan Lance Taylor1-38/+111
type of the field. Use the field alignment to compute the size of a structure. This may help 8g but is mainly for gccgo. gccgo maintains the standard C/C++ ABI for structure field alignment. For the i386, this requires that a float64 field in a struct be aligned on a 32-bit boundary, although for efficiency a variable of type float64 or []float64 should be aligned on a 64-bit boundary. I also removed the unused size field from structField. R=r DELTA=117 (75 added, 2 deleted, 40 changed) OCL=26842 CL=26936
2009-03-30fix http://b/1748082Russ Cox2-1/+8
package main var f = func(a, b int) int { return a + b } R=ken OCL=26935 CL=26935
2009-03-30fix build (moved decl to go.h earlierRuss Cox1-1/+0
and changed vlong to int64). R=ken OCL=26934 CL=26934
2009-03-30move portable object routines (especiallyRuss Cox10-808/+858
signature generation) into gc. R=ken OCL=26933 CL=26933
2009-03-30closure bug: carry along outnamed flag.Russ Cox1-0/+1
R=ken OCL=26930 CL=26930
2009-03-30move portable code generation (basic statements) to gc.Russ Cox9-601/+658
R=ken OCL=26929 CL=26929
2009-03-30log.Stderr should actually go to stderr.David Symonds1-1/+1
R=r APPROVED=r DELTA=1 (0 added, 0 deleted, 1 changed) OCL=26926 CL=26928
2009-03-30move some portable pieces of 6g/gsubr.c into gc/subr.cRuss Cox4-275/+272
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-30delete dregs: inarggen, genpanic, regretRuss Cox4-47/+0
R=ken OCL=26916 CL=26918
2009-03-30daily snapshot:Robert Griesemer5-73/+1660
- separating printing of AST and documentation - astprinter: will subsume ast printing functionality of printer - docprinter: will subsume doc printing functionality of printer also: more logic to collect all the documentation pertaining to all files of a package - parser: some cleanups, stricter syntax checks - gds: hooks to test new doc printer (disabled) R=r OCL=26915 CL=26915
2009-03-30move alignment calculations into gcRuss Cox7-391/+410
R=ken OCL=26914 CL=26914
2009-03-30don't crash onRuss Cox1-0/+1
unsafe.Alignof(struct{x float}{0}.x) R=ken OCL=26911 CL=26913
2009-03-30move bits.c from 6g to gcRuss Cox6-40/+63
R=ken OCL=26909 CL=26909
2009-03-30fix last 3 references to 'type guards'Rob Pike1-3/+3
R=gri DELTA=3 (0 added, 0 deleted, 3 changed) OCL=26908 CL=26908
2009-03-30tests changed - throw calls panic directly nowRuss Cox1-21/+7
instead of dereferencing nil, so no more SIGSEGVs. R=r DELTA=28 (0 added, 14 deleted, 14 changed) OCL=26881 CL=26881
2009-03-30new tool godefs.Russ Cox7-2/+1078
uses gcc to determine system header layouts and emits simple C or Go. see comment in main.c. R=r DELTA=1069 (1067 added, 0 deleted, 2 changed) OCL=26682 CL=26880