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

498 Commits

Author SHA1 Message Date
Russ Cox
e2fa41ab3b fix JMP main(SB)
R=ken
OCL=17832
CL=17832
2008-10-24 16:43:12 -07:00
Rob Pike
418b97c670 add printf to fmt.
uses reflection to determine arguments.
for now, the arguments must be provided as a struct; the compiler
will soon do the packaging automatically for "..." parameters.

R=rsc
DELTA=1436  (909 added, 520 deleted, 7 changed)
OCL=17823
CL=17831
2008-10-24 16:33:29 -07:00
Russ Cox
689b28fd96 fix method function type compare bug (again)
R=ken
OCL=17819
CL=17819
2008-10-24 14:56:54 -07:00
Russ Cox
c14c961ae4 Automated g4 rollback of changelist 17815.
*** Reason for rollback ***

  now it's comparing function parameter names...

*** Original change description ***

fix method function type compare bug

R=ken
OCL=17816
CL=17816
2008-10-24 14:32:48 -07:00
Russ Cox
0be746d581 fix method function type compare bug
R=ken
OCL=17815
CL=17815
2008-10-24 14:29:01 -07:00
Robert Griesemer
ad863046f8 - set initial value in flag variable if provided
R=r
DELTA=10  (9 added, 0 deleted, 1 changed)
OCL=17806
CL=17812
2008-10-24 14:05:42 -07:00
Rob Pike
7466b61ba4 make fmt a directory
some build dependencies need rearrangement because fmt will depend on reflect

R=rsc
DELTA=1091  (567 added, 521 deleted, 3 changed)
OCL=17792
CL=17796
2008-10-24 10:42:54 -07:00
Rob Pike
8327b54169 make reflect compile again
R=rsc
DELTA=9  (4 added, 4 deleted, 1 changed)
OCL=17753
CL=17755
2008-10-23 17:39:15 -07:00
Rob Pike
536b1f2e98 add reflect to build, clean up test
R=rsc
DELTA=341  (188 added, 151 deleted, 2 changed)
OCL=17678
CL=17750
2008-10-23 17:13:34 -07:00
Russ Cox
de13727f0f use &T{1,2,3} constructor for simple new cases
R=r
OCL=17691
CL=17719
2008-10-23 12:41:06 -07:00
Ken Thompson
7ed8fc611d embedded types
auto & on methods

R=r
OCL=17682
CL=17682
2008-10-22 18:18:08 -07:00
Russ Cox
ad48706a24 do not use fake names on anonymous function return values
R=ken
OCL=17679
CL=17679
2008-10-22 17:45:47 -07:00
Ken Thompson
6fecb76eea embedded types
R=r
OCL=17676
CL=17676
2008-10-22 17:25:10 -07:00
Rob Pike
5d30161ca7 move reflection code into final place.
this is just a branch.
next cl will update and add to build

R=rsc
DELTA=4528  (2264 added, 2264 deleted, 0 changed)
OCL=17670
CL=17672
2008-10-22 17:12:07 -07:00
Russ Cox
21617250f4 import/export of embedded types
R=ken
OCL=17643
CL=17643
2008-10-22 13:22:56 -07:00
Russ Cox
40fa690d75 fix handling of *f() = 1
R=ken
OCL=17625
CL=17641
2008-10-22 13:13:01 -07:00
Ken Thompson
14c639161a elided dots
R=r
OCL=17601
CL=17601
2008-10-21 20:55:40 -07:00
Russ Cox
dbabeb1d7a reject new of function type
R=ken
OCL=17598
CL=17598
2008-10-21 18:03:25 -07:00
Rob Pike
f0e93e8cc5 fix a couple of inconsequential glitches in regexp code.
R=rsc
DELTA=2  (0 added, 1 deleted, 1 changed)
OCL=17589
CL=17595
2008-10-21 17:18:34 -07:00
Russ Cox
beee6915f8 rewrite &Point{1, 2} as allocation
R=ken
OCL=17592
CL=17592
2008-10-21 16:53:54 -07:00
Russ Cox
2c3ddf5ef6 include local types in typestrings
R=r
DELTA=16  (14 added, 1 deleted, 1 changed)
OCL=17584
CL=17584
2008-10-21 15:57:38 -07:00
Russ Cox
44b0ecc5ca 6g: use full type in sigt[0].name
sys: add sys.reflect
runtime: add canfail flag for later

R=ken
OCL=17583
CL=17583
2008-10-21 15:38:26 -07:00
Ken Thompson
0347e95b63 changes to imbedded
R=r
OCL=17572
CL=17572
2008-10-21 15:04:10 -07:00
Russ Cox
1a149ca1be stop looking for type names beginning with _.
they're gone.

R=ken
OCL=17569
CL=17569
2008-10-21 14:44:31 -07:00
Russ Cox
aacfbb461b 6g:
* print int as int, not P.int
	* write type info for non-exported types
	   in its own new section.

ar:
	skip over rest of line after $$

