]> Cypherpunks repositories - gostls13.git/log
gostls13.git
15 years agoupdate Go tree to use new syscall package.
Russ Cox [Tue, 2 Jun 2009 05:14:39 +0000 (22:14 -0700)]
update Go tree to use new syscall package.

R=r
DELTA=713  (109 added, 386 deleted, 218 changed)
OCL=29707
CL=29722

15 years agomake godefs work better for generating Go.
Russ Cox [Tue, 2 Jun 2009 05:14:25 +0000 (22:14 -0700)]
make godefs work better for generating Go.

R=r
DELTA=121  (92 added, 4 deleted, 25 changed)
OCL=29706
CL=29721

15 years agoformat package
Robert Griesemer [Tue, 2 Jun 2009 02:13:44 +0000 (19:13 -0700)]
format package

R=r,rsc
DELTA=2871  (1712 added, 1118 deleted, 41 changed)
OCL=29222
CL=29704

15 years ago- enable scanner to handle illegal chars w/o returning an error
Robert Griesemer [Tue, 2 Jun 2009 02:12:10 +0000 (19:12 -0700)]
- enable scanner to handle illegal chars w/o returning an error
so that it can be used for non-Go chars
- adjust parser accordingly

R=rsc
DELTA=58  (42 added, 2 deleted, 14 changed)
OCL=29688
CL=29703

15 years agoio.ReadFile
Robert Griesemer [Tue, 2 Jun 2009 02:00:07 +0000 (19:00 -0700)]
io.ReadFile

R=r,rsc
DELTA=64  (63 added, 0 deleted, 1 changed)
OCL=29702
CL=29702

15 years agoprevent multiple similar errors
Ken Thompson [Sun, 31 May 2009 20:02:24 +0000 (13:02 -0700)]
prevent multiple similar errors
in complex literals. side effect is
fix of error in initializerr.go

R=r
OCL=29667
CL=29667

15 years agonew 64-bit math test.
Russ Cox [Sun, 31 May 2009 19:35:11 +0000 (12:35 -0700)]
new 64-bit math test.
allow multiline recipes in run.

R=r
DELTA=712  (708 added, 2 deleted, 2 changed)
OCL=29641
CL=29666

15 years agoAdjust expected errors to work with gccgo.
Ian Lance Taylor [Sun, 31 May 2009 18:18:52 +0000 (11:18 -0700)]
Adjust expected errors to work with gccgo.

The change to assign.go is because the gcc testsuite fails to
handle .* in a normal way: it matches against the entire
compiler output, not just a single line.

assign.go:15:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
assign.go:19:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
assign.go:23:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
assign.go:27:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')

chan/perm.go:14:5: error: incompatible types in assignment
chan/perm.go:15:5: error: incompatible types in assignment
chan/perm.go:16:6: error: incompatible types in assignment
chan/perm.go:17:6: error: incompatible types in assignment
chan/perm.go:24:7: error: invalid send on receive-only channel
chan/perm.go:25:12: error: invalid send on receive-only channel
chan/perm.go:31:4: error: invalid receive on send-only channel
chan/perm.go:32:9: error: invalid receive on send-only channel
chan/perm.go:38:2: error: invalid send on receive-only channel
chan/perm.go:42:2: error: invalid receive on send-only channel

initializerr.go:14:17: error: reference to undefined variable 'X'
initializerr.go:14:19: error: mixture of field and value initializers
initializerr.go:15:26: error: duplicate value for field 'Y'
initializerr.go:16:10: error: too many values in struct composite literal
initializerr.go:18:19: error: index expression is not integer constant
initializerr.go:17:11: error: too many elements in composite literal

R=rsc
DELTA=12  (0 added, 0 deleted, 12 changed)
OCL=29657
CL=29665

15 years agobug157
Russ Cox [Sun, 31 May 2009 04:18:15 +0000 (21:18 -0700)]
bug157

R=ken
OCL=29651
CL=29653

15 years agobug 158
Ken Thompson [Sun, 31 May 2009 00:06:51 +0000 (17:06 -0700)]
bug 158

