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

2060 Commits

Author SHA1 Message Date
Rob Pike
4d08d91192 fix build (Makefile comment convention)
R=rsc
OCL=33418
CL=33418
2009-08-17 15:38:24 -07:00
Robert Griesemer
b2eae40103 - updated Makefile, Make.deps
R=rsc,r
DELTA=5  (3 added, 0 deleted, 2 changed)
OCL=33413
CL=33417
2009-08-17 15:20:51 -07:00
Rob Pike
e1325d916e inline lib9.h
R=rsc
DELTA=41  (20 added, 2 deleted, 19 changed)
OCL=33412
CL=33415
2009-08-17 15:14:59 -07:00
Rob Pike
173ca5e7d3 delete old, c-output compiler. won't be open-sourced anyway
R=rsc
OCL=33407
CL=33409
2009-08-17 14:45:19 -07:00
Robert Griesemer
350a8e1a86 - rename files to match the data types they implement, adusted Makefile
- no other changes

R=r
DELTA=1248  (623 added, 623 deleted, 2 changed)
OCL=33371
CL=33371
2009-08-17 10:01:26 -07:00
Robert Griesemer
e5874223ef snapshot:
- renamed Z -> Int
- made Int ops methods on *Int
- "install" assembly routines dynamically
- replace mulVW functions with mulAddVWW
  of equivalent performance but symmetric functionality
  to divWVW
- implemented scanN

status:
- need mulNN (trivial)
- need division/modulo after which the set of
  elementary operations is complete
- to/from string conversion working

R=rsc
DELTA=320  (124 added, 50 deleted, 146 changed)
OCL=33308
CL=33341
2009-08-15 11:43:54 -07:00
Russ Cox
b21425ddee runtime gc bug.
semacquire might move to another m.

R=r
DELTA=5  (2 added, 2 deleted, 1 changed)
OCL=33317
CL=33326
2009-08-14 20:33:20 -07:00
Rob Pike
b0a0e3c439 remove compat stuff
R=rsc
DELTA=70  (16 added, 52 deleted, 2 changed)
OCL=33295
CL=33299
2009-08-14 14:55:22 -07:00
Austin Clements
dc6b4f4767 Zero thread structure so we don't continue with a bogus
signal.

R=rsc
APPROVED=rsc
DELTA=1  (1 added, 0 deleted, 0 changed)
OCL=33249
CL=33296
2009-08-14 14:47:44 -07:00
Austin Clements
92e8b121a0 Fix build
R=rsc
APPROVED=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=33294
CL=33294
2009-08-14 14:41:50 -07:00
Austin Clements
84852fe220 Make the runtime correctly decode the symbol table history
stacks produced by whole-package compilation.

Fix some off-by-ones in PC/line table parsing.  Hopefully.

R=rsc
APPROVED=rsc
DELTA=42  (24 added, 6 deleted, 12 changed)
OCL=33250
CL=33293
2009-08-14 14:36:49 -07:00
Russ Cox
ce9b379c90 no debug symbols for internal-only method types.
now 15% overhead instead of 30% in binaries.

R=ken
OCL=33235
CL=33288
2009-08-14 13:07:53 -07:00
Robert Griesemer
db3bf9c674 First cut at a more realistic multi-precision package:
- implemented low-level operations on word vectors
- implemented corresponding amd64 assembly routines for word vector operations
- implemented first set of operations on unsigned integers
- implemented first set of operations on signed integers
- implemented systematic test cases  for each data type

R=rsc
DELTA=1330  (1330 added, 0 deleted, 0 changed)
OCL=33132
CL=33285
2009-08-14 11:53:27 -07:00
Austin Clements
63810f840f Account for CALL instructions before looking up the function
at PC, to deal with functions that end with a CALL
instruction.  Special case known call-by-return functions.

