Ian Lance Taylor
7dee51f491
The compilers should and do permit interface types to list
...
multiple method names with a single type.
R=r,gri
DELTA=10 (0 added, 10 deleted, 0 changed)
OCL=19292
CL=19298
2008-11-14 17:28:17 -08:00
Rob Pike
fd47cb9af5
conflicting scopes should cause error exit
...
TBR=rsc
OCL=19297
CL=19297
2008-11-14 17:28:11 -08:00
Russ Cox
d3f6093931
package-local declarations using keyword "package".
...
R=r
DELTA=129 (81 added, 0 deleted, 48 changed)
OCL=19283
CL=19291
2008-11-14 16:35:08 -08:00
Ken Thompson
e875055461
switch
...
R=r
OCL=19288
CL=19288
2008-11-14 16:24:27 -08:00
Robert Griesemer
23c8faaf85
buf fix: make FD.Read, FD.Write work for empty buffers
...
R=r
DELTA=8 (6 added, 0 deleted, 2 changed)
OCL=19273
CL=19275
2008-11-14 15:13:29 -08:00
Rob Pike
f3e354ec26
clean up make script
...
reorder pieces so io is earlier
R=rsc
DELTA=66 (27 added, 24 deleted, 15 changed)
OCL=19248
CL=19255
2008-11-14 12:53:44 -08:00
Robert Griesemer
0c4c842eb0
- added Init() function so that vectors can be used w/o New():
...
var v Vector.Vector;
v.Init();
...
- clear vector elements in Reset
- removed some comments that seem redundant
R=r
DELTA=16 (9 added, 5 deleted, 2 changed)
OCL=19247
CL=19247
2008-11-14 11:22:39 -08:00
Russ Cox
f8b20e4083
add cov, prof to default build; clean up compiler warnings
...
R=r
DELTA=8 (1 added, 0 deleted, 7 changed)
OCL=19245
CL=19245
2008-11-14 10:57:48 -08:00
Russ Cox
7832ab5ba0
code coverage tool
...
$ 6cov -g 235.go 6.out
235.go:62,62 main·main 0x27c9-0x2829 MOVL $main·.stringo(SB),AX
235.go:30,30 main·main 0x2856-0x285e ADDQ $6c0,SP
$
and assorted fixes.
R=r
DELTA=743 (732 added, 8 deleted, 3 changed)
OCL=19226
CL=19243
2008-11-14 10:45:23 -08:00
Rob Pike
2355395550
handle nils safely
...
R=rsc
DELTA=38 (14 added, 10 deleted, 14 changed)
OCL=19242
CL=19242
2008-11-14 10:42:45 -08:00
Robert Griesemer
22e0e1b049
- better comment classification
...
- related cleanups
R=r
OCL=19227
CL=19227
2008-11-13 19:06:57 -08:00
Robert Griesemer
3c2f0ae132
* pretty printing snapshot: towards printing comments nicely
...
- implemented elastic tabstops algorithm, now correct and documented
- first cut at printing comments (use -comments flag, disabled for now)
- struct field types are now aligned (using elastic tab stops)
- needs more fine-tuning
* fixed a bug in test script
* added quick smoke test to makefile and invoke it in run.bash
instead of the full test
R=r
OCL=19220
CL=19220
2008-11-13 17:50:46 -08:00
Rob Pike
e2621b8037
add a %v format to print an arbitrary value in its "println" form.
...
also add code to print (pointers to) arrays, through %v.
R=rsc
DELTA=108 (70 added, 33 deleted, 5 changed)
OCL=19184
CL=19192
2008-11-13 15:20:52 -08:00
Russ Cox
e4f4ab0b8d
more array methods
...
R=r
OCL=19172
CL=19172
2008-11-13 13:42:59 -08:00
Russ Cox
c5f21c0dc2
* 6l:
...
if an object in an archive tries to refer
to a file in its original source directory,
ignore it.
* 6ar:
fix bug if archive is empty.
* gobuild:
build archive in current directory.
* math:
use new gobuild Makefile.
* test/math.go:
rename to mathest.go, add // run line, make it run.
R=r
DELTA=494 (277 added, 203 deleted, 14 changed)
OCL=19090
CL=19171
2008-11-13 13:42:26 -08:00
Ken Thompson
9795c9e727
temp fix for map not multiple of 8
...
R=r
OCL=19166
CL=19166
2008-11-13 13:20:18 -08:00
Ken Thompson
bc0b4f0d2a
mike's map code
...
R=r
OCL=19146
CL=19146
2008-11-13 10:35:44 -08:00
Ian Lance Taylor
c4d8dc0b83
This bug has been fixed; moving it from bugs to fixedbugs.
...
R=gri
DELTA=36 (18 added, 18 deleted, 0 changed)
OCL=19059
CL=19133
2008-11-12 21:59:43 -08:00
Rob Pike
419e1e05a1
add some support for modifying what pointers point to
...
R=rsc
DELTA=27 (16 added, 11 deleted, 0 changed)
OCL=19130
CL=19132
2008-11-12 19:05:05 -08:00
Rob Pike
6e70c2c74f
fix bug in FullyReader
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=19131
CL=19131
2008-11-12 19:04:56 -08:00
Robert Griesemer
20b9bfb136
wrong code for array access
...
R=r
OCL=19107
CL=19109
2008-11-12 14:57:23 -08:00
Rob Pike
b1d37b74d9
reflect.PtrValue.SetSub() to set pointers
...
R=rsc
OCL=19101
CL=19101
2008-11-12 14:19:39 -08:00
Rob Pike
2f4d35ffb9
converting uint bits back into floats
...
R=rsc
DELTA=32 (32 added, 0 deleted, 0 changed)
OCL=19084
CL=19091
2008-11-12 11:51:34 -08:00
Robert Griesemer
2727abe4fc
- lowercased package name (Bignum -> bignum)
...
- implemented some missing functionality (and, or, xor of positive ints)
R=r
OCL=19087
CL=19087
2008-11-12 11:00:11 -08:00
Ian Lance Taylor
9c9cc2c9d8
Recognize gccgo error messages. This uses GCCGO_ERROR, which
...
is recognized by the gccgo testsuite but is ignored by the
errchk script used with 6g.
method1.go:7:1: error: redefinition of 'M': parameter types changed
method1.go:6:1: note: previous definition of 'M' was here
method1.go:10:1: error: redefinition of 'f': parameter types changed
method1.go:9:1: note: previous definition of 'f' was here
method1.go:13:1: error: redefinition of 'g': parameter names changed
method1.go:12:1: note: previous definition of 'g' was here
R=rsc
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=18962
CL=19058
2008-11-11 18:18:34 -08:00
Ian Lance Taylor
a957ceec35
The scope rules have been changed to say that labels live in a
...
separate per-function namespace.
R=gri
DELTA=24 (8 added, 16 deleted, 0 changed)
OCL=19006
CL=19057
2008-11-11 18:17:54 -08:00
Ken Thompson
902a4d5f29
6c bug with large constants
...
R=r
OCL=19056
CL=19056
2008-11-11 18:15:36 -08:00
Rob Pike
6ee7fe5808
Implement a "full reader" wrapper for io.Read, guaranteeing that
...
either the buffer is full, zero bytes were read, or an error is returned.
R=rsc
DELTA=44 (42 added, 0 deleted, 2 changed)
OCL=19027
CL=19047
2008-11-11 17:28:36 -08:00
Russ Cox
b682f924d7
don't try interface/structure conversion until
...
last resort, because it assumes every call is a
real use of the conversion.
R=ken
OCL=19026
CL=19026
2008-11-11 15:55:32 -08:00
Russ Cox
792145723e
width fixes.
...
* check for uncomputed struct offsets
* distinguish function structs from ordinary structs
* make sure function structs are not examined in isolation
R=ken
OCL=19005
CL=19005
2008-11-11 13:46:55 -08:00
Ian Lance Taylor
07c54425c0
Remove useless "Trace/breakpoint trap" lines using the format
...
that is generated on Goobuntu.
R=r,rsc
DELTA=2 (1 added, 0 deleted, 1 changed)
OCL=18973
CL=18976
2008-11-11 10:01:51 -08:00
Rob Pike
0e544fa0e3
fix error-handling bug.
...
add newline after stack traces.
R=rsc
DELTA=3 (2 added, 1 deleted, 0 changed)
OCL=18945
CL=18953
2008-11-10 18:13:20 -08:00
Robert Griesemer
2a58e7d7a0
more work on elastic tabs:
...
- new code enabled, but no comments printed yet (so the effect
of the elastic tabs is not seen yet)
TBR=r
DELTA=200 (93 added, 69 deleted, 38 changed)
OCL=18951
CL=18951
2008-11-10 17:56:46 -08:00
Russ Cox
600ee088b6
* accept all NaNs, not just the one sys.NaN() returns.
...
* use union, not cast, to convert between uint64 and float64,
to avoid possible problems with gcc in future.
R=r
DELTA=75 (39 added, 15 deleted, 21 changed)
OCL=18926
CL=18926
2008-11-10 15:17:56 -08:00
Rob Pike
203a17c6ec
update tests
...
R=gri
DELTA=28 (12 added, 14 deleted, 2 changed)
OCL=18923
CL=18923
2008-11-10 14:59:15 -08:00
Russ Cox
e8766354a4
handle Inf, NaN in float print
...
R=r
DELTA=48 (23 added, 14 deleted, 11 changed)
OCL=18707
CL=18922
2008-11-10 14:54:10 -08:00
Rob Pike
842e1a9aa7
Add a cache to avoid unnecessary parsing of type strings when constructing values
...
R=rsc
DELTA=12 (9 added, 0 deleted, 3 changed)
OCL=18916
CL=18921
2008-11-10 14:53:40 -08:00
Rob Pike
10137e7f1d
fix start/stop bug in prof.
...
also only time-limit if a value is provided.
R=rsc
DELTA=9 (4 added, 2 deleted, 3 changed)
OCL=18917
CL=18920
2008-11-10 14:53:32 -08:00
Rob Pike
091fb779a1
Protocol buffer encoding.
...
R=rsc
DELTA=1075 (1028 added, 31 deleted, 16 changed)
OCL=18865
CL=18918
2008-11-10 14:47:28 -08:00
Robert Griesemer
176e256b26
Added missing Set method for Vector
...
BUG=1474670
TBR=r
DELTA=6 (6 added, 0 deleted, 0 changed)
OCL=18839
CL=18843
2008-11-07 18:31:50 -08:00
Robert Griesemer
a3b4a3c29d
- steps towards "flexible tab stops" simulation in pretty
...
printing output
- not yet enabled
R=r
OCL=18842
CL=18842
2008-11-07 18:30:58 -08:00
Rob Pike
4328d44254
wrong system call number for stat
...
TBR=rsc
OCL=18833
CL=18833
2008-11-07 16:17:42 -08:00
Ken Thompson
79f5697b02
byte multiply
...
R=r
OCL=18830
CL=18830
2008-11-07 16:05:17 -08:00
Ken Thompson
dc78c64f23
byte multiply
...
R=r
OCL=18807
CL=18807
2008-11-07 14:20:32 -08:00
Robert Griesemer
434c6052d8
- language to define type equality rigorously
...
- language for type guards
- fixed language for break statements
Also: Removed uses of "we" and replaced by impersonal language.
Minor cosmetic changes.
DELTA=237 (160 added, 34 deleted, 43 changed)
OCL=18620
CL=18800
2008-11-07 13:34:37 -08:00
Ian Lance Taylor
f8d7f5bd81
Don't use a type guard with a type which is not an interface.
...
R=r,gri
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=18781
CL=18785
2008-11-07 11:44:15 -08:00
Ian Lance Taylor
d5ba668edd
Test case for evaluation order of select statement.
...
R=r
DELTA=47 (47 added, 0 deleted, 0 changed)
OCL=18581
CL=18748
2008-11-06 22:27:32 -08:00
Ken Thompson
9b827cf9a0
bug in select default
...
R=r
OCL=18741
CL=18741
2008-11-06 17:50:28 -08:00
Ian Lance Taylor
9c7374d71b
Erroneous test case. The break statement should break out of
...
a select clause.
R=ken
DELTA=20 (0 added, 20 deleted, 0 changed)
OCL=18731
CL=18739
2008-11-06 17:39:48 -08:00
Robert Griesemer
483e031525
- binomial implementation (fixing broken build)
...
R=r
OCL=18738
CL=18738
2008-11-06 17:29:07 -08:00