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

973 Commits

Author SHA1 Message Date
Rob Pike
1b3299ed0b change the representation of arrays in protobufs from *[]item to []item.
for simplicity of user's code, optional arrays of bytes also don't have a pointer.
requires adding a "Set()" method to arrays in reflect.
still to do: protocol compilers, google/net/rpc.

R=rsc
DELTA=227  (36 added, 95 deleted, 96 changed)
OCL=23387
CL=23389
2009-01-23 12:40:55 -08:00
Russ Cox
f4279f587a fix build - missed this file
TBR=r
OCL=23335
CL=23335
2009-01-22 16:49:11 -08:00
Russ Cox
1f8a40d85c move math routines from package sys to package math,
though they still build in src/runtime.

use cgo instead of hand-written wrappers.

R=r
DELTA=740  (289 added, 300 deleted, 151 changed)
OCL=23326
CL=23331
2009-01-22 16:23:44 -08:00
Russ Cox
8c5bc7e93a use $GC, $GL in gotest, to match gccgo's gotest.
use $GC in all_test.go for portability.

R=r
DELTA=19  (12 added, 0 deleted, 7 changed)
OCL=23305
CL=23325
2009-01-22 15:41:12 -08:00
Russ Cox
d9abca81c0 let test sources specify commands to run
before their compilation.

R=r
OCL=23300
CL=23300
2009-01-22 14:23:50 -08:00
Rob Pike
c5f99ccbdd change reflect.CopyArray into a method on ArrayValue called CopyFrom
R=rsc
DELTA=16  (12 added, 0 deleted, 4 changed)
OCL=23242
CL=23242
2009-01-21 15:45:54 -08:00
Russ Cox
61590c4c44 disallow P.t for lowercase t and not our package P.
implement hiding lowercase methods m in
signatures by adding in a hash of the package name
to the type hash code.

remove remaining checks for internally-generated _ names:
they are all gone.

R=ken
OCL=23236
CL=23238
2009-01-21 14:51:57 -08:00
Russ Cox
c3fa54c48b delete unused code and data from 6.outs.
cuts simple test binary by 7%.
would be more except for reflection.

R=r
DELTA=126  (117 added, 4 deleted, 5 changed)
OCL=23163
CL=23237
2009-01-21 14:50:27 -08:00
Russ Cox
35e37bbf41 6g: better genembedtramp fatal error,
and don't put inaccessible private methods
   in signature.

R=ken
OCL=23138
CL=23140
2009-01-20 15:36:57 -08:00
Russ Cox
a3c4faf83f 6l: do not link in objects from an archive just for init functions.
(makes go libraries behave more like c libraries.)

R=r
DELTA=85  (67 added, 12 deleted, 6 changed)
OCL=23133
CL=23139
2009-01-20 15:36:43 -08:00
Russ Cox
839a68469b delete export
TBR=r
OCL=23121
CL=23127
2009-01-20 14:40:40 -08:00
Russ Cox
0183baaf44 * delete export
* rename init functions

R=ken
OCL=23122
CL=23126
2009-01-20 14:40:00 -08:00
Russ Cox
8f14451fe5 6l: ignore undefined symbols in gotypesigs.
they end up in the symbol table with type==0
   if they are in a library but not pulled in.
   also add a few debugging prints.

R=r
DELTA=11  (5 added, 1 deleted, 5 changed)
OCL=23104
CL=23108
2009-01-20 13:21:22 -08:00
Rob Pike
b74e3b95cf add a couple of helper methods to io.ByteBuffer
R=rsc
DELTA=456  (9 added, 2 deleted, 445 changed)
OCL=23107
CL=23107
2009-01-20 12:57:25 -08:00
Russ Cox
f48cbfdf56 convert tests; nothing interesting.
R=r
OCL=23012
CL=23014
2009-01-16 16:12:14 -08:00
Russ Cox
aec4d3194a disallow other package's names in method calls
R=ken
OCL=22999
CL=22999
2009-01-16 15:35:07 -08:00
Russ Cox
aedf121e30 casify struct fields in entire tree.
TBR=r
OCL=22997
CL=22997
2009-01-16 15:28:33 -08:00
Russ Cox
06869eedf9 disallow other package's names in struct field dot.
R=ken
OCL=22996
CL=22996
2009-01-16 15:25:52 -08:00
Ian Lance Taylor
03c40f5122 Change malloc.Lookup to return the size as uintptr rather than
uint64.  This changes the Go code to be consistent with the C
code.

