1
0
mirror of https://github.com/golang/go synced 2024-10-03 23:21:22 -06:00
Commit Graph

2060 Commits

Author SHA1 Message Date
Rob Pike
87f2208bda rename runtime internals to have modern names (array->slice etc)
R=rsc
DELTA=444  (179 added, 177 deleted, 88 changed)
OCL=33847
CL=33849
2009-08-25 15:54:25 -07:00
Russ Cox
67815ef65b checkpoint & test (pidigits) before trying to automate.
R=r
DELTA=616  (598 added, 11 deleted, 7 changed)
OCL=33846
CL=33848
2009-08-25 15:37:22 -07:00
Russ Cox
75a38963ca cgocall bug fix.
better FFI demo: compute fibonacci numbers using FFI'ed libgmp.

R=r
DELTA=281  (255 added, 19 deleted, 7 changed)
OCL=33815
CL=33820
2009-08-24 21:16:15 -07:00
David Symonds
429157848f Wrap kludge text in HTML comments so the text/html output will remain valid HTML.
Be more conservative: only mess with text/html and text/plain output.

R=rsc
APPROVED=rsc
DELTA=20  (12 added, 5 deleted, 3 changed)
OCL=33806
CL=33812
2009-08-24 17:31:35 -07:00
Russ Cox
fdc4b4a47f start of FFI support, and a demo.
R=r
DELTA=494  (492 added, 0 deleted, 2 changed)
OCL=33784
CL=33810
2009-08-24 17:30:00 -07:00
Russ Cox
165a99038f ffi -> dynld.
move out of export data into its own section

R=r
DELTA=222  (71 added, 99 deleted, 52 changed)
OCL=33801
CL=33808
2009-08-24 17:27:55 -07:00
Russ Cox
d66d65da96 bug132
R=ken
OCL=33792
CL=33803
2009-08-24 17:06:10 -07:00
Russ Cox
92543daff1 change reflect test to avoid bug132
R=gri
DELTA=20  (17 added, 0 deleted, 3 changed)
OCL=33793
CL=33802
2009-08-24 17:04:12 -07:00
Russ Cox
8c253bcae5 first attempt at real FFI support.
in a .6 file, an export line

	//ffi T localfib remotefib remote.so

means the dynamic linker should initialize
localfib, always a pointer, to the address of
remotefib, either text (T) or data (D) after
loading remote.so.

the C compiler will generate an export section
when given the pragmas

	#pragma package fib
	#pragma ffi T localfib remotefib remote.so

needing #pragma package is a bit of a kludge
and hopefully could go away later.

this is just the 6 tool chain support.
other architectures will happen once 6 settles down.

code using this to do FFI is in a later CL.

R=r
DELTA=161  (141 added, 14 deleted, 6 changed)
OCL=33783
CL=33795
2009-08-24 16:15:21 -07:00
Robert Griesemer
c36fbdf713 - fix for multiple fields at same depth error
R=rsc
DELTA=9  (5 added, 0 deleted, 4 changed)
OCL=33768
CL=33785
2009-08-24 15:45:51 -07:00
Russ Cox
89f69bb3be gc: handle iface == nil in back end
R=ken
OCL=33778
CL=33781
2009-08-24 15:20:37 -07:00
Kai Backman
c6fd23ce6d 64bit literal RSH
R=rsc
APPROVED=rsc
DELTA=85  (35 added, 0 deleted, 50 changed)
OCL=33761
CL=33767
2009-08-24 13:57:04 -07:00
Russ Cox
14be733a25 bug197
R=ken
OCL=33765
CL=33765
2009-08-24 13:41:47 -07:00
Russ Cox
9feee91d79 avoid duplicate field names, so that bug132 can be fixed
also fix echo bug that just surfaced in mkerrors.sh

R=r
DELTA=67  (11 added, 19 deleted, 37 changed)
OCL=33743
CL=33757
2009-08-24 11:03:23 -07:00
Russ Cox
1f177cd8b2 linker work
* use //ffi comments in package import data
    to generate relocation entries and library loads.
  * call initffi in rt0.s if present

R=r
DELTA=117  (91 added, 3 deleted, 23 changed)
OCL=33739
CL=33750
2009-08-24 10:19:31 -07:00
Russ Cox
ef3e6810b8 bug189
R=ken
OCL=33745
CL=33745
2009-08-24 09:23:04 -07:00
Russ Cox
ac9d833c1e half of bug193
R=ken
OCL=33730
CL=33730
2009-08-23 18:09:44 -07:00
Russ Cox
fd6cdbd807 linker work
* more elf constants from FreeBSD
  * simple relocation demo