R=ken
OCL=17568
CL=17568
2008-10-21 14:34:45 -07:00
Russ Cox
0532f89b1f 6l: invent gotypestrings if needed
R=r
DELTA=419  (409 added, 5 deleted, 5 changed)
OCL=17524
CL=17530
2008-10-21 10:40:16 -07:00
Russ Cox
a570eaabcd 6l:
use libbio instead of maintaining own buffer

libbio:
	always use vlong offsets; die if off_t is too small

R=r
DELTA=163  (23 added, 63 deleted, 77 changed)
OCL=17508
CL=17512
2008-10-20 17:33:51 -07:00
Russ Cox
28912ce03f fix compiler warnings
R=r
DELTA=44  (10 added, 9 deleted, 25 changed)
OCL=17502
CL=17502
2008-10-20 15:26:38 -07:00
Russ Cox
bfc70d0f0a use Biobuf not fd for reading objects.
will make reading type info easier.

R=r
DELTA=21  (2 added, 1 deleted, 18 changed)
OCL=17491
CL=17501
2008-10-20 15:21:59 -07:00
Russ Cox
aff914c6ec add nuke
R=r
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=17497
CL=17500
2008-10-20 15:21:52 -07:00
Russ Cox
46d3497a04 run.bash: do not make test in gosrc
R=gri
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=17476
CL=17499
2008-10-20 15:08:53 -07:00
Russ Cox
ef40d9435b 6g:
make sure methods end up immediately following
	the struct they are methods on.
ar:
	eliminate duplicate definitions from __.PKGDEF.
	check that multiple .6 do not give different defs for same
		exported type/var/func/const.
	increase ar header name size from 16 to 64 bytes

R=r
DELTA=379  (333 added, 18 deleted, 28 changed)
OCL=17477
CL=17481
2008-10-20 13:53:56 -07:00
Rob Pike
03a9872fe3 add primitive ftoa, dtoa to strings library.
R=rsc
DELTA=72  (69 added, 0 deleted, 3 changed)
OCL=17478
CL=17480
2008-10-20 13:53:20 -07:00
Russ Cox
7c7a525d18 add io.ReadWriteClose and use it in http
R=r
DELTA=15  (6 added, 7 deleted, 2 changed)
OCL=17447
CL=17461
2008-10-20 12:37:07 -07:00
Ken Thompson
61361af9e8 unnamed substructures - not complete
R=r
OCL=17437
CL=17437
2008-10-19 20:13:37 -07:00
Rob Pike
35eebcacc8 fix typo causing infinite recursion
R=rsc
OCL=17398
CL=17398
2008-10-17 17:59:27 -07:00
Russ Cox
5fe4cd83a8 do not set t->recur on basic types.
the comment talked about printing, but now
t->recur is only used for typehash.
in typehash it is important to compute different
hashes for the different basic types.

add test that makes sure an interface { X() int8 }
cannot be used as interface { X() int64 }

R=ken
OCL=17396
CL=17396
2008-10-17 17:51:29 -07:00
Russ Cox
ab9db8a5f8 cleanup - delete unneeded vargen++
R=ken
OCL=17394
CL=17394
2008-10-17 17:45:32 -07:00
Rob Pike
d378321b6e add atol and ltoa. probably want unsigned at some point too.
R=rsc
DELTA=14  (10 added, 0 deleted, 4 changed)
OCL=17387
CL=17390
2008-10-17 17:28:09 -07:00
Russ Cox
ba46bd1e5a export prereq for interface types
R=ken
OCL=17377
CL=17377
2008-10-17 16:13:17 -07:00
Ian Lance Taylor
907fea6b54 Link against -lm so that we can find the function "floor".
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=17375
CL=17375
2008-10-17 15:52:49 -07:00
Russ Cox
7cb6b6788c new convert code found error
R=r
OCL=17327
CL=17327
2008-10-16 16:51:12 -07:00
Russ Cox
1163b1db6f diagnose various conversion problems
R=ken
OCL=17320
CL=17320
2008-10-16 15:59:31 -07:00
Russ Cox
493a9d2f42 put toplevel & check back and add test
R=ken
OCL=17307
CL=17307
2008-10-16 14:02:20 -07:00
Ken Thompson
2e4b8d94cd diagnosed some incorrect
inputs for method receivers.

R=r
OCL=17304
CL=17304
2008-10-16 13:29:03 -07:00
Russ Cox
59167e5bdb diagnose export of incomplete type
R=ken
OCL=17253
CL=17253
2008-10-15 17:51:23 -07:00
Rob Pike
801f542b0f remove hack now that vector of int works.
R=rsc
DELTA=9  (0 added, 3 deleted, 6 changed)
OCL=17248
CL=17250
2008-10-15 17:20:37 -07:00
Russ Cox
7cd173a4f8 error about & at top level until it is safe
R=ken
OCL=17241
CL=17241
2008-10-15 17:09:42 -07:00
Ken Thompson
1bf38484d1 interface on arbitrary types
global signatures for basic types

R=r
OCL=17238
CL=17240
2008-10-15 17:08:10 -07:00
Rob Pike
84523402fc Make regexp build and install officially
R=rsc
DELTA=335  (172 added, 156 deleted, 7 changed)
OCL=17167
CL=17180
2008-10-14 22:16:45 -07:00