R=r
OCL=29646
CL=29646

15 years agomake gobuild failures more readable.
Russ Cox [Sat, 30 May 2009 01:12:04 +0000 (18:12 -0700)]
make gobuild failures more readable.

1. ar reports names of objects with duplicate text symbols.
2. gobuild only shows first line of error output for each failed command.
3. gobuild ignores files that begin with ascii non-alphanumeric non _.

; gobuild
$ 6g -I _obj gobuild.go
  gobuild.go:150: PackageImports: undefined
$ 6g -I _obj makefile.go
  makefile.go:102: ShellString: undefined
$ 6g -I _obj util.go
  util.go:114: syntax error near zzz
gobuild: stalemate
;

; gobuild
$ 6ar grc _obj/gobuild.a util.6 util1.6
  duplicate text symbol: util1.6 and util.6: gobuildĀ·Build
$ 6g -I _obj gobuild.go
  gobuild.go:150: PackageImports: undefined
$ 6g -I _obj makefile.go
  makefile.go:102: ShellString: undefined
gobuild: stalemate
;

R=r
DELTA=95  (49 added, 9 deleted, 37 changed)
OCL=29625
CL=29640

15 years agoReplacement for abandoned CL 29626:
Robert Griesemer [Fri, 29 May 2009 23:43:24 +0000 (16:43 -0700)]
Replacement for abandoned CL 29626:
bug157 and bug158

R=rsc
DELTA=59  (59 added, 0 deleted, 0 changed)
OCL=29632
CL=29634

15 years agounary ^ update.
Russ Cox [Fri, 29 May 2009 23:04:16 +0000 (16:04 -0700)]
unary ^ update.

[]int -> string is already in the document.

DELTA=7  (1 added, 1 deleted, 5 changed)
OCL=29622
CL=29631

15 years agoAutomated g4 rollback of changelist 29478.
Rob Pike [Fri, 29 May 2009 22:46:03 +0000 (15:46 -0700)]
Automated g4 rollback of changelist 29478.

*** Reason for rollback ***

  these semicolons are necessary only because of a bug in 6g

*** Original change description ***

add missing semicolons in example

TBR=gri
OCL=29624
CL=29624

15 years agobug 156
Ken Thompson [Fri, 29 May 2009 22:34:47 +0000 (15:34 -0700)]
bug 156

R=r
OCL=29623
CL=29623

15 years agobug 155
Ken Thompson [Fri, 29 May 2009 21:42:24 +0000 (14:42 -0700)]
bug 155

R=r
OCL=29619
CL=29619

15 years ago64-bit integer math bugs
Russ Cox [Fri, 29 May 2009 20:46:43 +0000 (13:46 -0700)]
64-bit integer math bugs

R=r
DELTA=46  (46 added, 0 deleted, 0 changed)
OCL=29569
CL=29614

15 years agobug 149
Ken Thompson [Fri, 29 May 2009 20:44:30 +0000 (13:44 -0700)]
bug 149

R=r
OCL=29612
CL=29612

15 years agoFix godoc deadlock.
Russ Cox [Fri, 29 May 2009 20:31:53 +0000 (13:31 -0700)]
Fix godoc deadlock.

The code was already careful not to use malloc/free
for stack growth during calls to malloc.
Avoid them during calls to free too.

R=r
DELTA=9  (7 added, 0 deleted, 2 changed)
OCL=29606
CL=29610

15 years agointeger conversions and test.
Russ Cox [Fri, 29 May 2009 16:17:35 +0000 (09:17 -0700)]
integer conversions and test.

R=ken
OCL=29577
CL=29589

15 years ago64-bit integer arithmetic.
Russ Cox [Fri, 29 May 2009 07:13:09 +0000 (00:13 -0700)]
64-bit integer arithmetic.
passes ridiculous test from CL 29569.

R=ken
OCL=29571
CL=29573

15 years agoprint uint64 as uint64.
Russ Cox [Fri, 29 May 2009 05:24:03 +0000 (22:24 -0700)]
print uint64 as uint64.