R=r
DELTA=410  (354 added, 49 deleted, 7 changed)
OCL=33689
CL=33729
2009-08-23 18:03:14 -07:00
Austin Clements
bd65739bc2 Implement line-to-PC mapping. Add unit tests for
PC/line/aline conversion methods.

R=rsc
APPROVED=rsc
DELTA=458  (434 added, 15 deleted, 9 changed)
OCL=33677
CL=33702
2009-08-21 18:13:35 -07:00
Russ Cox
59e2e54eab fix bug195
R=ken
OCL=33700
CL=33700
2009-08-21 18:07:11 -07:00
Russ Cox
e1c5d179d6 fix crash in bug194; add bug196
R=ken
OCL=33694
CL=33697
2009-08-21 17:54:07 -07:00
Kai Backman
f50e7b156e mostly 64 bit support.
- fixed a number of places where we tried to allocate 64bit
  regs. added honeypot in regalloc to catch these in the future.
- implemented quad copying in sgen
- cgen64.c, add, mul
- clearfat done
- D_REGREG output from 5g (linker already knew about them)
- gmove done
- optoas almost done, last bit probably not needed
- D_SHIFT support in list.c

R=rsc
APPROVED=rsc
DELTA=963  (711 added, 112 deleted, 140 changed)
OCL=33619
CL=33688
2009-08-21 16:29:19 -07:00
Russ Cox
0e25c1dc6d linker work
* remove now-unused D_SBIG (was for typestrings)
 * rename elf64.[ch] to elf.[ch]
 * pull in elf headers from FreeBSD instead of writing our own
 * emit non-header ELF data in data section
 * stub out a few more ELF sections needed for dynamic loading

R=r
DELTA=1928  (1237 added, 635 deleted, 56 changed)
OCL=33642
CL=33658
2009-08-21 13:08:11 -07:00
Kai Backman
005509e367 fix 386/arm builds
R=rsc
APPROVED=rsc
DELTA=2  (2 added, 0 deleted, 0 changed)
OCL=33640
CL=33645
2009-08-21 10:53:31 -07:00
Russ Cox
7b29dbb866 symbol bugs.
do not emit unreachable data symbols.

R=austin
DELTA=103  (71 added, 4 deleted, 28 changed)
OCL=33325
CL=33622
2009-08-20 17:33:28 -07:00
Russ Cox
bd4161fcba FFI step 2: can ask for libc.so.6.
introduced explicit "data" symbol instead of etext
to mark beginning of data, so that using larger
alignment (i.e. 4MB like GNU loader) doesn't
confuse garbage collector.

split dodata into dodata and dobss in preparation
for putting the dynamic data + headers in the data
segment instead of stuffed at the beginning of the binary.

R=r
DELTA=52  (37 added, 3 deleted, 12 changed)
OCL=33610
CL=33618
2009-08-20 16:09:38 -07:00
Russ Cox
5bd266d1ee add #include for time and ctime
R=r
DELTA=1  (1 added, 0 deleted, 0 changed)
OCL=33615
CL=33617
2009-08-20 16:06:06 -07:00
Nigel Tao
b58ecb11b0 Fix inflate.go's decompressing of a fixed Huffman block that has
length-distance pairs.

The new test data was generated by "gzip shesells.txt", which is
presumably what you (rsc) did before, for the other test cases in
gunzip_test.go.

R=rsc
APPROVED=rsc
DELTA=21  (17 added, 2 deleted, 2 changed)
OCL=33582
CL=33616
2009-08-20 16:03:34 -07:00
Russ Cox
8a45917f3d len and cap on chans
R=ken
OCL=33599
CL=33599
2009-08-20 11:12:04 -07:00
Russ Cox
52cf67a611 naming cleanup.
gzip.GzipInflater -> gzip.Inflater
gzip.NewGzipInflater -> gzip.NewInflater
zlib.NewZlibInflater -> zlib.NewInflater

io.ByteReader deleted in favor of bytes.Buffer
io.NewByteReader -> bytes.NewBuffer

R=r
DELTA=52  (3 added, 0 deleted, 49 changed)
OCL=33589
CL=33592
2009-08-20 10:18:48 -07:00
Russ Cox
364301efc6 exclude _test from godoc as well as _obj.
R=gri
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=33586
CL=33590
2009-08-20 09:49:05 -07:00
Kai Backman
8811896597 more work on adding in pieces. fixed my bad assumptions about
signed and unsigned integer conversions.

