Commit Graph

2296 Commits

Author SHA1 Message Date
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
838cf124f0 key:value notation for composites
R=rsc
DELTA=106  (69 added, 9 deleted, 28 changed)
OCL=29203
CL=29254
2009-05-22 10:25:06 -07:00
Robert Griesemer
7d4765e2d3 show subdirectories if present in a package dir
R=rsc
DELTA=184  (69 added, 73 deleted, 42 changed)
OCL=29178
CL=29253
2009-05-22 10:24:28 -07:00
Russ Cox
54b0065777 another interface conversion test
R=r
DELTA=21  (21 added, 0 deleted, 0 changed)
OCL=29212
CL=29249
2009-05-22 09:53:37 -07:00
Russ Cox
d33d763781 channel direction tests
(will submit with compiler fixes).

R=r
DELTA=44  (44 added, 0 deleted, 0 changed)
OCL=29211
CL=29248
2009-05-22 09:53:25 -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
d5269d0008 tests for new initializer syntax
R=r
DELTA=79  (79 added, 0 deleted, 0 changed)
OCL=29196
CL=29202
2009-05-21 14:46:13 -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
Russ Cox
b9159722dd 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
2009-05-21 13:46:20 -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
b89a54e5c6 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
2009-05-20 18:16:04 -07:00
Robert Griesemer
787dd4d3f3 semi-weekly snapshot:
- format.go implementation complete
- lots of documentation added (not quite complete)

TBR=r
OCL=29130
CL=29130
2009-05-20 17:09:59 -07:00
Robert Griesemer
e6cddeaee8 xcode config files, self-describing
R=r
DELTA=250  (250 added, 0 deleted, 0 changed)
OCL=29120
CL=29127
2009-05-20 16:09:34 -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
c1fd171d18 removed TODO
(new rules on type compatibility cover this already)

DELTA=2  (0 added, 2 deleted, 0 changed)
OCL=29094
CL=29096
2009-05-20 11:10:18 -07:00
Robert Griesemer
56809d0ade new method set rules
DELTA=63  (27 added, 6 deleted, 30 changed)
OCL=29065
CL=29091
2009-05-20 11:02:48 -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
Ian Lance Taylor
bc5620c2e0 Match gccgo error messages.
bug117.go:13:12: error: reference to undefined field or method

import1.go:9:2: error: redefinition of '.main.bufio'
import1.go:8:2: note: previous definition of '.main.bufio' was here
import1.go:9:2: error: incompatible imported type 'bufio.Error'

interface9.go:25:5: error: incompatible types in assignment (method P requires a pointer)
interface9.go:30:5: error: incompatible types in assignment (method P requires a pointer)

R=rsc
DELTA=5  (0 added, 0 deleted, 5 changed)
OCL=29044
CL=29055
2009-05-19 15:23:43 -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
Ken Thompson
da49bfe664 static initialization of strings
R=r
OCL=29036
CL=29036
2009-05-19 13:37:36 -07:00