R=rsc
DELTA=6  (0 added, 0 deleted, 6 changed)
OCL=22983
CL=22987
2009-01-16 15:03:22 -08:00
Ian Lance Taylor
6e4b9c696f Remove types from constants, since they didn't match what
Tick() expected.

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=22979
CL=22986
2009-01-16 14:59:27 -08:00
Russ Cox
360962420c casify, cleanup sys
R=r
OCL=22978
CL=22984
2009-01-16 14:58:14 -08:00
Rob Pike
ec9f2b0cd4 casify linux syscall dependents, plus a few stragglers
R=rsc
DELTA=97  (0 added, 0 deleted, 97 changed)
OCL=22971
CL=22973
2009-01-16 14:16:31 -08:00
Rob Pike
605ee5a3ef s/split/Split/ to get compiling again
R=rsc
OCL=22967
CL=22967
2009-01-16 13:55:55 -08:00
Rob Pike
db1656f3e6 two more casifications in fmt
R=rsc
DELTA=14  (0 added, 0 deleted, 14 changed)
OCL=22960
CL=22962
2009-01-16 13:29:43 -08:00
Rob Pike
55ebef615b casify flag.
R=rsc
DELTA=16  (0 added, 9 deleted, 7 changed)
OCL=22959
CL=22961
2009-01-16 13:19:43 -08:00
Rob Pike
ed2ac9b8b0 casify reflect.
R=rsc
DELTA=513  (0 added, 2 deleted, 511 changed)
OCL=22954
CL=22956
2009-01-16 12:48:07 -08:00
Russ Cox
aedfb397ae casify misc
R=r
DELTA=247  (20 added, 50 deleted, 177 changed)
OCL=22951
CL=22955
2009-01-16 12:47:24 -08:00
Robert Griesemer
116a6e9c9c - more bignum_test letter case fixes
R=r
OCL=22952
CL=22952
2009-01-16 12:04:40 -08:00
Rob Pike
1a91b9a8a9 casify syscall and sequelae
R=rsc
DELTA=337  (0 added, 1 deleted, 336 changed)
OCL=22950
CL=22950
2009-01-16 11:36:44 -08:00
Russ Cox
5d41f55acc casify http
R=r
DELTA=33  (0 added, 0 deleted, 33 changed)
OCL=22947
CL=22949
2009-01-16 11:06:42 -08:00
Russ Cox
c840657fe1 casify DNS
R=r
DELTA=221  (0 added, 0 deleted, 221 changed)
OCL=22946
CL=22948
2009-01-16 11:04:44 -08:00
Russ Cox
dec12d3654 re-export of bools was changing
format from hex to decimal, confusing
ar's strcmp-based value comparison.

switched export format to "true" or "false"
to keep bools separate from ints.

R=ken
OCL=22944
CL=22944
2009-01-16 10:45:28 -08:00
Rob Pike
794efd7e78 recasify regexp to use underscores and clean up the tests more
R=rsc
DELTA=174  (0 added, 0 deleted, 174 changed)
OCL=22917
CL=22942
2009-01-16 10:34:36 -08:00
Rob Pike
4b590bf985 casify a few more
R=rsc
DELTA=72  (0 added, 9 deleted, 63 changed)
OCL=22918
CL=22941
2009-01-16 10:34:21 -08:00
Russ Cox
393df07914 casify json
R=r
DELTA=163  (0 added, 0 deleted, 163 changed)
OCL=22910
CL=22939
2009-01-16 10:14:38 -08:00
Russ Cox
d2cdcfc1c8 casify hash
R=r
DELTA=235  (6 added, 26 deleted, 203 changed)
OCL=22907
CL=22938
2009-01-16 10:14:28 -08:00
Russ Cox
e83c85accb casify time
R=r
DELTA=103  (1 added, 0 deleted, 102 changed)
OCL=22914
CL=22937
2009-01-16 10:14:12 -08:00
Russ Cox
2c8d9a5619 redo and clean up math.
R=r
DELTA=243  (60 added, 72 deleted, 111 changed)
OCL=22909
CL=22912
2009-01-15 19:11:32 -08:00
Russ Cox
c1e7e270f1 don't crash on:
package main
var x int
type x struct { a int }

