summaryrefslogtreecommitdiff
path: root/src/cmd
AgeCommit message (Collapse)AuthorFilesLines
2009-07-27named string type bugsRuss Cox1-5/+13
R=ken OCL=32244 CL=32244
2009-07-27catchRuss Cox1-3/+9
a := true; a |= a; in the front end. R=ken OCL=32240 CL=32243
2009-07-27do not insert implicit "return;" in empty function bodyRuss Cox2-2/+2
R=ken OCL=32239 CL=32239
2009-07-21a little more 6l cleanupRuss Cox1-36/+26
R=r DELTA=51 (14 added, 24 deleted, 13 changed) OCL=31968 CL=31971
2009-07-21do not use ONONAMEs for line number information,Russ Cox1-0/+1
just like ONAME etc. R=ken OCL=31964 CL=31964
2009-07-21add a .interp section and fix vaddr in INTERP prog.Rob Pike1-7/+13
R=rsc DELTA=16 (9 added, 3 deleted, 4 changed) OCL=31956 CL=31963
2009-07-21make 6l produce dynamically linked binaries (although they are fully ↵Rob Pike5-56/+336
statically linked as far as go is concerned). the -d flag is now flipped; as on the mac, -d disables dynamic. much remains to be improved to move the output closer to the gcc format. R=rsc DELTA=366 (310 added, 30 deleted, 26 changed) OCL=31929 CL=31951
2009-07-20fix cut-and-paste bugs in error messagesRuss Cox1-5/+6
R=ken OCL=31890 CL=31890
2009-07-20avoid strncat in formatters.Russ Cox1-94/+55
the n argument to strncat is the maximum number of bytes to read from the src, not the total size of the destination. R=ken OCL=31871 CL=31875
2009-07-20explain selectsend problemRuss Cox1-1/+4
R=ken OCL=31865 CL=31867
2009-07-206l cleanup: last set of magic numbers for elf64 moved to ld/elf64*.Rob Pike4-47/+40
R=rsc DELTA=68 (21 added, 28 deleted, 19 changed) OCL=31857 CL=31864
2009-07-20clean up generation of exec header.Rob Pike5-91/+121
make endianness explicit when writing values. R=rsc DELTA=129 (37 added, 7 deleted, 85 changed) OCL=31826 CL=31854
2009-07-17take care of a few more magic numbersRob Pike2-22/+63
R=rsc DELTA=51 (41 added, 0 deleted, 10 changed) OCL=31815 CL=31818
2009-07-17count SHdrs and PHdrs and write them out as a unitRob Pike3-80/+110
R=rsc DELTA=181 (93 added, 63 deleted, 25 changed) OCL=31802 CL=31812
2009-07-17more elf64 support: phdrs, constantsRob Pike3-60/+122
R=rsc DELTA=130 (68 added, 6 deleted, 56 changed) OCL=31798 CL=31798
2009-07-17another baby step.Russ Cox4-68/+70
excluding import data, no yacc node has type Type* anymore. 0 reduce/reduce conflicts. R=ken OCL=31793 CL=31795
2009-07-17First steps towards cleaner support for ELF64 in 6l.Rob Pike7-172/+265
R=rsc DELTA=337 (165 added, 119 deleted, 53 changed) OCL=31786 CL=31794
2009-07-17baby step: const decls can refer to futureRuss Cox10-152/+364
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 Cox16-1916/+1763
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-16ast:Robert Griesemer3-31/+80
- renamed Program -> SourceFile - added Package node representing the AST for an entire package - added filter function to create a source file mimicking the interface of an entire package parser: - parser entry to parse entire packages - unified naming of parser entry points - factored out entry points into new file (interface.go) gofmt: - extended to accept single .go files, and package paths: gofmt file.go // formatting of a single file gofmt -x file.go // interface of a single file gofmt -x ./MyPackage // interface of a local package gofmt -x math // interface of a $GOROOT relative package Various adjustments in dependent files, documentation. R=rsc DELTA=634 (369 added, 153 deleted, 112 changed) OCL=31743 CL=31748
2009-07-14- removed TODO, minor adjustmentsRobert Griesemer1-9/+14
R=rsc DELTA=16 (6 added, 1 deleted, 9 changed) OCL=31638 CL=31641
2009-07-14update remaining files to match new scanner/parser interfaceRobert Griesemer4-34/+13
and use shared error handling infrastructure R=rsc DELTA=109 (3 added, 86 deleted, 20 changed) OCL=31600 CL=31605
2009-07-14dead codeRuss Cox1-20/+0
R=r DELTA=20 (0 added, 20 deleted, 0 changed) OCL=31584 CL=31598
2009-07-13step toward no function prototypes.Russ Cox5-227/+368
delay evaluation of most types (all but func) from parse time to type check time. R=ken OCL=31585 CL=31585
2009-07-13update 6g to new REGARG convention.Russ Cox1-2/+2
silence gcc warning. R=ken OCL=31583 CL=31583
2009-07-13bug148.Russ Cox1-1/+1
R=ken OCL=31582 CL=31582
2009-07-13added missing pieces required by reflectionKai Backman1-18/+40
R=rsc APPROVED=rsc DELTA=61 (40 added, 18 deleted, 3 changed) OCL=31502 CL=31580
2009-07-13tiny naming cleanupKai Backman1-17/+17
R=rsc APPROVED=rsc DELTA=17 (0 added, 0 deleted, 17 changed) OCL=31503 CL=31579
2009-07-13fix bug in codegen when we modified move instruction insteadKai Backman1-2/+1
of text. R=rsc APPROVED=rsc DELTA=3 (1 added, 2 deleted, 0 changed) OCL=31575 CL=31575
2009-07-13compilers were inconsistent aboutRuss Cox9-28/+30
whether no register argument was REGARG == 0 or REGARG < 0. use REGARG < 0 because arm needs 0 for R0. R=ken OCL=31562 CL=31566
2009-07-13fix undefined function error.Russ Cox3-12/+13
before: mainstart: undefined: main·init in mainstart mainstart: branch out of range in mainstart (95) CALL ,0(PC) [main·init] mainstart: undefined: main·main in mainstart mainstart: branch out of range in mainstart (97) CALL ,0(PC) [main·main] mainstart: doasm: notfound from=6f to=6f (95) CALL , mainstart: doasm: notfound from=6f to=6f (97) CALL , mainstart: doasm: notfound from=6f to=6f (95) CALL , mainstart: doasm: notfound from=6f to=6f (97) CALL , mainstart: doasm: notfound from=6f to=6f (95) CALL , mainstart: doasm: notfound from=6f to=6f (97) CALL , after: mainstart: undefined: main·init in mainstart mainstart: undefined: main·main in mainstart R=r DELTA=7 (1 added, 0 deleted, 6 changed) OCL=31555 CL=31555
2009-07-13ebnflint commandRobert Griesemer3-1/+145
- basic verification of EBNF grammars - tested with (and has testcase for) go_spec.html R=rsc DELTA=150 (148 added, 0 deleted, 2 changed) OCL=31481 CL=31517
2009-07-12fixed typo where output arguments where pushed on to R0Kai Backman1-10/+6
instead of SP. R=rsc APPROVED=rsc DELTA=13 (3 added, 7 deleted, 3 changed) OCL=31488 CL=31501
2009-07-10cleanup in preparation for new scoping.Russ Cox7-491/+409
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-10segfaultKen Thompson1-1/+2
R=rsc OCL=31467 CL=31467
2009-07-10mention file name only once in error messageRobert Griesemer1-1/+1
R=r DELTA=1 (0 added, 0 deleted, 1 changed) OCL=31450 CL=31452
2009-07-09Show BUG comments in godoc:Robert Griesemer1-1/+1
ast.go: - rename Comments -> CommentGroup (less confusion) - change all comments/docs to be *CommentGroup filter.go: - do not remove unassociated comments from program as part of export filtering (they are needed by doc.go for BUG comments) scanner.go: - exclude '\n' from //-style comments parser.go: - rewrote collection of comments: now all collected comments are *ast.CommentGroups - clarified distinction between leading and trailing comments - fixed a bug in comment collection (parseGenDecl); corresponding test case is in printer/testdata - extra documentation doc.go: - collect BUG comments - corresponding fix for parser bug in comment collection comment.go: - simplified regex printer.go: - adjust comment printing to new representation printer_test.go, testdata/*: - enable printing of doc comments - extended tests package.html, package.txt: - added Bugs section gofmt: - enable printing of doc comments R=rsc DELTA=339 (126 added, 38 deleted, 175 changed) OCL=31403 CL=31416
2009-07-09bug168 (dsymonds) + fixRuss Cox1-9/+4
R=ken OCL=31399 CL=31399
2009-07-09segment faultKen Thompson1-0/+4
R=rsc OCL=31396 CL=31396
2009-07-08another nil referenceKen Thompson1-0/+2
R=rsc OCL=31373 CL=31373
2009-07-08ANY is already checked separately,Russ Cox2-19/+0
so remove code from go.y. show original types in badtype; don't remove pointers. not sure why this was here but it confuses things if the bad part involves two named pointer types with different names but the same pointed-at type. R=ken OCL=31369 CL=31369
2009-07-07the ld-supplied typestrings are now obsoleteRuss Cox7-167/+0
R=r DELTA=167 (0 added, 167 deleted, 0 changed) OCL=31304 CL=31316
2009-07-07method expansion bugsRuss Cox3-5/+9
R=ken OCL=31310 CL=31310
2009-07-07- ast.FilterExports: filter non-exported anonymous fieldsRobert Griesemer1-1/+1
- fixed typo in parser.go - removed test w/ syntax errors from gofmt test script R=rsc DELTA=25 (21 added, 0 deleted, 4 changed) OCL=31296 CL=31298
2009-07-07bug167Russ Cox2-3/+4
R=ken OCL=31295 CL=31295
2009-07-076g, 8g: generate data structures for new reflect interface (CL 31107)Russ Cox11-506/+808
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-07move 6c/pgen.c, 6c/pswt.c into ccRuss Cox16-1361/+152
and make 5c, 8c use them. centralizes reachability analysis and switch generation. now 8c doesn't have spurious warnings in pkg/runtime. R=ken OCL=31266 CL=31266
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