Commit Graph

3677 Commits

Author SHA1 Message Date
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
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