R=ken
OCL=22903
CL=22903
2009-01-15 17:32:31 -08:00
Russ Cox
8a7cbadbbe convert strconv
R=r
DELTA=568  (0 added, 9 deleted, 559 changed)
OCL=22898
CL=22901
2009-01-15 17:22:17 -08:00
Rob Pike
74a60ed08a casify lib/regexp
R=rsc
DELTA=259  (0 added, 0 deleted, 259 changed)
OCL=22897
CL=22900
2009-01-15 17:22:15 -08:00
Russ Cox
605d0746c5 catch export on func.
print names in message.

R=ken
OCL=22891
CL=22891
2009-01-15 16:43:51 -08:00
Rob Pike
33f3ed7710 casify fixup for bufio
R=rsc
DELTA=88  (0 added, 12 deleted, 76 changed)
OCL=22884
CL=22890
2009-01-15 16:22:57 -08:00
Russ Cox
3decb42e6f add warning for export of lowercase too.
R=ken
OCL=22887
CL=22887
2009-01-15 16:20:21 -08:00
Russ Cox
07d344e442 remove export name-list statement.
make package local the default.
warn about name case not matching export keyword.

R=ken
OCL=22881
CL=22886
2009-01-15 16:16:52 -08:00
Russ Cox
b54133d200 make safe for new package local defaults
R=r
DELTA=462  (9 added, 33 deleted, 420 changed)
OCL=22879
CL=22885
2009-01-15 16:16:42 -08:00
Rob Pike
1d74892178 more casifying fixups
R=rsc
DELTA=213  (0 added, 0 deleted, 213 changed)
OCL=22878
CL=22882
2009-01-15 16:03:27 -08:00
Rob Pike
497bb9c07d casify fmt and its dependents.
R=rsc
DELTA=224  (0 added, 2 deleted, 222 changed)
OCL=22875
CL=22875
2009-01-15 15:40:27 -08:00
Rob Pike
8559e3ad54 diagnose missing symbols instead of
silently miscompiling.

R=rsc
OCL=22872
CL=22872
2009-01-15 15:21:12 -08:00
Robert Griesemer
e28692f07d - converted tabwriter to new naming scheme
R=r
OCL=22870
CL=22870
2009-01-15 15:10:46 -08:00
Robert Griesemer
f4babf6931 - missed a few identifiers
R=r
OCL=22864
CL=22864
2009-01-15 14:49:40 -08:00
Robert Griesemer
364a852027 - lowercase non-exported functions in bignum
R=r
DELTA=117  (1 added, 0 deleted, 116 changed)
OCL=22764
CL=22863
2009-01-15 14:46:31 -08:00
Rob Pike
61f3302044 printf->Printf etc.
the raw fmt routines will be another, smaller but subtler pass.

R=rsc
DELTA=157  (0 added, 0 deleted, 157 changed)
OCL=22851
CL=22851
2009-01-15 13:48:11 -08:00
Russ Cox
5ea8ac78a8 add unicode library stub with just
IsUpper and IsLetter.

R=r
DELTA=746  (746 added, 0 deleted, 0 changed)
OCL=22743
CL=22750
2009-01-14 14:05:00 -08:00
Ian Lance Taylor
2b57a1124e Add cgo2c program to translate mixed Go/C code into C. This
lets us use a single source file for both 6c and gcc, handling
the incompatible handling of return values.

R=rsc
DELTA=649  (613 added, 35 deleted, 1 changed)
OCL=22682
CL=22730
2009-01-14 08:21:25 -08:00
Russ Cox
58b280db3b change another yacc reference to bison.
R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=22662
CL=22691
2009-01-13 16:32:46 -08:00
Russ Cox
8fb60768c3 in 6g -r (the rsc flag),
rewrite heap pointer moves as xchg.

R=ken
OCL=22665
CL=22665
2009-01-13 13:46:09 -08:00
Ian Lance Taylor
1a0bde24ae Add USED declarations for SysUnused parameters.
R=rsc
DELTA=2  (2 added, 0 deleted, 0 changed)
OCL=22640
CL=22642
2009-01-13 10:24:06 -08:00
Ian Lance Taylor
9b8da82d72 Tweak code to make it easier to compile with gcc.
+ Use macros to name symbols with non-ASCII characters.
  + Make some variables unsigned, because they are compared
    against unsigned values.
  + Fix a few void* pointers to be MLink*.

