Commit Graph

3435 Commits

Author SHA1 Message Date
Russ Cox
f249c4114c basic DWARF reading.
R=r
DELTA=949  (949 added, 0 deleted, 0 changed)
OCL=34676
CL=34678
2009-09-15 21:58:45 -07:00
Russ Cox
aaaa1fc69b make 6g match spec:
no semicolon allowd after package clause.
	semicolon allowed after import statement.
	no doubled semicolons allowed

R=ken
OCL=34674
CL=34674
2009-09-15 17:29:08 -07:00
Robert Griesemer
4459624f04 bug fix: allow function types as operands
R=rsc
DELTA=10  (5 added, 0 deleted, 5 changed)
OCL=34662
CL=34666
2009-09-15 16:16:34 -07:00
Kai Backman
bcfc6e631f fixed register usage and removed some dead code.
R=rsc
APPROVED=rsc
DELTA=17  (0 added, 12 deleted, 5 changed)
OCL=34659
CL=34665
2009-09-15 16:15:17 -07:00
Kai Backman
ff196fbde7 patch in proper branch address in zaddr output
R=rsc
APPROVED=rsc
DELTA=12  (11 added, 1 deleted, 0 changed)
OCL=34658
CL=34664
2009-09-15 16:14:49 -07:00
Kai Backman
4c952153aa use register intermediate
R=rsc
APPROVED=rsc
DELTA=21  (7 added, 5 deleted, 9 changed)
OCL=34607
CL=34663
2009-09-15 16:12:47 -07:00
Rob Pike
01cadde597 Deriving functions from methods
DELTA=238  (118 added, 116 deleted, 4 changed)
OCL=34653
CL=34660
2009-09-15 15:56:44 -07:00
Russ Cox
1c9e4b358f declared and not used; this time for sure
R=ken
OCL=34657
CL=34657
2009-09-15 14:11:43 -07:00
Robert Griesemer
67ab1b9fae consider each case in a switch independent from the previous one for alignment purposes
R=rsc
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=34654
CL=34656
2009-09-15 13:53:10 -07:00
Russ Cox
98c98192ec final batch for "declared and not used"
* update mksyscall.sh and rebuild syscall/z*.go
 * fix a few linux-only files

R=r
DELTA=455  (12 added, 1 deleted, 442 changed)
OCL=34637
CL=34655
2009-09-15 13:51:33 -07:00
Robert Griesemer
9b5eb305e1 fix build: added missing files
TBR=rsc
DELTA=56  (56 added, 0 deleted, 0 changed)
OCL=34652
CL=34652
2009-09-15 13:33:16 -07:00
Robert Griesemer
7f25485fc6 go/printer:
- printing of expressions: put spaces only where "needed"
- printing of import statements: no double indentation if there are no renames
- print labels on separate lines
- added extra test files

go/ast:
- unified basic literal nodes and as a result deleted duplicated code
- added initial code to track scopes (not fully used yet)

replaces CL 34553

R=rsc
DELTA=881  (579 added, 223 deleted, 79 changed)
OCL=34623
CL=34651
2009-09-15 13:06:24 -07:00
Russ Cox
ae54cf73ca last round: non-package code
R=r
DELTA=127  (38 added, 3 deleted, 86 changed)
OCL=34640
CL=34650
2009-09-15 12:42:24 -07:00
Rob Pike
8cb9184d7f an attempt to define initialization order within a package.
DELTA=23  (19 added, 1 deleted, 3 changed)
OCL=34646
CL=34649
2009-09-15 11:56:39 -07:00
Rob Pike
678625d8df minutiae: pass 1
DELTA=174  (65 added, 10 deleted, 99 changed)
OCL=34625
CL=34639
2009-09-15 09:54:22 -07:00
Russ Cox
ca6a0fee1b more "declared and not used".
the last round omitted := range and only
checked 1 out of N vars in a multi-var :=

R=r
OCL=34624
CL=34638
2009-09-15 09:41:59 -07:00
Russ Cox
1a3198907b fix "declared and not used" in tests;
also template/template.go, missed last time.

R=r
DELTA=116  (61 added, 10 deleted, 45 changed)
OCL=34620
CL=34622
2009-09-14 21:03:53 -07:00
Russ Cox
59914723df declared and not used error, but disabled.
fix some bugs involving _.

R=ken
OCL=34621
CL=34621
2009-09-14 18:38:30 -07:00
Rob Pike
f3a33bca40 make SimpleStmt include EmptyStmt and the grammar simplifies a bit.
SimpleStmt was always used as an option.

fix bug: divide is a right shift

DELTA=8  (0 added, 0 deleted, 8 changed)
OCL=34612
CL=34614
2009-09-14 17:39:17 -07:00
Russ Cox
28eba4877b fix "declared and not used" errors in non-test code.
R=r
DELTA=112  (6 added, 57 deleted, 49 changed)
OCL=34610
CL=34610
2009-09-14 17:20:29 -07:00
Russ Cox
b198b994a1 do not crash on nil data value
R=r
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=34606
CL=34609
2009-09-14 16:46:48 -07:00
Russ Cox
c5a441ac70 do not crash printing the zero value for time.Time.
R=r
DELTA=2  (1 added, 0 deleted, 1 changed)
OCL=34605
CL=34608
2009-09-14 16:45:35 -07:00
Russ Cox
1a0860b93f make 5g, 8g build again by disabling init code.
R=ken
OCL=34604
CL=34604
2009-09-14 14:27:19 -07:00
Rob Pike
5e11bb259b add tests for the func()() case
R=gri
DELTA=12  (12 added, 0 deleted, 0 changed)
OCL=34601
CL=34601
2009-09-14 13:09:53 -07:00
Rob Pike
a5d6f8342c functions
R=rsc
DELTA=125  (103 added, 22 deleted, 0 changed)
OCL=34586
CL=34598
2009-09-14 10:40:44 -07:00
Nigel Tao
8a0cb9302f When decoding a paletted PNG, require that a PLTE chunk is seen before
the first IDAT chunk.

