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
Rob Pike
175dd773e6
simpleminded ascii to floating point conversion
...
R=rsc
DELTA=111 (107 added, 0 deleted, 4 changed)
OCL=18720
CL=18725
2008-11-06 16:32:28 -08:00
Rob Pike
335a5236e7
add sys.float32bits, sys.float64bits
...
R=rsc
DELTA=21 (21 added, 0 deleted, 0 changed)
OCL=18709
CL=18718
2008-11-06 15:48:36 -08:00
Ian Lance Taylor
ce15158502
Test that a break statement inside a select statement breaks
...
out of the enclosing loop.
R=ken
DELTA=20 (20 added, 0 deleted, 0 changed)
OCL=18686
CL=18714
2008-11-06 15:24:10 -08:00
Russ Cox
ec81145565
s/gins/gbranch/
...
R=ken
OCL=18713
CL=18713
2008-11-06 15:05:19 -08:00
Russ Cox
0eda21a2fd
change minimum sethi/ullman number to 1
...
to distinguish not computed (0) vs trivial (1).
add missing ullmancalc on function args.
R=ken
OCL=18711
CL=18711
2008-11-06 14:50:58 -08:00
Robert Griesemer
ce164403da
A recreational programming exercise:
...
Multiplication of a Hilbert matrix with its inverse using
Bignum.Rationals as a test case for rational arithmetic.
R=r
OCL=18706
CL=18706
2008-11-06 14:23:49 -08:00
Russ Cox
9906bfc7bb
6g ninit fixes - fixes the two test cases
...
i isolated last night. does not fix rob's
interface-smashing bug.
R=ken
OCL=18698
CL=18698
2008-11-06 13:31:13 -08:00
Robert Griesemer
66c6b13b03
- implemented String() and Format functionality in Bignum
...
- added a test
R=r
OCL=18687
CL=18687
2008-11-06 12:13:52 -08:00
Robert Griesemer
3a2c0a9615
- fixes to sprintf (by rob)
...
R=r
OCL=18685
CL=18685
2008-11-06 11:56:08 -08:00
Rob Pike
91212bd1ad
If a value implements String(), use that in fmt.print (not fmt.printf)
...
R=rsc
DELTA=13 (9 added, 0 deleted, 4 changed)
OCL=18682
CL=18684
2008-11-06 11:38:44 -08:00
Rob Pike
f15dfa7802
Polymorphic printing.
...
R=rsc
DELTA=100 (70 added, 10 deleted, 20 changed)
OCL=18663
CL=18669
2008-11-06 10:40:57 -08:00
Ken Thompson
79fbbe37a7
select default
...
R=r
OCL=18646
CL=18646
2008-11-05 21:50:28 -08:00
Russ Cox
a6af484328
more runtime support for chan select default
...
R=ken
OCL=18630
CL=18630
2008-11-05 18:04:24 -08:00
Russ Cox
b69e80d8dd
runtime support for default in select.
...
assumes cas->send == 2 for default case.
R=ken
OCL=18628
CL=18628
2008-11-05 17:57:18 -08:00
Russ Cox
d6a7cefd1e
allow any type at all in sys.unreflect;
...
accomodate empty type table in 6l.
R=r
DELTA=10 (2 added, 8 deleted, 0 changed)
OCL=18601
CL=18605
2008-11-05 16:09:12 -08:00
Robert Griesemer
b3c983f3a0
- fixed typo in parser.go
...
- re-enabled bug118.go for pretty
R=r
OCL=18604
CL=18604
2008-11-05 16:05:36 -08:00
Russ Cox
553c98dca4
fix renamed-package bug in exported names:
...
always show original name
R=ken
OCL=18603
CL=18603
2008-11-05 15:59:34 -08:00
Robert Griesemer
11a3f759fd
- temporarily excluding bug118.go, causing pretty trouble
...
R=r
OCL=18602
CL=18602
2008-11-05 15:55:51 -08:00
Ken Thompson
83a798513c
more on t,ok = I.(T)
...
R=r
OCL=18599
CL=18599
2008-11-05 15:33:01 -08:00
Ian Lance Taylor
48d111f0b9
6g dumps core on this input file.
...
R=ken,rsc
DELTA=14 (14 added, 0 deleted, 0 changed)
OCL=18555
CL=18598
2008-11-05 15:27:40 -08:00
Ken Thompson
a8b56a73a4
T,ok = I.(T)
...
R=r
OCL=18580
CL=18582
2008-11-05 14:27:07 -08:00
Russ Cox
6f07ec721a
new interface error messages
...
package main
func main() {
var i interface { } = 1;
a := i.(*[]byte);
}
interface { } is int, not *[]uint8
throw: interface conversion
package main
func main() {
var i interface { };
a := i.(*[]byte);
}
interface is nil, not *[]uint8
throw: interface conversion
package main
func main() {
i := sys.unreflect(0, "*bogus");
a := i.(*[]byte);
}
interface { } is *bogus, not *[]uint8
throw: interface conversion
R=r
DELTA=30 (24 added, 2 deleted, 4 changed)
OCL=18548
CL=18565
2008-11-05 13:05:01 -08:00
Rob Pike
5a1cbe8b64
trim tags from type strings for structure fields.
...
R=rsc
DELTA=28 (14 added, 4 deleted, 10 changed)
OCL=18561
CL=18563
2008-11-05 13:01:33 -08:00
Ian Lance Taylor
7fe34ea002
Fix powser1.go to compile with the current 6g, which doesn't
...
recognize methods for a variable whose type is a named type
which is a pointer type. Add bug117 to test this case.
R=r
DELTA=24 (22 added, 0 deleted, 2 changed)
OCL=18547
CL=18554
2008-11-05 12:06:48 -08:00
Russ Cox
1983121bbb
6g interface changes:
...
* allow conversion between nil interface and any type.
* mark signatures as DUPOK so that multiple .6 can
contain sigt.*[]byte and only one gets used.
R=ken
OCL=18538
CL=18542
2008-11-05 11:27:50 -08:00
Ian Lance Taylor
6cd74b03f3
Don't use a named pointer type as a receiver type. The
...
current spec forbids it:
The type specified by the type name is called ``receiver
base type''. The receiver base type must be a type
declared in the current file, and it must not be a pointer
type.
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=18527
CL=18541
2008-11-05 11:25:30 -08:00
Rob Pike
44a82746a1
minor tweak to still non-portable alignment calculation
...
R=rsc
DELTA=4 (1 added, 1 deleted, 2 changed)
OCL=18528
CL=18533
2008-11-05 11:02:55 -08:00
Rob Pike
554d0aa589
make sizes and offsets int, not uint64
...
add Value.Interface, to extract an empty interface
that can be converted to a regular Go value of the
appropriate type, if known.
R=rsc
DELTA=49 (2 added, 0 deleted, 47 changed)
OCL=18526
CL=18526
2008-11-05 10:17:38 -08:00
Rob Pike
bdbb958895
fix bugs parsing functions in reflect library.
...
parsed interfaces wrong.
could not handle a function with a single type as a return value.
R=rsc
DELTA=34 (20 added, 2 deleted, 12 changed)
OCL=18511
CL=18520
2008-11-05 08:17:01 -08:00
Rob Pike
a45f947c34
type strings through the reflection library.
...
R=rsc
DELTA=187 (107 added, 28 deleted, 52 changed)
OCL=18510
CL=18510
2008-11-04 22:54:11 -08:00
Robert Griesemer
69e26bf28d
- added (incomplete) section on parameter passing
...
- decribe passing of "..." parameters for a start
R=r
DELTA=70 (69 added, 0 deleted, 1 changed)
OCL=18503
CL=18503
2008-11-04 16:46:45 -08:00
Rob Pike
02f718339b
update golden.out
...
R=rsc
OCL=18482
CL=18484
2008-11-04 14:33:47 -08:00