R=ken
OCL=29568
CL=29570

15 years agodetect recursive initialization
Ken Thompson [Thu, 28 May 2009 23:00:55 +0000 (16:00 -0700)]
detect recursive initialization

R=r
OCL=29544
CL=29544

15 years agobetter 64-bit handling in 8g.
Russ Cox [Thu, 28 May 2009 22:48:47 +0000 (15:48 -0700)]
better 64-bit handling in 8g.
fewer moves, fewer stupid LEALs.
powser1 runs (with evaln commented out).
beginnings of floating point.

R=ken
OCL=29540
CL=29543

15 years agoRebooted 5g effort from 6g. Tons of minor fixes and tweaks to
Kai Backman [Thu, 28 May 2009 21:25:54 +0000 (14:25 -0700)]
Rebooted 5g effort from 6g. Tons of minor fixes and tweaks to
get the code going.

R=rsc
APPROVED=rsc
DELTA=4752  (1723 added, 948 deleted, 2081 changed)
OCL=29403
CL=29530

15 years agoChange 5l to use Biobufs for IO.
Kai Backman [Thu, 28 May 2009 14:41:23 +0000 (07:41 -0700)]
Change 5l to use Biobufs for IO.

R=rsc
APPROVED=rsc
DELTA=132  (16 added, 45 deleted, 71 changed)
OCL=29468
CL=29497

15 years agoclean up gmove:
Russ Cox [Thu, 28 May 2009 06:55:14 +0000 (23:55 -0700)]
clean up gmove:
* conversions all in one place.
* no separate load, store phases;
  direct memory addressing when possible
  (this is the x86 after all!).
  avoids extra registers, extra MOVQs.
* fixes int32 -> uint64 bug
  (was zero-extending)

R=ken
OCL=29482
CL=29484

15 years agobug 153
Ken Thompson [Thu, 28 May 2009 01:37:02 +0000 (18:37 -0700)]
bug 153

R=r
OCL=29479
CL=29479

15 years agoadd missing semicolons in example
Rob Pike [Thu, 28 May 2009 01:31:28 +0000 (18:31 -0700)]
add missing semicolons in example

R=rsc
DELTA=5  (0 added, 0 deleted, 5 changed)
OCL=29475
CL=29478

15 years agoattach package comment
Russ Cox [Thu, 28 May 2009 01:20:26 +0000 (18:20 -0700)]
attach package comment

R=r
DELTA=1  (0 added, 1 deleted, 0 changed)
OCL=29473
CL=29477

15 years agoadded protection against race condition
Ken Thompson [Wed, 27 May 2009 22:56:44 +0000 (15:56 -0700)]
added protection against race condition
between first and second pass of converting
[]int to string.

R=r
OCL=29467
CL=29467

15 years agostring([]int) conversion
Ken Thompson [Wed, 27 May 2009 22:38:02 +0000 (15:38 -0700)]
string([]int) conversion

R=r
OCL=29466
CL=29466

15 years agofix bug154; tweak bug153 exit status
Russ Cox [Wed, 27 May 2009 17:16:13 +0000 (10:16 -0700)]
fix bug154; tweak bug153 exit status

R=ken
OCL=29448
CL=29448

15 years agogetrusage on darwin; untested but builds.
Russ Cox [Wed, 27 May 2009 17:05:23 +0000 (10:05 -0700)]
getrusage on darwin; untested but builds.

R=dsymonds
DELTA=5  (5 added, 0 deleted, 0 changed)
OCL=29424
CL=29447

15 years agofloating point bug
Robert Griesemer [Wed, 27 May 2009 16:57:44 +0000 (09:57 -0700)]
floating point bug

R=rsc
DELTA=35  (35 added, 0 deleted, 0 changed)
OCL=29442
CL=29444

15 years agobad error message
Robert Griesemer [Wed, 27 May 2009 16:47:13 +0000 (09:47 -0700)]
bad error message

TBR=rsc
DELTA=14  (14 added, 0 deleted, 0 changed)
OCL=29441
CL=29441