R=rsc
APPROVED=rsc
DELTA=12  (6 added, 6 deleted, 0 changed)
OCL=33255
CL=33279
2009-08-14 11:09:53 -07:00
Rob Pike
00274a13cb rename libmach_amd64 libmach
R=rsc
OCL=33273
CL=33276
2009-08-14 10:46:04 -07:00
Robert Griesemer
ce1dd6cce3 - do not accept forward-declarations for structs and interfaces anymore
R=r
DELTA=49  (0 added, 14 deleted, 35 changed)
OCL=33272
CL=33272
2009-08-14 09:39:14 -07:00
Rob Pike
137c2204db add exits
R=rsc
DELTA=2339  (19 added, 2303 deleted, 17 changed)
OCL=33239
CL=33253
2009-08-13 18:22:44 -07:00
Austin Clements
dbecfbf86d Don't try to account for CALL instruction in 0th frame.
R=rsc
APPROVED=rsc
DELTA=9  (4 added, 3 deleted, 2 changed)
OCL=33238
CL=33251
2009-08-13 18:10:38 -07:00
Russ Cox
45ce825544 debugging symbols for 8g.
backtraces don't work,
but they didn't work when i started either.

R=ken
OCL=33230
CL=33230
2009-08-13 15:45:58 -07:00
Kai Backman
8149a8c666 fix typo
R=rsc
APPROVED=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=33209
CL=33227
2009-08-13 15:14:41 -07:00
Russ Cox
311c0b4807 6g/6l: add go type information to symbol table.
archive size +70%
  binary size +30%

old

wreck.mtv=; ls -l /Users/rsc/bin/{godoc,gofmt}
-rwxr-xr-x  1 rsc  eng  1487922 Aug 13 13:21 /Users/rsc/bin/godoc
-rwxr-xr-x  1 rsc  eng   995995 Aug 13 13:21 /Users/rsc/bin/gofmt
wreck.mtv=; du -sh $GOROOT/pkg/
9.5M	/home/rsc/go/pkg/
wreck.mtv=;

new

wreck.mtv=; ls -l /Users/rsc/bin/{godoc,gofmt}
-rwxr-xr-x  1 rsc  eng  2014390 Aug 13 14:25 /Users/rsc/bin/godoc
-rwxr-xr-x  1 rsc  eng  1268705 Aug 13 14:25 /Users/rsc/bin/gofmt
wreck.mtv=; du -sh $GOROOT/pkg
 16M	/home/rsc/go/pkg
wreck.mtv=;

R=ken
OCL=33217
CL=33220
2009-08-13 14:41:42 -07:00
Russ Cox
090efde407 makefile fixes; convert runtime to use new makefiles
R=r
DELTA=67  (17 added, 29 deleted, 21 changed)
OCL=33215
CL=33219
2009-08-13 14:41:10 -07:00
Rob Pike
f8295fcd0d rename mkasmh to mkasmh.sh
R=rsc
DELTA=204  (153 added, 49 deleted, 2 changed)
OCL=33213
CL=33213
2009-08-13 14:23:35 -07:00
Rob Pike
fd774f1a33 fix test
R=gri
DELTA=4  (0 added, 4 deleted, 0 changed)
OCL=33202
CL=33204
2009-08-13 13:33:11 -07:00
Rob Pike
cd32498ba5 change the names to have .sh suffixes.
also fix the comments in the generated files.

R=rsc
DELTA=949  (470 added, 465 deleted, 14 changed)
OCL=33197
CL=33201
2009-08-13 13:22:37 -07:00
Rob Pike
02cb81ad31 tests, .proto, .cgo
R=rsc
DELTA=38  (21 added, 3 deleted, 14 changed)
OCL=33193
CL=33200
2009-08-13 13:06:48 -07:00
Rob Pike
7b366e9c43 fix build
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=33174
CL=33174
2009-08-13 09:35:42 -07:00
Russ Cox
43f29e64a6 mechanism for putting go types into 6.out symbol table.
no types yet.

R=ken
OCL=33142
CL=33146
2009-08-12 18:16:24 -07:00
Russ Cox
f63b0d6b71 silence gcc warning
R=ken
OCL=33144
CL=33144
2009-08-12 18:14:07 -07:00
Russ Cox
d594639087 rm outfile if 6g exits with an error
R=ken
OCL=33134
CL=33141
2009-08-12 17:58:53 -07:00
Russ Cox
57a9bd0ee3 change gotype in symbol table from
character string to machine address.
not filled in, just carved out.

