Kai Backman
6b0bd43fe4
fix code generation of CMP to use registers properly. also fix
...
one case of uninitialized memory and some output.
R=rsc
APPROVED=rsc
DELTA=73 (43 added, 1 deleted, 29 changed)
OCL=34743
CL=34772
2009-09-17 23:07:52 -07:00
Kai Backman
803a73c431
floating point constants and symbol export fix.
...
R=rsc
APPROVED=rsc
DELTA=16 (0 added, 1 deleted, 15 changed)
OCL=34753
CL=34769
2009-09-17 19:24:07 -07:00
Russ Cox
cb49a999d1
move static init code from 6g into gc.
...
hook up to 8g and 5g too.
R=ken
OCL=34768
CL=34768
2009-09-17 19:15:54 -07:00
Rob Pike
44b0f591e7
check in the generated html for the tutorial so godoc can serve it
...
DELTA=1444 (1444 added, 0 deleted, 0 changed)
OCL=34760
CL=34762
2009-09-17 17:05:45 -07:00
Robert Griesemer
ec8c611b40
- use new css for godoc templates
...
- final location of files TBD
R=rsc,r
DELTA=84 (19 added, 46 deleted, 19 changed)
OCL=34758
CL=34761
2009-09-17 17:04:51 -07:00
Russ Cox
73e52ae971
check for unused imports
...
R=ken
OCL=34732
CL=34756
2009-09-17 16:42:10 -07:00
Robert Griesemer
2a01b9d46e
- improved formatting of declarations
...
- improved formatting of struct and interface types
R=rsc
DELTA=471 (364 added, 47 deleted, 60 changed)
OCL=34747
CL=34751
2009-09-17 15:20:15 -07:00
Robert Griesemer
da961881b4
- silence ebnflint: mark syntax section as "ebnf" instead of "grammar"
...
- re-use MethodName production
R=r
DELTA=4 (1 added, 1 deleted, 2 changed)
OCL=34734
CL=34734
2009-09-17 11:01:50 -07:00
Russ Cox
20011bc878
unused imports
...
R=r
OCL=34731
CL=34731
2009-09-17 10:27:04 -07:00
Robert Griesemer
1401151ab2
- don't add "..." anonymous field to structs/interfaces if entries are stripped
...
- don't print any optional semicolons after declarations inside functions
- indicate non-exported fields/methods in exported types with a comment
so that the "exported source" is legal Go code
- more tests
R=rsc
DELTA=300 (227 added, 25 deleted, 48 changed)
OCL=34697
CL=34730
2009-09-17 09:12:14 -07:00
Robert Griesemer
75f72e7b2e
fix build: updated Make.deps
...
TBR=r
OCL=34729
CL=34729
2009-09-17 09:08:24 -07:00
Larry Hosken
698c6c00a0
A step towards "externalizing" some Go docs.
...
+ style sheet: like code.google.com but less feature-ful
+ JS with table-of-contents generation
+ tweaked go_spec.html and go_mem.html to use new style+JS
+ static-HTML-ified a few other Go docs:
+ static HTML versions of some wiki pages (which I'll turn
into links to these pages).
A notable thing that is _not_ in this changelist: any change
to the godoc tool or whatever thing generates http://go/godoc
R=r
APPROVED=r
DELTA=2472 (2307 added, 113 deleted, 52 changed)
OCL=34644
CL=34728
2009-09-17 08:05:12 -07:00
Rob Pike
229e976163
first cut at a string buffer.
...
can be made more efficient but this is reasonable.
R=rsc
DELTA=363 (363 added, 0 deleted, 0 changed)
OCL=34720
CL=34720
2009-09-16 23:32:17 -07:00
Russ Cox
0b7878a96e
first step toward cgo tool.
...
can extract import "C" doc comment
and all references to C package.
; cgo gmp.go | sort
#include <gmp.h>
gmp.go:197:4: mpz_t as type
gmp.go:205:2: mpz_init as call
gmp.go:206:2: mpz_set as call
gmp.go:221:2: mpz_init as call
gmp.go:227:7: size_t as call
gmp.go:228:2: mpz_export as call
gmp.go:235:13: mpz_sizeinbase as call
gmp.go:241:2: mpz_set as call
gmp.go:252:3: mpz_import as call
gmp.go:261:2: mpz_set_si as call
gmp.go:273:5: mpz_set_str as call
gmp.go:282:9: mpz_get_str as call
gmp.go:287:3: mpz_clear as call
gmp.go:302:2: mpz_add as call
gmp.go:311:2: mpz_sub as call
gmp.go:320:2: mpz_mul as call
gmp.go:329:2: mpz_tdiv_q as call
gmp.go:339:2: mpz_tdiv_r as call
gmp.go:348:2: mpz_mul_2exp as call
gmp.go:356:2: mpz_div_2exp as call
gmp.go:367:3: mpz_pow as call
gmp.go:369:3: mpz_powm as call
gmp.go:378:2: mpz_neg as call
gmp.go:386:2: mpz_abs as call
gmp.go:404:9: mpz_cmp as call
gmp.go:413:2: mpz_tdiv_qr as call
gmp.go:426:2: mpz_gcdext as call
;
R=r
DELTA=746 (746 added, 0 deleted, 0 changed)
OCL=34710
CL=34714
2009-09-16 18:14:18 -07:00
Russ Cox
11df49c43f
publish doc.CommentText
...
R=gri
DELTA=29 (10 added, 12 deleted, 7 changed)
OCL=34709
CL=34712
2009-09-16 16:56:20 -07:00
Russ Cox
127368d220
make String work on Position values, to enable
...
fmt.Printf("%s: %s\n", expr.Pos(), message);
R=gri
DELTA=15 (1 added, 3 deleted, 11 changed)
OCL=34706
CL=34708
2009-09-16 16:38:49 -07:00
Rob Pike
d5be41fc4e
rename bytes.Buffer.Data() to bytes.Buffer.Bytes()
...
R=rsc
DELTA=152 (6 added, 0 deleted, 146 changed)
OCL=34695
CL=34701
2009-09-16 15:15:00 -07:00
Rob Pike
2a1c9377d9
use /bin/ed to avoid portability issues
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=34696
CL=34700
2009-09-16 15:14:12 -07:00
Rob Pike
9d7538b42b
slight refinement of select: evaluation is top to bottom, as in switches.
...
DELTA=9 (2 added, 4 deleted, 3 changed)
OCL=34690
CL=34692
2009-09-16 11:49:35 -07:00
Robert Griesemer
5eb36240b7
- added syntax for conversions (was missing)
...
- added TODO for syntax for built-ins (require type as first argument)
- removed duplicate definition of Index
DELTA=13 (11 added, 1 deleted, 1 changed)
OCL=34668
CL=34688
2009-09-16 11:05:14 -07:00
Russ Cox
0ee18ca816
add heap.Remove
...
R=gri
DELTA=14 (14 added, 0 deleted, 0 changed)
OCL=34636
CL=34687
2009-09-16 10:43:49 -07:00
Russ Cox
1bbc044df9
parse and present DWARF type information
...
R=r
DELTA=940 (929 added, 1 deleted, 10 changed)
OCL=34679
CL=34686
2009-09-16 10:43:27 -07:00
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