15 years agobug151, bug152 -> fixedbugs
Russ Cox [Wed, 27 May 2009 04:11:43 +0000 (21:11 -0700)]
bug151, bug152 -> fixedbugs

R=ken
OCL=29425
CL=29427

15 years ago8g: missing change from last CL
Russ Cox [Wed, 27 May 2009 04:11:31 +0000 (21:11 -0700)]
8g: missing change from last CL

R=ken
OCL=29426
CL=29426

15 years ago8g: 64-bit arithmetic and assorted bug fixes;
Russ Cox [Wed, 27 May 2009 04:07:26 +0000 (21:07 -0700)]
8g: 64-bit arithmetic and assorted bug fixes;
can run 64-bit sieve and powser.
interfaces are limping along.
next hurdle is floating point.

R=ken
OCL=29418
CL=29423

15 years agoGetrusage for linux.
David Symonds [Wed, 27 May 2009 03:38:57 +0000 (20:38 -0700)]
Getrusage for linux.

R=rsc
APPROVED=rsc
DELTA=40  (38 added, 0 deleted, 2 changed)
OCL=29351
CL=29422

15 years agoand the golden file
Ken Thompson [Wed, 27 May 2009 02:58:59 +0000 (19:58 -0700)]
and the golden file

R=r
OCL=29421
CL=29421

15 years agobug 152
Ken Thompson [Wed, 27 May 2009 02:48:39 +0000 (19:48 -0700)]
bug 152

R=r
OCL=29419
CL=29419

15 years agoadd NUL when allocating strings, to make use
Russ Cox [Wed, 27 May 2009 00:39:25 +0000 (17:39 -0700)]
add NUL when allocating strings, to make use
of getenv by low-level runtime easier.
fix 32-bit bug in gc (there are still more).

R=ken
OCL=29415
CL=29415

15 years agodarwin support for 32-bit debugging
Russ Cox [Wed, 27 May 2009 00:20:57 +0000 (17:20 -0700)]
darwin support for 32-bit debugging

R=r
DELTA=129  (78 added, 1 deleted, 50 changed)
OCL=29411
CL=29413

15 years ago32-bit stack switching bug fix
Russ Cox [Wed, 27 May 2009 00:13:39 +0000 (17:13 -0700)]
32-bit stack switching bug fix

R=ken
OCL=29412
CL=29412

15 years agobug 151
Ken Thompson [Tue, 26 May 2009 23:30:35 +0000 (16:30 -0700)]
bug 151

R=r
OCL=29409
CL=29409

15 years agomore 8g.
Russ Cox [Tue, 26 May 2009 23:23:54 +0000 (16:23 -0700)]
more 8g.
test/turing.go runs if you move the big array off its stack.

finally remembered to g4 add cgen.c gsubr.c

R=ken
OCL=29408
CL=29408

15 years agobug150 is fixed
Rob Pike [Tue, 26 May 2009 23:06:03 +0000 (16:06 -0700)]
bug150 is fixed

R=ken
OCL=29407
CL=29407

15 years agobug 150
Ken Thompson [Tue, 26 May 2009 22:56:37 +0000 (15:56 -0700)]
bug 150

R=r
OCL=29405
CL=29405

15 years ago8g: hello world works again
Russ Cox [Tue, 26 May 2009 21:46:06 +0000 (14:46 -0700)]
8g: hello world works again
* string format changed
* files got renamed
* new files that i forgot to check in last time
updates are all copy and paste from 6g

R=ken
OCL=29385
CL=29400

15 years ago6ar: explain why __.SYMDEF didn't get put in.
Russ Cox [Tue, 26 May 2009 21:34:32 +0000 (14:34 -0700)]
6ar: explain why __.SYMDEF didn't get put in.

people using ar for non-object archives
will just have to deal with the warnings.

R=r
DELTA=3  (2 added, 0 deleted, 1 changed)
OCL=29384
CL=29398

