Commit Graph

1456 Commits

Author SHA1 Message Date
Ken Thompson
850cd6a2fe bug 150
R=r
OCL=29405
CL=29405
2009-05-26 15:56:37 -07:00
Russ Cox
021abfbd28 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
2009-05-26 14:46:06 -07:00
Russ Cox
1f0f2e44a9 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
2009-05-26 14:34:32 -07:00
Kai Backman
3c7a1ef208 Added automatic detection of system libraries to 5l.
R=rsc
APPROVED=rsc
DELTA=83  (73 added, 3 deleted, 7 changed)
OCL=29276
CL=29382
2009-05-26 12:14:55 -07:00
Kai Backman
7943556970 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
2009-05-26 11:18:42 -07:00
Ken Thompson
802e1a6104 static init reenabled
R=r
OCL=29358
CL=29358
2009-05-25 19:40:41 -07:00
David Symonds
ce5bcbe37f Add os.Getpid and os.Getppid.
R=rsc
APPROVED=rsc
DELTA=11  (11 added, 0 deleted, 0 changed)
OCL=29352
CL=29357
2009-05-25 14:38:38 -07:00
David Symonds
5a12b1828d Add exvar.FuncInt for exporting indirect integer variables.
R=r
APPROVED=r
DELTA=21  (21 added, 0 deleted, 0 changed)
OCL=29320
CL=29338
2009-05-24 15:04:43 -07:00
David Symonds
bef1a6439d 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
2009-05-23 19:39:25 -07:00
Ken Thompson
798b19bf77 improvement in registerization
R=r
OCL=29317
CL=29317
2009-05-23 16:36:43 -07:00
Ken Thompson
4238b18344 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
2009-05-23 15:34:29 -07:00
Rob Pike
368b42103e add crypto/hmac to makefile
R=rsc
DELTA=4  (3 added, 0 deleted, 1 changed)
OCL=29314
CL=29314
2009-05-23 13:53:36 -07:00
Russ Cox
b3de351681 update Make.deps
R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=29305
CL=29308
2009-05-22 23:30:48 -07:00
Russ Cox
224b89cafa typo in hmac comment
R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=29307
CL=29307
2009-05-22 23:30:31 -07:00
Russ Cox
4beac9985b simplifying grammar: delete LBASETYPE and LACONST.
take 2

R=ken
OCL=29304
CL=29306
2009-05-22 22:46:06 -07:00
Russ Cox
ca2fe5d8bd 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
2009-05-22 22:43:57 -07:00
Russ Cox
2a4dcfffc9 simplifying grammar: delete LBASETYPE and LACONST
R=ken
OCL=29300
CL=29302
2009-05-22 22:42:12 -07:00
Russ Cox
b112d42ad6 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
2009-05-22 22:40:26 -07:00
Russ Cox
da59dd41c2 simple logging shim reader and writers
R=r
DELTA=53  (52 added, 0 deleted, 1 changed)
OCL=29295
CL=29298
2009-05-22 22:40:08 -07:00
Russ Cox
99128fc7ab 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
2009-05-22 21:42:16 -07:00
Kai Backman
9c6fd4c144 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
2009-05-22 16:29:22 -07:00
Russ Cox
76f2a9fa48 md5 Reset fix; preliminary hmac
TBR=r
OCL=29279
CL=29279
2009-05-22 15:44:29 -07:00
Kai Backman
9a2a2474c6 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
2009-05-22 15:32:43 -07:00
Robert Griesemer
531e3fe311 - 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
2009-05-22 12:40:56 -07:00
Robert Griesemer
fad7791b07 fix regexp to strip comment markers
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=29221
CL=29221
2009-05-21 20:29:22 -07:00
Robert Griesemer
ad8527c4dc adjustments for relaxed composite literal syntax
R=r
DELTA=41  (0 added, 21 deleted, 20 changed)
OCL=29219
CL=29219
2009-05-21 19:50:25 -07:00
Russ Cox
f4d3d22a94 enforce channel direction
R=ken
OCL=29209
CL=29216
2009-05-21 17:32:44 -07:00
Russ Cox
a3c17d58df channel direction fixes
R=dsymonds
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=29210
CL=29215
2009-05-21 17:31:13 -07:00
Russ Cox
c2fa45b973 allow type name as key to accomodate anonymous fields.
update tests.