R=rsc
DELTA=94  (44 added, 3 deleted, 47 changed)
OCL=22303
CL=22638
2009-01-13 09:55:24 -08:00
Russ Cox
0c32430534 free(nil)
R=iant
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=22467
CL=22471
2009-01-09 16:22:13 -08:00
Russ Cox
a3ed4e716a add sys.caller
R=r
DELTA=139  (101 added, 38 deleted, 0 changed)
OCL=22462
CL=22466
2009-01-09 15:52:43 -08:00
Russ Cox
ae167bf08f clean up automatic indirect, delete some dead code.
R=ken
OCL=22454
CL=22457
2009-01-09 15:21:41 -08:00
Russ Cox
316d377ac2 now that TCHAN, TMAP, and TSTRING are real types,
can do methods on them without pointer worries.

R=ken
OCL=22434
CL=22436
2009-01-09 13:50:58 -08:00
Rob Pike
c45d2a767c simplify flag interface. no more BVal etc. you just get a pointer.
fixed everything except the tutorial.

R=rsc
DELTA=404  (94 added, 139 deleted, 171 changed)
OCL=22414
CL=22422
2009-01-09 13:42:46 -08:00
Russ Cox
863dafb9ae typo
R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=22411
CL=22411
2009-01-09 11:17:13 -08:00
Russ Cox
8f5bba0d82 silence gcc warnings.
not sure if the warning in reg.c was a real bug.

R=ken
OCL=22408
CL=22410
2009-01-09 11:13:59 -08:00
Russ Cox
a91af04c06 6g cleanup suggested by ken.
remove TPTR wrapper around TMAP, TCHAN, TSTRING.

R=ken
OCL=22406
CL=22409
2009-01-09 11:13:39 -08:00
Russ Cox
484ba939d2 update sys.reflect and sys.unreflect to accomodate
the possibility of large objects in interface values.

R=r
DELTA=171  (97 added, 22 deleted, 52 changed)
OCL=22382
CL=22382
2009-01-09 00:17:46 -08:00
Russ Cox
e512481b17 second pass on interface fixes and tests.
R=ken
OCL=22370
CL=22372
2009-01-08 18:06:06 -08:00
Robert Griesemer
8b8a862da8 - removed temporary work-arounds from bignum_test, not needed anymore
R=r
DELTA=93  (0 added, 61 deleted, 32 changed)
OCL=22348
CL=22366
2009-01-08 17:38:24 -08:00
Rob Pike
ab331f7a7d new sort interface - no structs, just slices.
R=rsc
DELTA=37  (0 added, 7 deleted, 30 changed)
OCL=22330
CL=22342
2009-01-08 15:12:00 -08:00
Russ Cox
1b7881adb4 fix:
type T []int
	var a []int
	var t = T(a)

R=ken
OCL=22341
CL=22341
2009-01-08 15:01:22 -08:00
Russ Cox
c0b8a7965a typo
R=ken
OCL=22327
CL=22327
2009-01-08 14:31:11 -08:00
Russ Cox
20595ac4b0 many interface bug fixes.
also, after
	func g() (int, int)
	func f(int, int)
allow
	f(g())
and
	func h() (int, int) { return g() }

R=ken
DELTA=356  (252 added, 26 deleted, 78 changed)
OCL=22319
CL=22325
2009-01-08 14:30:00 -08:00
Ian Lance Taylor
7843a14df1 Remove duplicate typedef declarations.
R=rsc
DELTA=7  (0 added, 7 deleted, 0 changed)
OCL=22267
CL=22281
2009-01-08 09:45:42 -08:00
Rob Pike
289ff7d0e4 Cache *os.Error values across all users.
R=rsc
DELTA=27  (23 added, 0 deleted, 4 changed)
OCL=22245
CL=22245
2009-01-07 16:37:43 -08:00
Ken Thompson
eed3addb9d more
R=r
OCL=22240
CL=22240
2009-01-07 15:54:08 -08:00
Ken Thompson
3f135be389 conversion from closed array to slice
R=r
OCL=22236
CL=22236
2009-01-07 15:26:11 -08:00
Russ Cox
1b1f1b53ea correct signature generation decision
for non-pointer types with methods.

R=r
DELTA=37  (13 added, 14 deleted, 10 changed)
OCL=22217
CL=22219
2009-01-07 13:29:03 -08:00
Ken Thompson
c458c98388 [...] bug
R=r
OCL=22218
CL=22218
2009-01-07 13:20:10 -08:00
Russ Cox
855495eab6 iscomposite test in OCONV is unnecessary
now that OCOMP exists