15 years agoAdded automatic detection of system libraries to 5l.
Kai Backman [Tue, 26 May 2009 19:14:55 +0000 (12:14 -0700)]
Added automatic detection of system libraries to 5l.

R=rsc
APPROVED=rsc
DELTA=83  (73 added, 3 deleted, 7 changed)
OCL=29276
CL=29382

15 years agoAdded enough arm related scaffolding to create a simple
Kai Backman [Tue, 26 May 2009 18:18:42 +0000 (11:18 -0700)]
Added enough arm related scaffolding to create a simple
hello.c program linking against the runtime.

R=rsc
APPROVED=rsc
DELTA=178  (175 added, 0 deleted, 3 changed)
OCL=29283
CL=29380

15 years agostatic init reenabled
Ken Thompson [Tue, 26 May 2009 02:40:41 +0000 (19:40 -0700)]
static init reenabled

R=r
OCL=29358
CL=29358

15 years agoAdd os.Getpid and os.Getppid.
David Symonds [Mon, 25 May 2009 21:38:38 +0000 (14:38 -0700)]
Add os.Getpid and os.Getppid.

R=rsc
APPROVED=rsc
DELTA=11  (11 added, 0 deleted, 0 changed)
OCL=29352
CL=29357

15 years agoAdd exvar.FuncInt for exporting indirect integer variables.
David Symonds [Sun, 24 May 2009 22:04:43 +0000 (15:04 -0700)]
Add exvar.FuncInt for exporting indirect integer variables.

R=r
APPROVED=r
DELTA=21  (21 added, 0 deleted, 0 changed)
OCL=29320
CL=29338