R=austin
DELTA=77  (11 added, 34 deleted, 32 changed)
OCL=33122
CL=33124
2009-08-12 16:14:53 -07:00
Russ Cox
3e98a40793 bug188 - sort(x)
R=ken
OCL=33123
CL=33123
2009-08-12 15:58:31 -07:00
Russ Cox
7dbb687048 rm gobuild
R=r
DELTA=827  (0 added, 826 deleted, 1 changed)
OCL=33117
CL=33120
2009-08-12 15:17:47 -07:00
Russ Cox
a92610208e delete code for forward type declarations
R=ken
OCL=33108
CL=33113
2009-08-12 14:41:13 -07:00
Russ Cox
8db677b0a7 delete heuristic left over from incremental compilation
R=r
DELTA=31  (2 added, 28 deleted, 1 changed)
OCL=33064
CL=33112
2009-08-12 14:41:02 -07:00
Russ Cox
b5c57fea96 delete forward type declarations
R=r
DELTA=163  (1 added, 149 deleted, 13 changed)
OCL=33106
CL=33111
2009-08-12 14:40:47 -07:00
Russ Cox
ff5618e2e3 avoid unnecessary installs
R=r
DELTA=6  (4 added, 0 deleted, 2 changed)
OCL=33107
CL=33110
2009-08-12 14:40:29 -07:00
Rob Pike
96a2a2effd fix linux build for whole package compilation
R=rsc
OCL=33103
CL=33103
2009-08-12 13:51:02 -07:00
Russ Cox
a5bf45e389 convert gob to whole-package compilation.
had to reorder some init code.

R=r
DELTA=136  (15 added, 110 deleted, 11 changed)
OCL=33071
CL=33102
2009-08-12 13:19:27 -07:00
Russ Cox
b04ac108fd convert non-low-level non-google pkg code
to whole-package compilation.

R=r
OCL=33070
CL=33101
2009-08-12 13:19:17 -07:00
Russ Cox
eda49f331f new included Make.pkg for handwritten package makefiles.
gobuild is obsolete; don't build it (will delete eventually).

revised gotest for whole-package compilation.

R=r
DELTA=102  (68 added, 6 deleted, 28 changed)
OCL=33067
CL=33098
2009-08-12 13:18:46 -07:00
Russ Cox
3b864e4195 convert low-level (used by testing) packages to
whole-package compilation.  new Makefiles,
tests now in separate package

	bytes
	flag
	fmt
	io
	math
	once
	os
	reflect
	strconv
	sync
	time
	utf8

delete import "xxx" in package xxx.

inside package xxx, xxx is not declared
anymore so s/xxx.//g

delete file and package level forward declarations.

note the new internal_test.go and sync
and strconv to provide public access to
internals during testing.  the installed version
of the package omits that file and thus does
not open the internals to all clients.

R=r
OCL=33065
CL=33097
2009-08-12 13:18:37 -07:00
Russ Cox
dd5f32330c 6g: save all 64 bits of AX/DX
8g: save AX/DX around div

R=ken
OCL=33094
CL=33096
2009-08-12 13:18:27 -07:00
Russ Cox
66bb399fdd whole-package compilation
R=ken
OCL=33063
CL=33095
2009-08-12 13:18:19 -07:00
Russ Cox
866b272336 bug186 - f(iota)
R=ken
OCL=33051
CL=33051
2009-08-11 17:05:22 -07:00
Rob Pike
68e250516c make a simpler regexp implementation with fewer dependencies and put it inside testing.
remove "regexp." from regexp tests.