R=rsc
APPROVED=rsc
DELTA=7  (2 added, 0 deleted, 5 changed)
OCL=34583
CL=34585
2009-09-13 21:47:54 -07:00
Rob Pike
d3013d8aa1 Add and AddByte
R=rsc
DELTA=83  (83 added, 0 deleted, 0 changed)
OCL=34584
CL=34584
2009-09-13 21:35:18 -07:00
Rob Pike
61dd8363ba correct and clarify the rules about integer conversions.
DELTA=15  (6 added, 1 deleted, 8 changed)
OCL=34549
CL=34564
2009-09-11 11:51:00 -07:00
Nigel Tao
70eef675d5 PNG decoder for go.
R=rsc
APPROVED=r
DELTA=694  (675 added, 3 deleted, 16 changed)
OCL=34427
CL=34554
2009-09-10 21:33:44 -07:00
Robert Griesemer
1f11578614 fix build
TBR=rsc
OCL=34550
CL=34552
2009-09-10 18:26:14 -07:00
Russ Cox
2204cfddea fix bug206.
delay calls to savex as long as possible.

R=ken
OCL=34535
CL=34546
2009-09-10 17:33:01 -07:00
Ken Thompson
93b1dcbfcb minor changes
R=rsc
OCL=34545
CL=34545
2009-09-10 17:32:48 -07:00
Robert Griesemer
58c5e62f8b better gofmt formatting:
- first cut a better line breaks in expr lists
- trailing commas and semis printed where we tend to write them
- fixed a couple of minor spacing issues (interface{}, chan<-, map[x]y, x: y)
- removed some formatting flags from gofmt: no need to change default
- removed option to reverse declaration order when printing
- excluded files from test that cause trouble with idempotency test for now

R=rsc
DELTA=497  (364 added, 83 deleted, 50 changed)
OCL=34539
CL=34544
2009-09-10 17:27:06 -07:00
Russ Cox
fc90fb8c81 rename units -> units.txt.
add makefile rules to build a binary named units as a demo.

R=r
DELTA=1257  (659 added, 597 deleted, 1 changed)
OCL=34528
CL=34530
2009-09-10 14:47:10 -07:00
Russ Cox
8f2bf201d3 fix indentation
R=r
DELTA=166  (0 added, 0 deleted, 166 changed)
OCL=34521
CL=34527
2009-09-10 14:18:53 -07:00
Ken Thompson
61f27d3c22 sample goyacc program
R=rsc
OCL=34526
CL=34526
2009-09-10 13:53:35 -07:00
Russ Cox
757fe32fe7 fix bug206 output on different platforms
TBR=r
OCL=34524
CL=34524
2009-09-10 13:43:15 -07:00
Ken Thompson
a138b50ee1 goyacc command
written in (c-style) go
produces go source parser

R=rsc
OCL=34522
CL=34522
2009-09-10 13:19:46 -07:00
Rob Pike
c1342802dd gccgo does not yet implement _
OCL=34517
CL=34517
2009-09-10 10:47:11 -07:00
Robert Griesemer
82540ebdf0 bug206
R=rsc
DELTA=51  (51 added, 0 deleted, 0 changed)
OCL=34516
CL=34516
2009-09-10 10:30:36 -07:00
Robert Griesemer
4e56b33b42 - blank identifier
- fixed some links

DELTA=51  (32 added, 1 deleted, 18 changed)
OCL=34497
CL=34515
2009-09-10 10:14:00 -07:00
Ken Thompson
0631d65dc5 composit literal under
init function context.
also moved composit literal
code from walk.c to sinit.c

R=rsc
OCL=34503
CL=34503
2009-09-09 17:48:55 -07:00
Russ Cox
aa6e81dd71 a few more blank tests
R=ken
OCL=34500
CL=34500
2009-09-09 16:59:41 -07:00
Russ Cox
079e038aca exit with non-zero status for incompatible pointer type warnings
R=r
DELTA=9  (7 added, 0 deleted, 2 changed)
OCL=34499
CL=34499
2009-09-09 16:45:23 -07:00
Rob Pike
f966ba1df9 use the new type switch multicase to clean up a little.
R=rsc
DELTA=28  (7 added, 16 deleted, 5 changed)
OCL=34487
CL=34487
2009-09-09 10:32:26 -07:00
Russ Cox
f4ee9f133c check type of string/map/array index expressions
R=ken
OCL=34478
CL=34480
2009-09-09 01:31:10 -07:00
Russ Cox
83bdb805a2 error message fixes
x == nil
x.go:5: cannot use nil as bool

c := x.(type);
x.go:88: use of .(type) outside type switch

R=ken
OCL=34476
CL=34476
2009-09-09 01:21:20 -07:00
Russ Cox
e780fa8669 defining package block names must override
universe block names.

BUG=2097244
R=ken
OCL=34295
CL=34473
2009-09-09 01:01:39 -07:00
Russ Cox
5d16d23362 update type switch to match spec.
R=ken
OCL=34471
CL=34471
2009-09-09 00:18:16 -07:00
Russ Cox
5438be4541 write-only variable _
R=ken
OCL=34465
CL=34470
2009-09-08 23:16:19 -07:00