]> Cypherpunks repositories - gostls13.git/log
gostls13.git
15 years agoconvert 8l to new ELF code.
Russ Cox [Thu, 24 Sep 2009 19:53:35 +0000 (12:53 -0700)]
convert 8l to new ELF code.
mostly cut and paste from 6l.

R=r
DELTA=930  (525 added, 182 deleted, 223 changed)
OCL=34976
CL=34976

15 years agoallow runes >= 0x80 in symbols in #pragmas
Russ Cox [Thu, 24 Sep 2009 18:45:08 +0000 (11:45 -0700)]
allow runes >= 0x80 in symbols in #pragmas

R=ken
OCL=34975
CL=34975

15 years agoadd Size method to dwarf.Type
Russ Cox [Thu, 24 Sep 2009 18:43:38 +0000 (11:43 -0700)]
add Size method to dwarf.Type

R=r
DELTA=30  (24 added, 3 deleted, 3 changed)
OCL=34950
CL=34974

15 years agocgo checkpoint.
Russ Cox [Thu, 24 Sep 2009 18:43:19 +0000 (11:43 -0700)]
cgo checkpoint.
can write all 3 output files and then compile them by hand.

R=r
DELTA=919  (841 added, 16 deleted, 62 changed)
OCL=34954
CL=34973

15 years agoSwitch ogle over to the in-tree debug/proc package. Fix
Austin Clements [Thu, 24 Sep 2009 16:07:47 +0000 (09:07 -0700)]
Switch ogle over to the in-tree debug/proc package.  Fix
debug/proc to install to the right place.  Delete the old
ptrace package.  The diff looks huge, but it's mostly
s/ptrace/proc/.

R=rsc
APPROVED=rsc
DELTA=1940  (10 added, 1835 deleted, 95 changed)
OCL=34966
CL=34968

15 years agoFix declared and not used errors in ogle.
Austin Clements [Thu, 24 Sep 2009 15:32:59 +0000 (08:32 -0700)]
Fix declared and not used errors in ogle.

R=rsc
APPROVED=rsc
DELTA=8  (0 added, 2 deleted, 6 changed)
OCL=34854
CL=34965