15 years agoIf Make.deps is not writable (e.g. in Perforce client and not opened for editing...
David Symonds [Sun, 24 May 2009 02:39:25 +0000 (19:39 -0700)]
If Make.deps is not writable (e.g. in Perforce client and not opened for editing), bail out immediately.

R=rsc,r
APPROVED=r
DELTA=7  (5 added, 1 deleted, 1 changed)
OCL=29319
CL=29319

15 years agoimprovement in registerization
Ken Thompson [Sat, 23 May 2009 23:36:43 +0000 (16:36 -0700)]
improvement in registerization

R=r
OCL=29317
CL=29317

15 years ago1. check for dups in complex literals
Ken Thompson [Sat, 23 May 2009 22:34:29 +0000 (15:34 -0700)]
1. check for dups in complex literals
   structtype{a:1, a:2}
   maptypetype{"xx":1, "xx":2}
   arraytypetype{5:1, 5:2}
2. bug in registerization concerning
   alias of a struct and one of its elements
3. code optimization of struct.field
   (which exposed bug in 2)

R=r
OCL=29315
CL=29315

15 years agoadd crypto/hmac to makefile
Rob Pike [Sat, 23 May 2009 20:53:36 +0000 (13:53 -0700)]
add crypto/hmac to makefile

R=rsc
DELTA=4  (3 added, 0 deleted, 1 changed)
OCL=29314
CL=29314

15 years agoupdate Make.deps
Russ Cox [Sat, 23 May 2009 06:30:48 +0000 (23:30 -0700)]
update Make.deps

R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=29305
CL=29308

15 years agotypo in hmac comment
Russ Cox [Sat, 23 May 2009 06:30:31 +0000 (23:30 -0700)]
typo in hmac comment

R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=29307
CL=29307

15 years agosimplifying grammar: delete LBASETYPE and LACONST.
Russ Cox [Sat, 23 May 2009 05:46:06 +0000 (22:46 -0700)]
simplifying grammar: delete LBASETYPE and LACONST.
take 2

R=ken
OCL=29304
CL=29306

15 years agoAutomated g4 rollback of changelist 29302.
Russ Cox [Sat, 23 May 2009 05:43:57 +0000 (22:43 -0700)]
Automated g4 rollback of changelist 29302.

*** Reason for rollback ***

too many files included

*** Original change description ***

simplifying grammar: delete LBASETYPE and LACONST

R=ken
OCL=29303
CL=29303

15 years agosimplifying grammar: delete LBASETYPE and LACONST
Russ Cox [Sat, 23 May 2009 05:42:12 +0000 (22:42 -0700)]
simplifying grammar: delete LBASETYPE and LACONST

R=ken
OCL=29300
CL=29302

15 years agoadd hmac.NewSHA1 and hmac.NewMD5.
Russ Cox [Sat, 23 May 2009 05:40:26 +0000 (22:40 -0700)]
add hmac.NewSHA1 and hmac.NewMD5.
fix Reset bug in sha1.
add hmac, sha1, md5 tests.
document hmac.

R=r
DELTA=146  (111 added, 6 deleted, 29 changed)
OCL=29294
CL=29299

15 years agosimple logging shim reader and writers
Russ Cox [Sat, 23 May 2009 05:40:08 +0000 (22:40 -0700)]
simple logging shim reader and writers

R=r
DELTA=53  (52 added, 0 deleted, 1 changed)
OCL=29295
CL=29298

15 years agomove pretty/comment.go into go/doc.
Russ Cox [Sat, 23 May 2009 04:42:16 +0000 (21:42 -0700)]
move pretty/comment.go into go/doc.
extract comment text code out of go/doc/doc.go into comment.go.
no code changes, just rearrangement.

first step so i can write tests.

R=gri
DELTA=633  (318 added, 301 deleted, 14 changed)
OCL=29269
CL=29293

15 years agoAdded support for .5 files in libmach_64. Copied 5obj.c from
Kai Backman [Fri, 22 May 2009 23:29:22 +0000 (16:29 -0700)]
Added support for .5 files in libmach_64. Copied 5obj.c from
plan9 libmach.

R=rsc
APPROVED=rsc
DELTA=142  (139 added, 3 deleted, 0 changed)
OCL=29281
CL=29281

15 years agomd5 Reset fix; preliminary hmac
Russ Cox [Fri, 22 May 2009 22:44:29 +0000 (15:44 -0700)]
md5 Reset fix; preliminary hmac

TBR=r
OCL=29279
CL=29279

15 years agoForce usage of dollar signs to circumvent arm-gcc balking at them.
Kai Backman [Fri, 22 May 2009 22:32:43 +0000 (15:32 -0700)]
Force usage of dollar signs to circumvent arm-gcc balking at them.

R=rsc
APPROVED=rsc
DELTA=1  (1 added, 0 deleted, 0 changed)
OCL=29275
CL=29278

15 years ago- fix regexp once more in doc.go:
Robert Griesemer [Fri, 22 May 2009 19:40:56 +0000 (12:40 -0700)]
- fix regexp once more in doc.go:
  comment markers must only be stripped if they are
  at the very beginning otherwise comments that contain
  code with comments get screwed up (the ast delivers clean
  comments with no junk before or after)

- fix indentation in google/net/rpc/rpc.go which screwed up
  godoc formatting

R=rsc
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=29223
CL=29267

15 years agokey:value notation for composites
Robert Griesemer [Fri, 22 May 2009 17:25:06 +0000 (10:25 -0700)]
key:value notation for composites

R=rsc
DELTA=106  (69 added, 9 deleted, 28 changed)
OCL=29203
CL=29254

15 years agoshow subdirectories if present in a package dir
Robert Griesemer [Fri, 22 May 2009 17:24:28 +0000 (10:24 -0700)]
show subdirectories if present in a package dir

R=rsc
DELTA=184  (69 added, 73 deleted, 42 changed)
OCL=29178
CL=29253

15 years agoanother interface conversion test
Russ Cox [Fri, 22 May 2009 16:53:37 +0000 (09:53 -0700)]
another interface conversion test

R=r
DELTA=21  (21 added, 0 deleted, 0 changed)
OCL=29212
CL=29249

15 years agochannel direction tests
Russ Cox [Fri, 22 May 2009 16:53:25 +0000 (09:53 -0700)]
channel direction tests
(will submit with compiler fixes).

R=r
DELTA=44  (44 added, 0 deleted, 0 changed)
OCL=29211
CL=29248

15 years agofix regexp to strip comment markers
Robert Griesemer [Fri, 22 May 2009 03:29:22 +0000 (20:29 -0700)]
fix regexp to strip comment markers

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=29221
CL=29221

15 years agoadjustments for relaxed composite literal syntax
Robert Griesemer [Fri, 22 May 2009 02:50:25 +0000 (19:50 -0700)]
adjustments for relaxed composite literal syntax

R=r
DELTA=41  (0 added, 21 deleted, 20 changed)
OCL=29219
CL=29219

15 years agoenforce channel direction
Russ Cox [Fri, 22 May 2009 00:32:44 +0000 (17:32 -0700)]
enforce channel direction

R=ken
OCL=29209
CL=29216

15 years agochannel direction fixes
Russ Cox [Fri, 22 May 2009 00:31:13 +0000 (17:31 -0700)]
channel direction fixes

R=dsymonds
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=29210
CL=29215

15 years agoallow type name as key to accomodate anonymous fields.
Russ Cox [Thu, 21 May 2009 23:31:10 +0000 (16:31 -0700)]
allow type name as key to accomodate anonymous fields.
update tests.

R=ken
OCL=29207
CL=29207

15 years agosome array init bugs
Ken Thompson [Thu, 21 May 2009 22:44:06 +0000 (15:44 -0700)]
some array init bugs
renamed 6g/(gen|align|obj).c

R=r
OCL=29205
CL=29205

15 years agotests for new initializer syntax
Russ Cox [Thu, 21 May 2009 21:46:13 +0000 (14:46 -0700)]
tests for new initializer syntax

R=r
DELTA=79  (79 added, 0 deleted, 0 changed)
OCL=29196
CL=29202

15 years agorelated reflect bug: make copies of big values
Russ Cox [Thu, 21 May 2009 21:06:43 +0000 (14:06 -0700)]
related reflect bug: make copies of big values
so that callers cannot edit large values inside interfaces.

R=r
DELTA=52  (42 added, 1 deleted, 9 changed)
OCL=29180
CL=29195

15 years agostricter rules for assignment.
Russ Cox [Thu, 21 May 2009 21:06:24 +0000 (14:06 -0700)]
stricter rules for assignment.
when assigning a multifield object
(structs or arrays of structs) they
must not contain any fields that could
not be assigned individually.

R=ken
OCL=29192
CL=29194

15 years agoadd test for yesterday's interface rule change (interface/convert1.go).
Russ Cox [Thu, 21 May 2009 20:46:20 +0000 (13:46 -0700)]
add test for yesterday's interface rule change (interface/convert1.go).
move interface tests to subdirectory.

R=r
DELTA=1632  (827 added, 804 deleted, 1 changed)
OCL=29181
CL=29191

15 years agoadded key:val extension to
Ken Thompson [Thu, 21 May 2009 20:46:07 +0000 (13:46 -0700)]
added key:val extension to
structure and array literals

R=r
OCL=29190
CL=29190

15 years agoI guess I forgot there was a unary ^ operator.
Russ Cox [Thu, 21 May 2009 18:52:20 +0000 (11:52 -0700)]
I guess I forgot there was a unary ^ operator.

R=r
DELTA=3  (0 added, 1 deleted, 2 changed)
OCL=29151
CL=29176

15 years agodirect all interface extraction to InterfaceValue.Get.
Russ Cox [Thu, 21 May 2009 18:50:20 +0000 (11:50 -0700)]
direct all interface extraction to InterfaceValue.Get.
delete unnecessary reflect. throughout

R=r
DELTA=124  (18 added, 0 deleted, 106 changed)
OCL=29173
CL=29175

15 years agofix build again; this time for sure.
Russ Cox [Thu, 21 May 2009 13:54:00 +0000 (06:54 -0700)]
fix build again; this time for sure.
(this time i ran g4 nothave)

TBR=r
OCL=29156
CL=29156

15 years agomissed Makefile before; fix build
Russ Cox [Thu, 21 May 2009 13:49:56 +0000 (06:49 -0700)]
missed Makefile before; fix build

TBR=dsymonds
OCL=29155
CL=29155

15 years agostricter interface conversion rule: i.(T)
Russ Cox [Thu, 21 May 2009 01:23:19 +0000 (18:23 -0700)]
stricter interface conversion rule: i.(T)
must have non-nil i.

R=ken
OCL=29136
CL=29136

15 years agohash reorg.
Russ Cox [Thu, 21 May 2009 01:16:38 +0000 (18:16 -0700)]
hash reorg.
* new package hash defining interfaces Hash and Hash32.
* adler32 and crc32 return Hash32 instead of specific types.
* adler32 and crc32 provide non-allocating methods for single slices.
* sha1 and md5 move to crypto, return Hash.
* sum.go, a simple test program, moves to /usr/rsc.
* refresh Make.deps

R=r
DELTA=1908  (935 added, 923 deleted, 50 changed)
OCL=29095
CL=29135

15 years agonew, stricter interface rule:
Russ Cox [Thu, 21 May 2009 01:16:04 +0000 (18:16 -0700)]
new, stricter interface rule:
in x.(T) x cannot be a nil (uninitialized) interface variable.

remove TODO per discussion.

DELTA=3  (1 added, 1 deleted, 1 changed)
OCL=29123
CL=29134

15 years agosemi-weekly snapshot:
Robert Griesemer [Thu, 21 May 2009 00:09:59 +0000 (17:09 -0700)]
semi-weekly snapshot:
- format.go implementation complete
- lots of documentation added (not quite complete)

TBR=r
OCL=29130
CL=29130

15 years agoxcode config files, self-describing
Robert Griesemer [Wed, 20 May 2009 23:09:34 +0000 (16:09 -0700)]
xcode config files, self-describing

R=r
DELTA=250  (250 added, 0 deleted, 0 changed)
OCL=29120
CL=29127

15 years agoreflect bug: NewZeroValue was refusing to create slices.
Russ Cox [Wed, 20 May 2009 22:42:14 +0000 (15:42 -0700)]
reflect bug: NewZeroValue was refusing to create slices.
as far as I can tell there's no reason not to.

the Nillable test was succeeding because NewZeroValue
returned the nil interface value and the type guard
was letting it through.  the only change in the test is
more detail in the print.

R=r
DELTA=8  (0 added, 7 deleted, 1 changed)
OCL=29124
CL=29126

15 years agoifaceop was being called with integers
Russ Cox [Wed, 20 May 2009 22:09:50 +0000 (15:09 -0700)]
ifaceop was being called with integers
that came from two different enums.
spilt into ifacecvt and ifaceop depending
on which enum the argument is.

R=ken
OCL=29122
CL=29122

15 years agochange representation of interface values.
Russ Cox [Wed, 20 May 2009 21:57:55 +0000 (14:57 -0700)]
change representation of interface values.

this is not a user-visible change.

before, all interface values were

struct Itype {
Sigt *type;
Sigi *inter;
void *method[n];
}

struct Iface {
void *addr;
Itype *itype;
}

the itype is basically a vtable, but it's unnecessary
if the static type is interface{ }.
for interface values with static type empty, the
new representation is

struct Eface {
void *addr;
Sigt *type;
}

this complicates the code somewhat, but
it reduces the number of Itypes that
have to be computed and cached,
it opens up opportunities to avoid function
calls in a few common cases,
and it will make it possible to lay out
interface{} values at compile time,
which i think i'll need for the new reflection.

R=ken
OCL=28701
CL=29121

15 years agofix implicit star for range on *map, *[].
Russ Cox [Wed, 20 May 2009 21:24:23 +0000 (14:24 -0700)]
fix implicit star for range on *map, *[].
do not update lineno from ONAME nodes,
because they have declaration lineno not use.
show actual name in top-level statement error.

before
runtime.a:7: x.go:5: walkstate: NAME not a top level statement

after
x.go:14: walkstate: runtime.Goexit not a top level statement

R=ken
OCL=29113
CL=29116