R=rsc
DELTA=1173  (1152 added, 1 deleted, 20 changed)
OCL=33028
CL=33037
2009-08-11 13:54:47 -07:00
Rob Pike
d08f0067b5 commentary about extern register
R=rsc
DELTA=16  (12 added, 0 deleted, 4 changed)
OCL=33030
CL=33035
2009-08-11 13:30:35 -07:00
Robert Griesemer
fed0435257 renamed fast.arith.s to include $GOARCH
R=rsc
DELTA=80  (40 added, 40 deleted, 0 changed)
OCL=33024
CL=33027
2009-08-11 11:23:05 -07:00
Russ Cox
0496040bd6 remove unnecessary pkg. references
R=r
DELTA=95  (0 added, 0 deleted, 95 changed)
OCL=33012
CL=33012
2009-08-10 22:02:51 -07:00
Russ Cox
7732f79daa fix indirect error
x.go:3: invalid indirect of X (type int)

was
x.go:3: invalid indirect of nil

R=ken
OCL=33008
CL=33008
2009-08-10 18:19:32 -07:00
Robert Griesemer
8db8682453 - factored out 128-bit muladd and div into arith.go
- wrote corresponding fast versions in fast.arith.s
- implemented in-place operations for some routines
- updated existing code to be compatible with in-place
  routines

These changes allow the pidigits benchmark to run
approx. 30% faster. Enabling the assembly routines
in fast.arith.s will give another approx. 3%.

R=r
DELTA=486  (252 added, 68 deleted, 166 changed)
OCL=32980
CL=33003
2009-08-10 17:29:55 -07:00
Russ Cox
3f91f80a21 8-bit div and mod
R=ken
OCL=32975
CL=32975
2009-08-10 12:46:23 -07:00
Ken Thompson
f70e285178 bug in int8 mod
R=rsc
OCL=32971
CL=32971
2009-08-10 11:20:33 -07:00
Stephen Ma
e4603db393 Add methods AllMatches, AllMatchesString, AllMatchesIter,
AllMatchesStringIter, based on sawn and sawzall functions in sawzall.

APPROVED=rsc
DELTA=218  (218 added, 0 deleted, 0 changed)
OCL=32408
CL=32949
2009-08-09 19:30:47 -07:00
Ken Thompson
60238e25bf increase from 3 to 11 floating registers
R=rsc
OCL=32947
CL=32947
2009-08-09 16:42:21 -07:00
Ken Thompson
34f76b5de5 1. integer division by a constant done.
2. moved functions from 6g to gc
for portability to other families.
3. added rotate-carry instructions to
peek and reg.

R=rsc
OCL=32946
CL=32946
2009-08-09 15:16:06 -07:00
David Symonds
ffed3ade19 Regenerate v7.tar with a real V7 tar.
Fix octal parsing that it unearthed.

R=rsc
APPROVED=rsc
DELTA=11  (5 added, 0 deleted, 6 changed)
OCL=32924
CL=32945
2009-08-09 15:03:30 -07:00
Rob Pike
266a2c47e0 run benchmarks in a relatively fast test mode, as part of run.bash/all.bash
R=rsc
DELTA=293  (224 added, 0 deleted, 69 changed)
OCL=32917
CL=32944
2009-08-09 14:31:05 -07:00
Ken Thompson
812f06b3ca another plateau - almost done
only need to fix up certain
denominators

R=rsc
OCL=32928
CL=32928
2009-08-08 16:53:21 -07:00
Ken Thompson
07044ba6e5 plateau in divide by a constant
still to do - overflow, mod

R=rsc
OCL=32927
CL=32927
2009-08-08 15:26:09 -07:00
Ken Thompson
8b8a2bd945 more work on divide by constant.
no real change -- disabled because of bugs

R=rsc
OCL=32923
CL=32923
2009-08-07 20:21:04 -07:00
Russ Cox
6be0f50b97 bug159
R=ken
OCL=32902
CL=32914
2009-08-07 16:47:54 -07:00
Russ Cox
002623704f remove 8.out before creating it.
hope this will work around Mac NFS bug
where writing to an 8.out that has crashed
recently sometimes wedges NFS.