R=ken
OCL=29207
CL=29207
2009-05-21 16:31:10 -07:00
Ken Thompson
bba10b3f49 some array init bugs
renamed 6g/(gen|align|obj).c

R=r
OCL=29205
CL=29205
2009-05-21 15:44:06 -07:00
Russ Cox
f96662324e 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
2009-05-21 14:06:43 -07:00
Russ Cox
8b6b380605 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
2009-05-21 14:06:24 -07:00
Ken Thompson
a016081f43 added key:val extension to
structure and array literals

R=r
OCL=29190
CL=29190
2009-05-21 13:46:07 -07:00
Russ Cox
f2dfc55f34 I guess I forgot there was a unary ^ operator.
R=r
DELTA=3  (0 added, 1 deleted, 2 changed)
OCL=29151
CL=29176
2009-05-21 11:52:20 -07:00
Russ Cox
96cfd154d8 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
2009-05-21 11:50:20 -07:00
Russ Cox
fb5aa46e65 fix build again; this time for sure.
(this time i ran g4 nothave)

TBR=r
OCL=29156
CL=29156
2009-05-21 06:54:00 -07:00
Russ Cox
ff45e7bcbd missed Makefile before; fix build
TBR=dsymonds
OCL=29155
CL=29155
2009-05-21 06:49:56 -07:00
Russ Cox
23e62d169f stricter interface conversion rule: i.(T)
must have non-nil i.

R=ken
OCL=29136
CL=29136
2009-05-20 18:23:19 -07:00
Russ Cox
140aed9ab7 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
2009-05-20 18:16:38 -07:00
Russ Cox
2d5d4a1b41 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
2009-05-20 15:42:14 -07:00
Russ Cox
a39bae095a 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
2009-05-20 15:09:50 -07:00
Russ Cox
2da5022bcf 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
2009-05-20 14:57:55 -07:00
Russ Cox
47e5152790 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
2009-05-20 14:24:23 -07:00
Russ Cox
04d8605c21 clear out pkg tree in clean.bash.
rename place-holder to _place_holder_ so it can be avoided.

R=r
DELTA=5  (2 added, 2 deleted, 1 changed)
OCL=29093
CL=29097
2009-05-20 11:12:05 -07:00
Robert Griesemer
1b3b51f7db more useful error string
R=r
DELTA=5  (4 added, 0 deleted, 1 changed)
OCL=29088
CL=29090
2009-05-20 11:02:12 -07:00
Russ Cox
02f13e4764 build crypto/block.
deps.bash tweak.

R=r
DELTA=95  (95 added, 0 deleted, 0 changed)
OCL=29046
CL=29059
2009-05-19 15:42:00 -07:00
Russ Cox
513faccb6f final AES: CMAC authentication and EAX authenticated encryption
R=r
DELTA=791  (779 added, 0 deleted, 12 changed)
OCL=29045
CL=29058
2009-05-19 15:41:37 -07:00
Russ Cox
d85238635a deps.bash tweak - no need to sort -u the $O files.
R=dsymonds
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=29048
CL=29053
2009-05-19 15:22:42 -07:00
Russ Cox
20ea881c79 Xor-based crypto modes: OFB and CTR stream encryption.
R=r
DELTA=643  (643 added, 0 deleted, 0 changed)
OCL=29017
CL=29047
2009-05-19 14:58:49 -07:00
Russ Cox
b0608c1391 Crypto modes: CBC, CFB, ECB.
Not ready to link into build yet.

Delta says 1272 lines but only 474
if you subtract the test files,
which are mostly data.

R=r
DELTA=1252  (1249 added, 0 deleted, 3 changed)
OCL=29013
CL=29037
2009-05-19 14:01:03 -07:00