15 years agoFix declared and not set errors in old ptrace package (still
Austin Clements [Thu, 24 Sep 2009 15:32:10 +0000 (08:32 -0700)]
Fix declared and not set errors in old ptrace package (still
used by ogle)

R=rsc
APPROVED=rsc
DELTA=4  (0 added, 1 deleted, 3 changed)
OCL=34852
CL=34964

15 years agoFix declared and not used errors and unused import errors in
Austin Clements [Thu, 24 Sep 2009 15:25:14 +0000 (08:25 -0700)]
Fix declared and not used errors and unused import errors in
the interpreter and update code to use ast.BasicDecl and
multi-type switch.  There are still a lot of "switch _ :=
x.(type)" that should make use of the new type switch syntax,
but those will be a different CL.

R=rsc
APPROVED=rsc
DELTA=58  (16 added, 23 deleted, 19 changed)
OCL=34853
CL=34963

15 years agoFix declared and not used errors in old sym package (ogle
Austin Clements [Thu, 24 Sep 2009 15:19:16 +0000 (08:19 -0700)]
Fix declared and not used errors in old sym package (ogle
hasn't been ported to the new sym package yet)

R=rsc
APPROVED=rsc
DELTA=9  (0 added, 1 deleted, 8 changed)
OCL=34851
CL=34962

15 years agogo/printer: fix sync bug - avoid sending on errors twice -
Russ Cox [Thu, 24 Sep 2009 08:37:27 +0000 (01:37 -0700)]
go/printer: fix sync bug - avoid sending on errors twice -
and report node type in error

R=gri
DELTA=4  (3 added, 0 deleted, 1 changed)
OCL=34949
CL=34955

15 years agochange code font to "monospace", which will
Russ Cox [Thu, 24 Sep 2009 04:38:52 +0000 (21:38 -0700)]
change code font to "monospace", which will
let the browser use the font the user has set up
as the default fixed-width font, instead of forcing Courier.

also set the size to 100%, which means 100% of the
font size in the surrounding text.  this looks a little
better in the main body but much better when the
code is in a heading (like Package unsafe).

R=r
DELTA=4  (1 added, 0 deleted, 3 changed)
OCL=34947
CL=34947

15 years agoexpand ticker interface to allow a client to shut down a ticker.
Rob Pike [Wed, 23 Sep 2009 20:02:14 +0000 (13:02 -0700)]
expand ticker interface to allow a client to shut down a ticker.
existing interface still works.

R=rsc
DELTA=50  (32 added, 2 deleted, 16 changed)
OCL=34930
CL=34932

15 years agoprocess tutorial into new format
Rob Pike [Wed, 23 Sep 2009 19:31:57 +0000 (12:31 -0700)]
process tutorial into new format

R=rsc
DELTA=161  (57 added, 56 deleted, 48 changed)
OCL=34926
CL=34929

15 years agonacl - run tests under emulator.
Russ Cox [Tue, 22 Sep 2009 23:56:28 +0000 (16:56 -0700)]
nacl - run tests under emulator.
special all-nacl.bash and test/run-nacl that
run just the tests known to work under nacl.
the rest requires closures.

fix another bug or two in syscall.

R=r
DELTA=420  (410 added, 8 deleted, 2 changed)
OCL=34882
CL=34907

15 years agochanges to accommodate nacl:
Russ Cox [Tue, 22 Sep 2009 23:28:32 +0000 (16:28 -0700)]
changes to accommodate nacl:
  * change ldt0setup to set GS itself; nacl won't let us do it.
  * change breakpoint to INT $3 so 8l can translate to HLT for nacl.
  * panic if closure is needed on nacl.
  * do not try to access symbol table on nacl.
  * mmap in 64kB chunks.

nacl support:
  * system calls, threading, locks.

R=r
DELTA=365  (357 added, 5 deleted, 3 changed)
OCL=34880
CL=34906

15 years agorestore the old algorithm. the new one is more memory efficient in large cases
Rob Pike [Tue, 22 Sep 2009 21:53:48 +0000 (14:53 -0700)]
restore the old algorithm. the new one is more memory efficient in large cases
but too slow across the board.

R=rsc
DELTA=315  (50 added, 219 deleted, 46 changed)
OCL=34868
CL=34902

15 years agoupdated numbers after more slice inlining
Rob Pike [Tue, 22 Sep 2009 21:13:40 +0000 (14:13 -0700)]
updated numbers after more slice inlining

R=rsc
DELTA=57  (57 added, 0 deleted, 0 changed)
OCL=34896
CL=34901

15 years agofix bad code generation.
Kai Backman [Tue, 22 Sep 2009 20:13:23 +0000 (13:13 -0700)]
fix bad code generation.

go/test: passes 64% (215/337) tests

metric updated, had total number of tests wrong. number of
failing tests is down from 129 to 122.

R=rsc
APPROVED=rsc
DELTA=228  (12 added, 5 deleted, 211 changed)
OCL=34897
CL=34899

15 years agonacl syscall: write return values to correct stack location
Russ Cox [Tue, 22 Sep 2009 17:34:44 +0000 (10:34 -0700)]
nacl syscall: write return values to correct stack location

R=r
DELTA=18  (0 added, 0 deleted, 18 changed)
OCL=34894
CL=34894

15 years agonacl syscall package - machine generated files
Russ Cox [Tue, 22 Sep 2009 14:49:49 +0000 (07:49 -0700)]
nacl syscall package - machine generated files

R=r
DELTA=515  (515 added, 0 deleted, 0 changed)
OCL=34881
CL=34891

15 years agonacl syscall package.
Russ Cox [Tue, 22 Sep 2009 14:49:31 +0000 (07:49 -0700)]
nacl syscall package.
similar tweaks to make debug/proc, net, os build.

R=r
DELTA=861  (855 added, 4 deleted, 2 changed)
OCL=34877
CL=34890

15 years agouse $(shell uname) instead of $GOOS when
Russ Cox [Tue, 22 Sep 2009 14:48:43 +0000 (07:48 -0700)]
use $(shell uname) instead of $GOOS when
deciding what the host process support is.
this makes a cross-compiling (e.g., GOOS=nacl) build
still generate valid host debugger binaries.

R=r
DELTA=5  (0 added, 0 deleted, 5 changed)
OCL=34878
CL=34889

15 years agonacl:
Russ Cox [Tue, 22 Sep 2009 08:10:40 +0000 (01:10 -0700)]
nacl:
add jmp to constant pc.
generate HLT for INT $3
do not insert NOPs between REP/REPN and subsequent instruction.
allow very long time for convergence.

R=ken
OCL=34879
CL=34879

15 years agotest of named operations
Russ Cox [Tue, 22 Sep 2009 05:45:19 +0000 (22:45 -0700)]
test of named operations

R=r
DELTA=305  (305 added, 0 deleted, 0 changed)
OCL=34848
CL=34875

15 years agomore inlining of sliceslice
Ken Thompson [Tue, 22 Sep 2009 01:23:16 +0000 (18:23 -0700)]
more inlining of sliceslice

R=rsc
OCL=34871
CL=34871

15 years agoimproved spacing around if, switch, and for control clauses
Robert Griesemer [Tue, 22 Sep 2009 01:07:20 +0000 (18:07 -0700)]
improved spacing around if, switch, and for control clauses

R=r
DELTA=89  (82 added, 5 deleted, 2 changed)
OCL=34870
CL=34870

15 years agorewrite RET, indirect CALL, indirect JMP for nacl.
Russ Cox [Mon, 21 Sep 2009 22:48:22 +0000 (15:48 -0700)]
rewrite RET, indirect CALL, indirect JMP for nacl.
can JMP or CALL indirect through a register R
provided the preceding instruction is AND $~31, R.

R=ken
OCL=34863
CL=34867

15 years agoconvert 386 to use %gs instead of %fs for extern register.
Russ Cox [Mon, 21 Sep 2009 22:46:50 +0000 (15:46 -0700)]
convert 386 to use %gs instead of %fs for extern register.
required for nacl and may be nicer for ffi,
because %gs is the standard register for thread-local storage.

R=ken
OCL=34861
CL=34866

15 years agoideal bools and related fixes
Russ Cox [Mon, 21 Sep 2009 22:45:55 +0000 (15:45 -0700)]
ideal bools and related fixes

R=ken
OCL=34859
CL=34865

15 years agoadd required conversions; bug in compiler let it slip through
Russ Cox [Mon, 21 Sep 2009 22:44:10 +0000 (15:44 -0700)]
add required conversions; bug in compiler let it slip through

R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=34860
CL=34864

15 years agomove strings.Buffer into bytes
Rob Pike [Mon, 21 Sep 2009 19:59:14 +0000 (12:59 -0700)]
move strings.Buffer into bytes
delete strings.Buffer
add a test for a bug not caught before (mustn't install zero-length blocks)

R=rsc
DELTA=987  (289 added, 587 deleted, 111 changed)
OCL=34850
CL=34850

15 years agostep 2 of the great buffer shift.
Rob Pike [Mon, 21 Sep 2009 19:20:15 +0000 (12:20 -0700)]
step 2 of the great buffer shift.
make strings.Buffer handle strings and bytes with comparable efficiency.
if ok, next step will be to move this code to bytes.Buffer and terminate
strings.Buffer's short happy life.

R=rsc
DELTA=292  (212 added, 0 deleted, 80 changed)
OCL=34837
CL=34849

15 years agoaccept CALL $(constant) to call absolute PC
Russ Cox [Mon, 21 Sep 2009 16:41:21 +0000 (09:41 -0700)]
accept CALL $(constant) to call absolute PC

R=ken
OCL=34845
CL=34845

15 years agoUnit tests for image/png, based off the semi-official pngsuite from
Nigel Tao [Mon, 21 Sep 2009 02:08:03 +0000 (19:08 -0700)]
Unit tests for image/png, based off the semi-official pngsuite from
libpng.org.

R=rsc
APPROVED=r
DELTA=1176  (1175 added, 1 deleted, 0 changed)
OCL=34727
CL=34838

15 years ago- filter trailing whitespace
Robert Griesemer [Sat, 19 Sep 2009 18:52:40 +0000 (11:52 -0700)]
- filter trailing whitespace
- removed some unused code

R=rsc
DELTA=103  (84 added, 15 deleted, 4 changed)
OCL=34816
CL=34829

15 years agohakuho
Rob Pike [Sat, 19 Sep 2009 18:41:26 +0000 (11:41 -0700)]
hakuho

R=ken
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=34828
CL=34828

15 years agofix build
Russ Cox [Sat, 19 Sep 2009 04:17:16 +0000 (21:17 -0700)]
fix build

R=kaib
OCL=34823
CL=34823

15 years agoexpanded arm regression testing. will go away once 5g is compliant
Kai Backman [Sat, 19 Sep 2009 02:09:29 +0000 (19:09 -0700)]
expanded arm regression testing. will go away once 5g is compliant

R=rsc
APPROVED=rsc
DELTA=300  (297 added, 0 deleted, 3 changed)
OCL=34813
CL=34821

15 years agoadded emulator support for arm.
Kai Backman [Sat, 19 Sep 2009 02:09:12 +0000 (19:09 -0700)]
added emulator support for arm.

R=rsc
APPROVED=rsc
DELTA=7  (3 added, 0 deleted, 4 changed)
OCL=34661
CL=34820

15 years ago8l: step toward native client.
Russ Cox [Sat, 19 Sep 2009 01:57:15 +0000 (18:57 -0700)]
8l: step toward native client.
  - ELF header bits and addresses
  - do not let instructions span 32-byte boundary
  - align CALLs so return is to 32-byte boundary
  - align indirect jump targets to 32-byte boundary
    (only possible indirect jumps are function entries)

still to do:
  - replace indirect jump, indirect call, and ret with
    nacl-approved instruction sequences
  - switch to GS segment for m-local storage

R=ken
OCL=34818
CL=34818

15 years agomerge first pass into main loop in span calculation.
Russ Cox [Sat, 19 Sep 2009 00:08:18 +0000 (17:08 -0700)]
merge first pass into main loop in span calculation.
having one copy will cut nacl changes in half.

R=ken
OCL=34815
CL=34815

15 years agochanged 5c calling convention to use stack exclusively for in
Kai Backman [Fri, 18 Sep 2009 23:45:41 +0000 (16:45 -0700)]
changed 5c calling convention to use stack exclusively for in
params. a number of fixes to assembly routines that assumed R0
had the first arg. one stack offset fix, arm pushes the link
register on stack top.

go/test: passes 65% (235/364) tests

R=rsc
APPROVED=rsc
DELTA=20  (11 added, 0 deleted, 9 changed)
OCL=34809
CL=34812

15 years agofix build again; this time for sure. sigh
Russ Cox [Fri, 18 Sep 2009 19:56:18 +0000 (12:56 -0700)]
fix build again; this time for sure.  sigh

TBR=r
OCL=34803
CL=34803

15 years agofix 5g -S and -g output
Kai Backman [Fri, 18 Sep 2009 19:47:44 +0000 (12:47 -0700)]
fix 5g -S and -g output

R=rsc
APPROVED=rsc
DELTA=115  (93 added, 14 deleted, 8 changed)
OCL=34798
CL=34802

15 years agorevert setting of name from type. already set correctly.
Kai Backman [Fri, 18 Sep 2009 19:47:25 +0000 (12:47 -0700)]
revert setting of name from type. already set correctly.

R=rsc
APPROVED=rsc
DELTA=1  (0 added, 1 deleted, 0 changed)
OCL=34799
CL=34801

15 years agofix build - missing file
Russ Cox [Fri, 18 Sep 2009 19:45:34 +0000 (12:45 -0700)]
fix build - missing file

TBR=r
OCL=34800
CL=34800

15 years ago- added heading to operator precedence section so it's easy to find
Robert Griesemer [Fri, 18 Sep 2009 18:58:35 +0000 (11:58 -0700)]
- added heading to operator precedence section so it's easy to find
- fixed broken link to function literals section
- minor adjustments

R=r
DELTA=20  (1 added, 3 deleted, 16 changed)
OCL=34792
CL=34794

15 years agocgo: can look up C identifier kind (type or value) and type
Russ Cox [Fri, 18 Sep 2009 18:52:00 +0000 (11:52 -0700)]
cgo: can look up C identifier kind (type or value) and type

gmp.go:197:4:  type mpz_t          C type  mpz_t
gmp.go:205:2:  call mpz_init       C value func(mpz_ptr) void
gmp.go:206:2:  call mpz_set        C value func(mpz_ptr, mpz_srcptr) void
gmp.go:221:2:  call mpz_init       C value func(mpz_ptr) void
gmp.go:227:7:  call size_t         C type  size_t
gmp.go:228:2:  call mpz_export     C value func(*void, *size_t, int, size_t, int, size_t, mpz_srcptr) *void
gmp.go:235:13: call mpz_sizeinbase C value func(mpz_srcptr, int) size_t
gmp.go:241:2:  call mpz_set        C value func(mpz_ptr, mpz_srcptr) void
gmp.go:252:3:  call mpz_import     C value func(mpz_ptr, size_t, int, size_t, int, size_t, *const void) void
gmp.go:261:2:  call mpz_set_si     C value func(mpz_ptr, long int) void
gmp.go:273:5:  call mpz_set_str    C value func(mpz_ptr, *const char, int) int
gmp.go:282:9:  call mpz_get_str    C value func(*char, int, mpz_srcptr) *char
gmp.go:287:3:  call mpz_clear      C value func(mpz_ptr) void
gmp.go:302:2:  call mpz_add        C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:311:2:  call mpz_sub        C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:320:2:  call mpz_mul        C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:329:2:  call mpz_tdiv_q     C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:339:2:  call mpz_tdiv_r     C value func(mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:348:2:  call mpz_mul_2exp   C value func(mpz_ptr, mpz_srcptr, long unsigned int) void
gmp.go:356:2:  call mpz_div_2exp   C value func(mpz_ptr, mpz_srcptr, long unsigned int) void
gmp.go:367:3:  call mpz_pow_ui     C value func(mpz_ptr, mpz_srcptr, long unsigned int) void
gmp.go:369:3:  call mpz_powm       C value func(mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr) void
gmp.go:378:2:  call mpz_neg        C value func(mpz_ptr, mpz_srcptr) void
gmp.go:386:2:  call mpz_abs        C value func(mpz_ptr, mpz_srcptr) void
gmp.go:404:9:  call mpz_cmp        C value func(mpz_srcptr, mpz_srcptr) int
gmp.go:413:2:  call mpz_tdiv_qr    C value func(mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr) void
gmp.go:426:2:  call mpz_gcdext     C value func(mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr) void

R=r
DELTA=938  (628 added, 308 deleted, 2 changed)
OCL=34733
CL=34791

15 years agoadd DWARF method to elf.File.
Russ Cox [Fri, 18 Sep 2009 18:50:24 +0000 (11:50 -0700)]
add DWARF method to elf.File.
test both ELF and Mach-O in dwarf package.

R=r
DELTA=83  (44 added, 10 deleted, 29 changed)
OCL=34717
CL=34790

15 years agoMach-O file reading
Russ Cox [Fri, 18 Sep 2009 18:49:22 +0000 (11:49 -0700)]
Mach-O file reading

R=r
DELTA=784  (784 added, 0 deleted, 0 changed)
OCL=34715
CL=34788

15 years agoRudimentary command shell for Ogle. Hack to prevent linker
Austin Clements [Fri, 18 Sep 2009 16:11:19 +0000 (09:11 -0700)]
Rudimentary command shell for Ogle.  Hack to prevent linker
from inlining newprocreadylocked.  Fix type bridge's handling
of basic types.  Include interpreter's Thread in bridged
native function calls.

; load . "6.out"
Started 6.out
; BpSet("main·merge")
; ContWait()
breakpoint at 0x400800
=>   400800 main·merge /home/austin/src-go1/usr/austin/ptrace/test/sort.go:19
; bt
=>   400800 main·merge /home/austin/src-go1/usr/austin/ptrace/test/sort.go:19
     400b6a main·mergeSort+0x1be /home/austin/src-go1/usr/austin/ptrace/test/sort.go:34
     448313 goexit /home/austin/src-go1/src/pkg/runtime/proc.c:133
; main.merge.a
{1}

; load . "pid:25753"
Attached to 25753
; bt
=>   479ddf syscall·Syscall+0x24 /home/austin/src-go1/src/pkg/syscall/asm_linux_amd64.s:24
     47c011 syscall·Read+0x5d /home/austin/src-go1/src/pkg/syscall/zsyscall_linux_amd64.go:368
     4119e5 os·*File·Read+0x5f /home/austin/src-go1/src/pkg/os/file.go:122
     427bf3 bufio·*Reader·fill+0x116 /home/austin/src-go1/src/pkg/bufio/bufio.go:105
     428361 bufio·*Reader·ReadSlice+0x195 /home/austin/src-go1/src/pkg/bufio/bufio.go:244
     40204a ogle·Main+0x94 /home/austin/src-go1/usr/austin/ogle/cmd.go:226
     40080f main·main+0xf /home/austin/src-go1/usr/austin/ogle/main.go:6
     41c4b8 mainstart+0xf /home/austin/src-go1/src/pkg/runtime/amd64/asm.s:55
     41531f goexit /home/austin/src-go1/src/pkg/runtime/proc.c:133

R=rsc
APPROVED=rsc
DELTA=433  (420 added, 2 deleted, 11 changed)
OCL=34410
CL=34782

15 years agoImplement remote variables
Austin Clements [Fri, 18 Sep 2009 16:09:40 +0000 (09:09 -0700)]
Implement remote variables

R=rsc
APPROVED=rsc
DELTA=282  (281 added, 0 deleted, 1 changed)
OCL=34407
CL=34781

15 years agouse buf.String() instead of string(buf.Bytes())
Rob Pike [Fri, 18 Sep 2009 06:51:06 +0000 (23:51 -0700)]
use buf.String() instead of string(buf.Bytes())
use strings.Buffer instead of bytes.Buffer in some places

R=rsc
DELTA=40  (0 added, 3 deleted, 37 changed)
OCL=34770
CL=34775

15 years agofixing width bug in DATA output. some logging to make fixing
Kai Backman [Fri, 18 Sep 2009 06:08:15 +0000 (23:08 -0700)]
fixing width bug in DATA output. some logging to make fixing
similar issues easier in the future.

R=rsc
APPROVED=rsc
DELTA=6  (1 added, 0 deleted, 5 changed)
OCL=34771
CL=34773

15 years agofix code generation of CMP to use registers properly. also fix
Kai Backman [Fri, 18 Sep 2009 06:07:52 +0000 (23:07 -0700)]
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

15 years agofloating point constants and symbol export fix.
Kai Backman [Fri, 18 Sep 2009 02:24:07 +0000 (19:24 -0700)]
floating point constants and symbol export fix.

R=rsc
APPROVED=rsc
DELTA=16  (0 added, 1 deleted, 15 changed)
OCL=34753
CL=34769

15 years agomove static init code from 6g into gc.
Russ Cox [Fri, 18 Sep 2009 02:15:54 +0000 (19:15 -0700)]
move static init code from 6g into gc.
hook up to 8g and 5g too.

R=ken
OCL=34768
CL=34768

15 years agocheck in the generated html for the tutorial so godoc can serve it
Rob Pike [Fri, 18 Sep 2009 00:05:45 +0000 (17:05 -0700)]
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

15 years ago- use new css for godoc templates
Robert Griesemer [Fri, 18 Sep 2009 00:04:51 +0000 (17:04 -0700)]
- 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

15 years agocheck for unused imports
Russ Cox [Thu, 17 Sep 2009 23:42:10 +0000 (16:42 -0700)]
check for unused imports

R=ken
OCL=34732
CL=34756

15 years ago- improved formatting of declarations
Robert Griesemer [Thu, 17 Sep 2009 22:20:15 +0000 (15:20 -0700)]
- 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

15 years ago- silence ebnflint: mark syntax section as "ebnf" instead of "grammar"
Robert Griesemer [Thu, 17 Sep 2009 18:01:50 +0000 (11:01 -0700)]
- 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

15 years agounused imports
Russ Cox [Thu, 17 Sep 2009 17:27:04 +0000 (10:27 -0700)]
unused imports

R=r
OCL=34731
CL=34731

15 years ago- don't add "..." anonymous field to structs/interfaces if entries are stripped
Robert Griesemer [Thu, 17 Sep 2009 16:12:14 +0000 (09:12 -0700)]
- 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

15 years agofix build: updated Make.deps
Robert Griesemer [Thu, 17 Sep 2009 16:08:24 +0000 (09:08 -0700)]
fix build: updated Make.deps

TBR=r
OCL=34729
CL=34729

15 years agoA step towards "externalizing" some Go docs.
Larry Hosken [Thu, 17 Sep 2009 15:05:12 +0000 (08:05 -0700)]
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

15 years agofirst cut at a string buffer.
Rob Pike [Thu, 17 Sep 2009 06:32:17 +0000 (23:32 -0700)]
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

15 years agofirst step toward cgo tool.
Russ Cox [Thu, 17 Sep 2009 01:14:18 +0000 (18:14 -0700)]
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

15 years agopublish doc.CommentText
Russ Cox [Wed, 16 Sep 2009 23:56:20 +0000 (16:56 -0700)]
publish doc.CommentText

R=gri
DELTA=29  (10 added, 12 deleted, 7 changed)
OCL=34709
CL=34712

15 years agomake String work on Position values, to enable
Russ Cox [Wed, 16 Sep 2009 23:38:49 +0000 (16:38 -0700)]
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

15 years agorename bytes.Buffer.Data() to bytes.Buffer.Bytes()
Rob Pike [Wed, 16 Sep 2009 22:15:00 +0000 (15:15 -0700)]
rename bytes.Buffer.Data() to bytes.Buffer.Bytes()

R=rsc
DELTA=152  (6 added, 0 deleted, 146 changed)
OCL=34695
CL=34701

15 years agouse /bin/ed to avoid portability issues
Rob Pike [Wed, 16 Sep 2009 22:14:12 +0000 (15:14 -0700)]
use /bin/ed to avoid portability issues

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=34696
CL=34700

15 years agoslight refinement of select: evaluation is top to bottom, as in switches.
Rob Pike [Wed, 16 Sep 2009 18:49:35 +0000 (11:49 -0700)]
slight refinement of select: evaluation is top to bottom, as in switches.

DELTA=9  (2 added, 4 deleted, 3 changed)
OCL=34690
CL=34692

15 years ago- added syntax for conversions (was missing)
Robert Griesemer [Wed, 16 Sep 2009 18:05:14 +0000 (11:05 -0700)]
- 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

15 years agoadd heap.Remove
Russ Cox [Wed, 16 Sep 2009 17:43:49 +0000 (10:43 -0700)]
add heap.Remove

R=gri
DELTA=14  (14 added, 0 deleted, 0 changed)
OCL=34636
CL=34687

15 years agoparse and present DWARF type information
Russ Cox [Wed, 16 Sep 2009 17:43:27 +0000 (10:43 -0700)]
parse and present DWARF type information

R=r
DELTA=940  (929 added, 1 deleted, 10 changed)
OCL=34679
CL=34686

15 years agobasic DWARF reading.
Russ Cox [Wed, 16 Sep 2009 04:58:45 +0000 (21:58 -0700)]
basic DWARF reading.

R=r
DELTA=949  (949 added, 0 deleted, 0 changed)
OCL=34676
CL=34678

15 years agomake 6g match spec:
Russ Cox [Wed, 16 Sep 2009 00:29:08 +0000 (17:29 -0700)]
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

15 years agobug fix: allow function types as operands
Robert Griesemer [Tue, 15 Sep 2009 23:16:34 +0000 (16:16 -0700)]
bug fix: allow function types as operands

R=rsc
DELTA=10  (5 added, 0 deleted, 5 changed)
OCL=34662
CL=34666

15 years agofixed register usage and removed some dead code.
Kai Backman [Tue, 15 Sep 2009 23:15:17 +0000 (16:15 -0700)]
fixed register usage and removed some dead code.

R=rsc
APPROVED=rsc
DELTA=17  (0 added, 12 deleted, 5 changed)
OCL=34659
CL=34665

15 years agopatch in proper branch address in zaddr output
Kai Backman [Tue, 15 Sep 2009 23:14:49 +0000 (16:14 -0700)]
patch in proper branch address in zaddr output

R=rsc
APPROVED=rsc
DELTA=12  (11 added, 1 deleted, 0 changed)
OCL=34658
CL=34664

15 years agouse register intermediate
Kai Backman [Tue, 15 Sep 2009 23:12:47 +0000 (16:12 -0700)]
use register intermediate

R=rsc
APPROVED=rsc
DELTA=21  (7 added, 5 deleted, 9 changed)
OCL=34607
CL=34663

15 years agoDeriving functions from methods
Rob Pike [Tue, 15 Sep 2009 22:56:44 +0000 (15:56 -0700)]
Deriving functions from methods

DELTA=238  (118 added, 116 deleted, 4 changed)
OCL=34653
CL=34660

15 years agodeclared and not used; this time for sure
Russ Cox [Tue, 15 Sep 2009 21:11:43 +0000 (14:11 -0700)]
declared and not used; this time for sure

R=ken
OCL=34657
CL=34657

15 years agoconsider each case in a switch independent from the previous one for alignment purposes
Robert Griesemer [Tue, 15 Sep 2009 20:53:10 +0000 (13:53 -0700)]
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

15 years agofinal batch for "declared and not used"
Russ Cox [Tue, 15 Sep 2009 20:51:33 +0000 (13:51 -0700)]
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

15 years agofix build: added missing files
Robert Griesemer [Tue, 15 Sep 2009 20:33:16 +0000 (13:33 -0700)]
fix build: added missing files

TBR=rsc
DELTA=56  (56 added, 0 deleted, 0 changed)
OCL=34652
CL=34652

15 years agogo/printer:
Robert Griesemer [Tue, 15 Sep 2009 20:06:24 +0000 (13:06 -0700)]
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

15 years agolast round: non-package code
Russ Cox [Tue, 15 Sep 2009 19:42:24 +0000 (12:42 -0700)]
last round: non-package code

R=r
DELTA=127  (38 added, 3 deleted, 86 changed)
OCL=34640
CL=34650

15 years agoan attempt to define initialization order within a package.
Rob Pike [Tue, 15 Sep 2009 18:56:39 +0000 (11:56 -0700)]
an attempt to define initialization order within a package.

DELTA=23  (19 added, 1 deleted, 3 changed)
OCL=34646
CL=34649

15 years agominutiae: pass 1
Rob Pike [Tue, 15 Sep 2009 16:54:22 +0000 (09:54 -0700)]
minutiae: pass 1

DELTA=174  (65 added, 10 deleted, 99 changed)
OCL=34625
CL=34639

15 years agomore "declared and not used".
Russ Cox [Tue, 15 Sep 2009 16:41:59 +0000 (09:41 -0700)]
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

15 years agofix "declared and not used" in tests;
Russ Cox [Tue, 15 Sep 2009 04:03:53 +0000 (21:03 -0700)]
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

15 years agodeclared and not used error, but disabled.
Russ Cox [Tue, 15 Sep 2009 01:38:30 +0000 (18:38 -0700)]
declared and not used error, but disabled.
fix some bugs involving _.

R=ken
OCL=34621
CL=34621

15 years agomake SimpleStmt include EmptyStmt and the grammar simplifies a bit.
Rob Pike [Tue, 15 Sep 2009 00:39:17 +0000 (17:39 -0700)]
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

15 years agofix "declared and not used" errors in non-test code.
Russ Cox [Tue, 15 Sep 2009 00:20:29 +0000 (17:20 -0700)]
fix "declared and not used" errors in non-test code.

R=r
DELTA=112  (6 added, 57 deleted, 49 changed)
OCL=34610
CL=34610

15 years agodo not crash on nil data value
Russ Cox [Mon, 14 Sep 2009 23:46:48 +0000 (16:46 -0700)]
do not crash on nil data value

R=r
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=34606
CL=34609

15 years agodo not crash printing the zero value for time.Time.
Russ Cox [Mon, 14 Sep 2009 23:45:35 +0000 (16:45 -0700)]
do not crash printing the zero value for time.Time.

R=r
DELTA=2  (1 added, 0 deleted, 1 changed)
OCL=34605
CL=34608

15 years agomake 5g, 8g build again by disabling init code.
Russ Cox [Mon, 14 Sep 2009 21:27:19 +0000 (14:27 -0700)]
make 5g, 8g build again by disabling init code.

R=ken
OCL=34604
CL=34604

15 years agoadd tests for the func()() case
Rob Pike [Mon, 14 Sep 2009 20:09:53 +0000 (13:09 -0700)]
add tests for the func()() case

R=gri
DELTA=12  (12 added, 0 deleted, 0 changed)
OCL=34601
CL=34601