R=r
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=32906
CL=32908
2009-08-07 15:22:09 -07:00
Russ Cox
39b12e2dcb bug185 - return b,a from func() (a,b int)
R=ken
OCL=32900
CL=32900
2009-08-07 14:38:31 -07:00
Russ Cox
d1ee5d6e8f bug184 - assignment compatibility in unpacked multireturn
R=ken
OCL=32890
CL=32894
2009-08-07 14:00:18 -07:00
Russ Cox
aa7bd48389 bug183 - embedded vs non-embedded struct field in eqtype
R=ken
OCL=32888
CL=32888
2009-08-07 13:23:09 -07:00
Russ Cox
468f244416 bug182 - compiler crash
R=ken
OCL=32887
CL=32887
2009-08-07 13:17:28 -07:00
Russ Cox
6c2738eb43 bug181 - type T *struct { T } is an invalid embedded type
R=ken
OCL=32886
CL=32886
2009-08-07 13:14:01 -07:00
Russ Cox
99eca57d43 clean up a few error messages;
disable func redeclaration mismatch test;
fix golden.out

R=ken
OCL=32883
CL=32883
2009-08-07 13:00:20 -07:00
Russ Cox
76a763e0be 8 shift bug
R=ken
OCL=32882
CL=32882
2009-08-07 12:57:44 -07:00
Russ Cox
b648716ee9 forward declarations not necessary.
still to do:
	* initializer cycle detection
	* nicer error for type checking cycles

R=ken
OCL=32855
CL=32880
2009-08-07 12:50:26 -07:00
Ken Thompson
f1baf78247 divide by a constant power of 2
R=rsc
OCL=32858
CL=32858
2009-08-06 22:33:12 -07:00
Robert Griesemer
081bc69cde - initial version of pidigits.go benchmark
- extra bignum.go functionality for pidigits.go
- tuned bignum multiplication

R=r
DELTA=193  (186 added, 0 deleted, 7 changed)
OCL=32852
CL=32856
2009-08-06 18:16:51 -07:00
Robert Griesemer
2b87d95f01 - allow more general type switch syntax
- support for reverse printing of AST
  (for compiler testing)
- added -reverse flag to gofmt

R=rsc
DELTA=163  (125 added, 11 deleted, 27 changed)
OCL=32808
CL=32853
2009-08-06 17:44:56 -07:00
Rob Pike
7955490de2 add runtime.GOMAXPROCS, allowing a program to, in effect, set $GOMAXPROCS
R=rsc
DELTA=29  (28 added, 1 deleted, 0 changed)
OCL=32829
CL=32837
2009-08-06 13:07:05 -07:00
Robert Griesemer
5876cb0e63 - bufio.ReadRune fix for empty reads w/o errors
- added testcases

R=rsc
DELTA=61  (56 added, 2 deleted, 3 changed)
OCL=32831
CL=32834
2009-08-06 12:05:16 -07:00
Robert Griesemer
2117ad192d minor fix
R=rsc
DELTA=2  (1 added, 1 deleted, 0 changed)
OCL=32828
CL=32830
2009-08-06 10:53:29 -07:00
Robert Griesemer
a288095813 - FieldByName lookup through anonymous fields
- FieldByIndex
- changed StructField.Index type from int -> []int
- adjustments to reflect clients

R=rsc,r
DELTA=336  (263 added, 47 deleted, 26 changed)
OCL=32731
CL=32802
2009-08-05 15:56:44 -07:00
Rob Pike
3355cadf3f support []byte (more efficient) as well as string in the interfaces.
change the names; Match is for []byte and MatchString is for string, etc.

R=rsc
DELTA=195  (155 added, 0 deleted, 40 changed)
OCL=32800
CL=32800
2009-08-05 15:44:45 -07:00
Rob Pike
5a4d431dd1 special case: recognize '[^\n]' and make it as fast as '.'
R=rsc
DELTA=25  (23 added, 1 deleted, 1 changed)
OCL=32793
CL=32799
2009-08-05 14:40:34 -07:00
Austin Clements
3776f31144 Make os.RemoveAll return no error if path does not exist.
This fixes a problem introduced by CL 32684 into gobuild,
which used to use 'rm -rf' to remove the _obj directory.