R=ken
OCL=22216
CL=22216
2009-01-07 12:39:48 -08:00
Ken Thompson
179af0bb19 clear automatic arrays created with literals
R=r
OCL=22215
CL=22215
2009-01-07 12:28:23 -08:00
Ken Thompson
b0f627a6e1 closed arrays including [...]
R=r
OCL=22182
CL=22182
2009-01-06 17:31:24 -08:00
Robert Griesemer
af065a0c77 - make code in gosrc compile again, check in all pending changes
(this code doesn't match the existing language at this point,
  but it's a large code base which compiles - will eventually go
  away)
- enable compilation of it again in run.bash

R=r
DELTA=1147  (534 added, 311 deleted, 302 changed)
OCL=22176
CL=22176
2009-01-06 16:26:45 -08:00
Rob Pike
8d21004b41 make the tutorial programs run again.
(the text still needs fixing)
add the tutorial programs to the test run.

R=rsc
DELTA=41  (6 added, 0 deleted, 35 changed)
OCL=22174
CL=22174
2009-01-06 15:49:27 -08:00
Russ Cox
84953bdaa8 fix newfn
R=ken
OCL=22173
CL=22173
2009-01-06 15:39:28 -08:00
Rob Pike
344b16512c update utf8_test.go
R=rsc
OCL=22170
CL=22170
2009-01-06 15:30:07 -08:00
Russ Cox
dabdfa6cce new new &Point{1,2}
R=ken
OCL=22168
CL=22168
2009-01-06 15:24:12 -08:00
Russ Cox
5564504507 new new & make
R=r
OCL=22166
CL=22166
2009-01-06 15:19:02 -08:00
Ken Thompson
88b5c5f0f8 make for slice/map/chan
new for pointers

R=r
OCL=22158
CL=22158
2009-01-06 14:52:26 -08:00
Rob Pike
1da03aaef7 A richer interface for regexps. Simple boolean matcher, a vector of strings rather than
indexes, and a global boolean function for quick action.

R=rsc
DELTA=152  (127 added, 12 deleted, 13 changed)
OCL=22140
CL=22142
2009-01-06 13:54:53 -08:00
Russ Cox
af0143ce03 make 8a, 8c, 8l build in go environment.
,s/int32/long/g in 8a, 8c, 8l.
delete dead code.
move enam.c, 8.out.h, mkenam from 8c to 8l.

R=r
DELTA=1850  (581 added, 983 deleted, 286 changed)
OCL=22119
CL=22129
2009-01-06 11:34:02 -08:00
Russ Cox
d8c7980514 comment sudoaddable;
remove unused second parameter.

R=ken
OCL=22126
CL=22126
2009-01-06 11:23:58 -08:00
Russ Cox
8318187f77 delete blyacc
R=r
DELTA=3562  (0 added, 3560 deleted, 2 changed)
OCL=22112
CL=22114
2009-01-06 09:53:38 -08:00
Russ Cox
859ba57bbb make acid build with bison.
ask for bison explicitly in cc, gc to try to
avoid problems with other yaccs that
might be installed.

R=r
DELTA=29  (10 added, 2 deleted, 17 changed)
OCL=22110
CL=22113
2009-01-06 09:53:30 -08:00
Russ Cox
4dee747fb9 8a, 8c, and 8l from inferno distribution
R=r
DELTA=19539  (19539 added, 0 deleted, 0 changed)
OCL=22109
CL=22109
2009-01-06 09:41:38 -08:00
Russ Cox
2d259c817a add comments and delete dead code
R=ken
OCL=22078
CL=22080
2009-01-05 17:32:23 -08:00
Russ Cox
be76898cb3 change time.Tick test to use 100ms intervals.
now passes even under loaded conditions on r45.

R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=22019
CL=22022
2009-01-05 11:18:20 -08:00
Russ Cox
c14c2b231f fix 6a line number bug -
was incrementing lineno twice for
the \n after a // comment.

R=r
DELTA=3  (0 added, 2 deleted, 1 changed)
OCL=21984
CL=22021
2009-01-05 11:18:15 -08:00
Ken Thompson
4991f20b3f one bignum test fails
has to do with printing
patched it out

R=r
OCL=21921
CL=21923
2008-12-30 14:03:54 -08:00