R=rsc
APPROVED=rsc
DELTA=398  (40 added, 230 deleted, 128 changed)
OCL=33546
CL=33569
2009-08-19 20:17:09 -07:00
Kai Backman
40b0786374 change from using /tmp to local directory
R=rsc
APPROVED=rsc
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=33534
CL=33567
2009-08-19 19:19:57 -07:00
Russ Cox
5600435fe4 produce diagnostic for
import "fmt"
var fmt = 1

R=ken
OCL=33556
CL=33561
2009-08-19 17:27:08 -07:00
Russ Cox
38df5ec58d try to do better line number reporting
in the presence of yacc lookahead.
better but still not perfect

R=ken
OCL=33541
CL=33541
2009-08-19 15:18:08 -07:00
Kai Backman
8e96b45fd6 genembedtramp for arm
R=rsc
APPROVED=rsc
DELTA=104  (0 added, 33 deleted, 71 changed)
OCL=33531
CL=33535
2009-08-19 13:57:11 -07:00
Russ Cox
63aeaa2a03 fix import dot bug
R=ken
OCL=33526
CL=33528
2009-08-19 11:32:46 -07:00
Kai Backman
0f17fc0e50 temporarily fix linux-arm by building less
R=rsc
APPROVED=rsc
DELTA=2  (1 added, 0 deleted, 1 changed)
OCL=33518
CL=33527
2009-08-19 11:31:27 -07:00
Rob Pike
4481df645b fix spelling that is correct but bothers me anyway
R=rsc
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=33496
CL=33519
2009-08-19 10:07:31 -07:00
Kai Backman
382a19c3de pkg/sort compiling and some progress on syscall. mostly
re-enabling and massaging code.

R=rsc
APPROVED=rsc
DELTA=2496  (1880 added, 330 deleted, 286 changed)
OCL=33487
CL=33504
2009-08-18 19:20:33 -07:00
David Symonds
6c7e90e7ec container/list: Add InsertBefore and InsertAfter methods.
R=rsc
APPROVED=rsc
DELTA=84  (68 added, 4 deleted, 12 changed)
OCL=33493
CL=33499
2009-08-18 17:49:44 -07:00
Austin Clements
b3062f176d Add a standard Seeker interface.
R=rsc
APPROVED=rsc
DELTA=35  (30 added, 4 deleted, 1 changed)
OCL=33491
CL=33498
2009-08-18 17:47:03 -07:00
Robert Griesemer
116b52d276 - fix performance bug (makeN always allocated a new vector)
- removed defs.go (moved declarations into arith.go where they belong)

R=r
DELTA=40  (16 added, 20 deleted, 4 changed)
OCL=33464
CL=33464
2009-08-18 11:48:47 -07:00
Robert Griesemer
ac5093fc22 fix 386 build:
- implememted empty stubs for 386 assembly routines
- removed assembly code operating on single words (except for one)
- adjusted tests

R=rsc
DELTA=126  (46 added, 67 deleted, 13 changed)
OCL=33461
CL=33461
2009-08-18 10:41:26 -07:00
Robert Griesemer
88742ef0cc - implemented Multiplication
- changed Cmp to return -1, 0, +1
- added corresponding test cases

R=rsc
DELTA=173  (136 added, 3 deleted, 34 changed)
OCL=33431
CL=33459
2009-08-18 10:06:15 -07:00
Kai Backman
5748c0868c simple arm continuous build target. will expand with time.
R=rsc
APPROVED=rsc
DELTA=61  (61 added, 0 deleted, 0 changed)
OCL=33438
CL=33454
2009-08-18 07:17:34 -07:00
Kai Backman
7a87a3e0df slashed warnings
R=rsc
APPROVED=rsc
DELTA=35  (2 added, 1 deleted, 32 changed)
OCL=33436
CL=33453
2009-08-18 07:16:10 -07:00
Kai Backman
e7acb5df07 fix runtime and compile regression
R=rsc
APPROVED=rsc
DELTA=6  (0 added, 0 deleted, 6 changed)
OCL=33434
CL=33452
2009-08-18 07:14:25 -07:00
Bill Neubauer
7f09b0177f Removing dead tests from chan.c
Since pres != nil was already checked and the routine sets *pres to false
and returns, the subsequent tests are unneeded.

R=rsc
APPROVED=rsc
DELTA=4  (0 added, 4 deleted, 0 changed)
OCL=33439
CL=33441
2009-08-17 22:21:48 -07:00
Nigel Tao
0d8ed14528 ZLIB reader for go.
R=rsc
APPROVED=rsc
DELTA=204  (204 added, 0 deleted, 0 changed)
OCL=33437
CL=33440
2009-08-17 22:03:13 -07:00