R=rsc
APPROVED=rsc
DELTA=8  (4 added, 0 deleted, 4 changed)
OCL=32794
CL=32796
2009-08-05 14:18:54 -07:00
Russ Cox
2609731736 delay range processing. old2new is gone
R=ken
OCL=32780
CL=32780
2009-08-05 02:33:30 -07:00
Russ Cox
54b403723b delay := processing
R=ken
OCL=32772
CL=32772
2009-08-05 00:42:44 -07:00
Russ Cox
ebdbbe0f49 fix amd64 build
R=ken
OCL=32771
CL=32771
2009-08-05 00:11:24 -07:00
Russ Cox
a121410541 make Syms smaller.
collapse a lot of duplication in dcl.c
switch to NodeList* from Dcl*

R=ken
OCL=32770
CL=32770
2009-08-04 22:59:23 -07:00
Russ Cox
4dec8ef35a get function calls out of the way before
allocating registers in shift and div.

fix behavior when res == a reserved register.

R=ken
OCL=32765
CL=32767
2009-08-04 19:16:57 -07:00
Russ Cox
aa347c4a0d move various bits of code around
and delete some dead code.
no actual changes here.

R=ken
OCL=32764
CL=32764
2009-08-04 18:43:32 -07:00
Russ Cox
d169dcee3b fix division bug
R=ken
OCL=32760
CL=32760
2009-08-04 17:59:10 -07:00
Russ Cox
dbe004efe4 delayed evaluation of var blocks
R=ken
OCL=32750
CL=32753
2009-08-04 16:53:06 -07:00
Rob Pike
b8732215c3 fix build
R=gri,rsc
OCL=32748
CL=32748
2009-08-04 15:35:58 -07:00
Russ Cox
7144e2d7f5 trailing newlines
R=r
DELTA=0  (0 added, 0 deleted, 0 changed)
OCL=32730
CL=32735
2009-08-04 14:22:23 -07:00
Russ Cox
f7a867e1a6 move select into its own file.
split into typecheck + walk

R=ken
OCL=32726
CL=32726
2009-08-04 12:57:48 -07:00
Russ Cox
d8c19c80dc type checking of assignments, switch, if, for
R=ken
OCL=32716
CL=32720
2009-08-04 10:26:29 -07:00
Rob Pike
7deeb5bd78 print profile to stderr. sheesh.
R=rsc
DELTA=40  (0 added, 0 deleted, 40 changed)
OCL=32694
CL=32698
2009-08-03 21:03:40 -07:00
Rob Pike
2495c14d5c WriteString
R=rsc
DELTA=41  (41 added, 0 deleted, 0 changed)
OCL=32692
CL=32697
2009-08-03 18:28:05 -07:00
Rob Pike
f17c6bcafb this time really clean up a TODO
R=rsc
DELTA=28  (0 added, 20 deleted, 8 changed)
OCL=32676
CL=32684
2009-08-03 15:27:15 -07:00
Rob Pike
cb9c973829 don't crash printing a nil map
R=rsc
DELTA=19  (18 added, 0 deleted, 1 changed)
OCL=32656
CL=32670
2009-08-03 13:34:20 -07:00
Russ Cox
9dc22b6d6f more 6g reorg; checkpoint.
typecheck.c is now responsible for all type checking
except for assignment and function argument "..."

R=ken
OCL=32661
CL=32667
2009-08-03 11:58:52 -07:00
Robert Griesemer
178089056e printer.go:
- emit line tag id's in html mode
- support for general html tags
- better names for a few identifiers

godoc.go:
- emit links from exported names to source code
  (actual placement needs fine-tuning)

R=rsc
DELTA=108  (68 added, 4 deleted, 36 changed)
OCL=32639
CL=32654
2009-08-03 09:53:00 -07:00
Robert Griesemer
22ec539920 fix long-standing bug in doc reader:
- replace forward-declared types with complete
  declaration when it is found

R=rsc
DELTA=23  (15 added, 0 deleted, 8 changed)
OCL=32618
CL=32618
2009-07-31 18:40:11 -07:00