1
0
mirror of https://github.com/golang/go synced 2024-09-25 09:10:14 -06:00
Commit Graph

3401 Commits

Author SHA1 Message Date
Russ Cox
b817e97961 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
2009-09-23 21:38:52 -07:00
Rob Pike
fbb7029747 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
2009-09-23 13:02:14 -07:00
Rob Pike
ea4ada89e1 process tutorial into new format
R=rsc
DELTA=161  (57 added, 56 deleted, 48 changed)
OCL=34926
CL=34929
2009-09-23 12:31:57 -07:00
Russ Cox
567673fc42 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
2009-09-22 16:56:28 -07:00
Russ Cox
1b14bdbf1c 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
2009-09-22 16:28:32 -07:00
Rob Pike
9e7f3a46d3 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
2009-09-22 14:53:48 -07:00
Rob Pike
b9493ded12 updated numbers after more slice inlining
R=rsc
DELTA=57  (57 added, 0 deleted, 0 changed)
OCL=34896
CL=34901
2009-09-22 14:13:40 -07:00
Kai Backman
8ce5f6e14a 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
2009-09-22 13:13:23 -07:00
Russ Cox
f7e43ffa9d nacl syscall: write return values to correct stack location
R=r
DELTA=18  (0 added, 0 deleted, 18 changed)
OCL=34894
CL=34894
2009-09-22 10:34:44 -07:00
Russ Cox
7b850fb7e3 nacl syscall package - machine generated files
R=r
DELTA=515  (515 added, 0 deleted, 0 changed)
OCL=34881
CL=34891
2009-09-22 07:49:49 -07:00
Russ Cox
b428456df6 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
2009-09-22 07:49:31 -07:00
Russ Cox
586d9d5a19 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
2009-09-22 07:48:43 -07:00
Russ Cox
7390aa0102 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
2009-09-22 01:10:40 -07:00
Russ Cox
ce46cbe89e test of named operations
R=r
DELTA=305  (305 added, 0 deleted, 0 changed)
OCL=34848
CL=34875
2009-09-21 22:45:19 -07:00
Ken Thompson
2975308125 more inlining of sliceslice
R=rsc
OCL=34871
CL=34871
2009-09-21 18:23:16 -07:00
Robert Griesemer
681f86a87f improved spacing around if, switch, and for control clauses
R=r
DELTA=89  (82 added, 5 deleted, 2 changed)
OCL=34870
CL=34870
2009-09-21 18:07:20 -07:00
Russ Cox
eae0906bed 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
2009-09-21 15:48:22 -07:00
Russ Cox
bbcb91a3a7 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
2009-09-21 15:46:50 -07:00
Russ Cox
a95ee61aea ideal bools and related fixes
R=ken
OCL=34859
CL=34865
2009-09-21 15:45:55 -07:00
Russ Cox
27969e87cf add required conversions; bug in compiler let it slip through
R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=34860
CL=34864
2009-09-21 15:44:10 -07:00
Rob Pike
6efd7e6b8f 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
2009-09-21 12:59:14 -07:00
Rob Pike
fed4770685 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
2009-09-21 12:20:15 -07:00
Russ Cox
de0d762a0f accept CALL $(constant) to call absolute PC
R=ken
OCL=34845
CL=34845
2009-09-21 09:41:21 -07:00
Nigel Tao
11e313ae72 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
2009-09-20 19:08:03 -07:00
Robert Griesemer
144580d690 - filter trailing whitespace
- removed some unused code

R=rsc
DELTA=103  (84 added, 15 deleted, 4 changed)
OCL=34816
CL=34829
2009-09-19 11:52:40 -07:00
Rob Pike
084577b81a hakuho
R=ken
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=34828
CL=34828
2009-09-19 11:41:26 -07:00
Russ Cox
f0536598b1 fix build
R=kaib
OCL=34823
CL=34823
2009-09-18 21:17:16 -07:00
Kai Backman
e4eaf4c24e 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
2009-09-18 19:09:29 -07:00
Kai Backman
1c71ab1808 added emulator support for arm.
R=rsc
APPROVED=rsc
DELTA=7  (3 added, 0 deleted, 4 changed)
OCL=34661
CL=34820
2009-09-18 19:09:12 -07:00
Russ Cox
4a4ec23870 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
2009-09-18 18:57:15 -07:00
Russ Cox
c64986f706 merge first pass into main loop in span calculation.
having one copy will cut nacl changes in half.

R=ken
OCL=34815
CL=34815
2009-09-18 17:08:18 -07:00
Kai Backman
46e392e01c 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
2009-09-18 16:45:41 -07:00
Russ Cox
2e5a588718 fix build again; this time for sure. sigh
TBR=r
OCL=34803
CL=34803
2009-09-18 12:56:18 -07:00
Kai Backman
2c7ec3d861 fix 5g -S and -g output
R=rsc
APPROVED=rsc
DELTA=115  (93 added, 14 deleted, 8 changed)
OCL=34798
CL=34802
2009-09-18 12:47:44 -07:00
Kai Backman
020dbcd4df 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
2009-09-18 12:47:25 -07:00
Russ Cox
99f54911cd fix build - missing file
TBR=r
OCL=34800
CL=34800
2009-09-18 12:45:34 -07:00
Robert Griesemer
d36d191e25 - 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
2009-09-18 11:58:35 -07:00
Russ Cox
6a2602de91 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
2009-09-18 11:52:00 -07:00
Russ Cox
92f773dc77 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
2009-09-18 11:50:24 -07:00
Russ Cox
bf69025825 Mach-O file reading
R=r
DELTA=784  (784 added, 0 deleted, 0 changed)
OCL=34715
CL=34788
2009-09-18 11:49:22 -07:00
Austin Clements
ad9c6f7700 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
2009-09-18 09:11:19 -07:00
Austin Clements
20583b5874 Implement remote variables
R=rsc
APPROVED=rsc
DELTA=282  (281 added, 0 deleted, 1 changed)
OCL=34407
CL=34781
2009-09-18 09:09:40 -07:00
Rob Pike
7be770071f 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
2009-09-17 23:51:06 -07:00
Kai Backman
a0a965fbcf 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
2009-09-17 23:08:15 -07:00
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