]> Cypherpunks repositories - gostls13.git/log
gostls13.git
16 years agosilence compiler warning
Ken Thompson [Mon, 17 Nov 2008 20:55:22 +0000 (12:55 -0800)]
silence compiler warning

R=r
OCL=19382
CL=19382

16 years agoupdate golden.out.
Russ Cox [Mon, 17 Nov 2008 20:44:22 +0000 (12:44 -0800)]
update golden.out.
fix bug in run that was missing output.
make run warn about tests in bugs/ that succeed with no output
(should be moved to fixedbugs/).

R=r
DELTA=21  (18 added, 0 deleted, 3 changed)
OCL=19381
CL=19381

16 years agocorrectly rounded floating-point conversions
Russ Cox [Mon, 17 Nov 2008 20:34:03 +0000 (12:34 -0800)]
correctly rounded floating-point conversions
in new package strconv.

move atoi etc to strconv too.

update fmt, etc to use strconv.

R=r
DELTA=2232  (1691 added, 424 deleted, 117 changed)
OCL=19286
CL=19380

16 years agofloating point constant errors in 6g
Russ Cox [Mon, 17 Nov 2008 20:33:49 +0000 (12:33 -0800)]
floating point constant errors in 6g

R=r
OCL=19379
CL=19379

16 years agoFirst pieces of malloc.
Russ Cox [Mon, 17 Nov 2008 20:32:35 +0000 (12:32 -0800)]
First pieces of malloc.

R=r
DELTA=756  (754 added, 0 deleted, 2 changed)
OCL=19266
CL=19378

16 years agoThe scope rules have been clarified to indicate that a
Ian Lance Taylor [Mon, 17 Nov 2008 20:19:02 +0000 (12:19 -0800)]
The scope rules have been clarified to indicate that a
variable may only be named after the complete declaration,
including the initialization statements.

R=gri
DELTA=61  (16 added, 45 deleted, 0 changed)
OCL=19343
CL=19376

16 years agoadopt suggestions from Bentley and McIlroy (SP&E Nov 1993)
Russ Cox [Mon, 17 Nov 2008 19:51:34 +0000 (11:51 -0800)]
adopt suggestions from Bentley and McIlroy (SP&E Nov 1993)
to make qsort more robust:

* use "ninther" to choose pivot.
* use three-way partition to avoid quadratic
    behavior on all-one-value arrays.

also add tests suggested in that paper.

the immediate cause of the slowness we observed was
in fact none of these: the recursive call was sorting
data[0:m] instead of data[a:m].

also rename package to "sort" to match convention.

R=r,gri
DELTA=358  (255 added, 21 deleted, 82 changed)
OCL=19341
CL=19373

16 years agoPackage-export proposal:
Robert Griesemer [Mon, 17 Nov 2008 17:51:56 +0000 (09:51 -0800)]
Package-export proposal:
- syntax change
- missing: corresponding language

DELTA=5  (2 added, 0 deleted, 3 changed)
OCL=19221
CL=19352

16 years agorandom permutation function
Ken Thompson [Sun, 16 Nov 2008 21:02:47 +0000 (13:02 -0800)]
random permutation function
func perm(n int) *map[int]int

R=r
OCL=19340
CL=19340

16 years agofix bugs in package locals
Russ Cox [Sat, 15 Nov 2008 01:31:29 +0000 (17:31 -0800)]
fix bugs in package locals

R=ken
OCL=19299
CL=19299

16 years agoThe compilers should and do permit interface types to list
Ian Lance Taylor [Sat, 15 Nov 2008 01:28:17 +0000 (17:28 -0800)]
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

16 years agoconflicting scopes should cause error exit
Rob Pike [Sat, 15 Nov 2008 01:28:11 +0000 (17:28 -0800)]
conflicting scopes should cause error exit

TBR=rsc
OCL=19297
CL=19297

16 years agopackage-local declarations using keyword "package".
Russ Cox [Sat, 15 Nov 2008 00:35:08 +0000 (16:35 -0800)]
package-local declarations using keyword "package".

R=r
DELTA=129  (81 added, 0 deleted, 48 changed)
OCL=19283
CL=19291

16 years agoswitch
Ken Thompson [Sat, 15 Nov 2008 00:24:27 +0000 (16:24 -0800)]
switch

R=r
OCL=19288
CL=19288

16 years agobuf fix: make FD.Read, FD.Write work for empty buffers
Robert Griesemer [Fri, 14 Nov 2008 23:13:29 +0000 (15:13 -0800)]
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

16 years agoclean up make script
Rob Pike [Fri, 14 Nov 2008 20:53:44 +0000 (12:53 -0800)]
clean up make script
reorder pieces so io is earlier

R=rsc
DELTA=66  (27 added, 24 deleted, 15 changed)
OCL=19248
CL=19255

16 years ago- added Init() function so that vectors can be used w/o New():
Robert Griesemer [Fri, 14 Nov 2008 19:22:39 +0000 (11:22 -0800)]
- 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

16 years agoadd cov, prof to default build; clean up compiler warnings
Russ Cox [Fri, 14 Nov 2008 18:57:48 +0000 (10:57 -0800)]
add cov, prof to default build; clean up compiler warnings

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

16 years agocode coverage tool
Russ Cox [Fri, 14 Nov 2008 18:45:23 +0000 (10:45 -0800)]
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

16 years agohandle nils safely
Rob Pike [Fri, 14 Nov 2008 18:42:45 +0000 (10:42 -0800)]
handle nils safely

R=rsc
DELTA=38  (14 added, 10 deleted, 14 changed)
OCL=19242
CL=19242

16 years ago- better comment classification
Robert Griesemer [Fri, 14 Nov 2008 03:06:57 +0000 (19:06 -0800)]
- better comment classification
- related cleanups

R=r
OCL=19227
CL=19227

16 years ago* pretty printing snapshot: towards printing comments nicely
Robert Griesemer [Fri, 14 Nov 2008 01:50:46 +0000 (17:50 -0800)]
* 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

16 years agoadd a %v format to print an arbitrary value in its "println" form.
Rob Pike [Thu, 13 Nov 2008 23:20:52 +0000 (15:20 -0800)]
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

16 years agomore array methods
Russ Cox [Thu, 13 Nov 2008 21:42:59 +0000 (13:42 -0800)]
more array methods

R=r
OCL=19172
CL=19172

16 years ago* 6l:
Russ Cox [Thu, 13 Nov 2008 21:42:26 +0000 (13:42 -0800)]
* 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

16 years agotemp fix for map not multiple of 8
Ken Thompson [Thu, 13 Nov 2008 21:20:18 +0000 (13:20 -0800)]
temp fix for map not multiple of 8

R=r
OCL=19166
CL=19166

16 years agomike's map code
Ken Thompson [Thu, 13 Nov 2008 18:35:44 +0000 (10:35 -0800)]
mike's map code

R=r
OCL=19146
CL=19146

16 years agoThis bug has been fixed; moving it from bugs to fixedbugs.
Ian Lance Taylor [Thu, 13 Nov 2008 05:59:43 +0000 (21:59 -0800)]
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

16 years agoadd some support for modifying what pointers point to
Rob Pike [Thu, 13 Nov 2008 03:05:05 +0000 (19:05 -0800)]
add some support for modifying what pointers point to

R=rsc
DELTA=27  (16 added, 11 deleted, 0 changed)
OCL=19130
CL=19132

16 years agofix bug in FullyReader
Rob Pike [Thu, 13 Nov 2008 03:04:56 +0000 (19:04 -0800)]
fix bug in FullyReader

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

16 years agowrong code for array access
Robert Griesemer [Wed, 12 Nov 2008 22:57:23 +0000 (14:57 -0800)]
wrong code for array access

R=r
OCL=19107
CL=19109

16 years agoreflect.PtrValue.SetSub() to set pointers
Rob Pike [Wed, 12 Nov 2008 22:19:39 +0000 (14:19 -0800)]
reflect.PtrValue.SetSub() to set pointers

R=rsc
OCL=19101
CL=19101

16 years agoconverting uint bits back into floats
Rob Pike [Wed, 12 Nov 2008 19:51:34 +0000 (11:51 -0800)]
converting uint bits back into floats

R=rsc
DELTA=32  (32 added, 0 deleted, 0 changed)
OCL=19084
CL=19091

16 years ago- lowercased package name (Bignum -> bignum)
Robert Griesemer [Wed, 12 Nov 2008 19:00:11 +0000 (11:00 -0800)]
- lowercased package name (Bignum -> bignum)
- implemented some missing functionality (and, or, xor of positive ints)

R=r
OCL=19087
CL=19087

16 years agoRecognize gccgo error messages. This uses GCCGO_ERROR, which
Ian Lance Taylor [Wed, 12 Nov 2008 02:18:34 +0000 (18:18 -0800)]
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

16 years agoThe scope rules have been changed to say that labels live in a
Ian Lance Taylor [Wed, 12 Nov 2008 02:17:54 +0000 (18:17 -0800)]
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

16 years ago6c bug with large constants
Ken Thompson [Wed, 12 Nov 2008 02:15:36 +0000 (18:15 -0800)]
6c bug with large constants

R=r
OCL=19056
CL=19056

16 years agoImplement a "full reader" wrapper for io.Read, guaranteeing that
Rob Pike [Wed, 12 Nov 2008 01:28:36 +0000 (17:28 -0800)]
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

16 years agodon't try interface/structure conversion until
Russ Cox [Tue, 11 Nov 2008 23:55:32 +0000 (15:55 -0800)]
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

16 years agowidth fixes.
Russ Cox [Tue, 11 Nov 2008 21:46:55 +0000 (13:46 -0800)]
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

16 years agoRemove useless "Trace/breakpoint trap" lines using the format
Ian Lance Taylor [Tue, 11 Nov 2008 18:01:51 +0000 (10:01 -0800)]
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

16 years agofix error-handling bug.
Rob Pike [Tue, 11 Nov 2008 02:13:20 +0000 (18:13 -0800)]
fix error-handling bug.
add newline after stack traces.

R=rsc
DELTA=3  (2 added, 1 deleted, 0 changed)
OCL=18945
CL=18953

16 years agomore work on elastic tabs:
Robert Griesemer [Tue, 11 Nov 2008 01:56:46 +0000 (17:56 -0800)]
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

16 years ago* accept all NaNs, not just the one sys.NaN() returns.
Russ Cox [Mon, 10 Nov 2008 23:17:56 +0000 (15:17 -0800)]
* 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

16 years agoupdate tests
Rob Pike [Mon, 10 Nov 2008 22:59:15 +0000 (14:59 -0800)]
update tests

R=gri
DELTA=28  (12 added, 14 deleted, 2 changed)
OCL=18923
CL=18923

16 years agohandle Inf, NaN in float print
Russ Cox [Mon, 10 Nov 2008 22:54:10 +0000 (14:54 -0800)]
handle Inf, NaN in float print

R=r
DELTA=48  (23 added, 14 deleted, 11 changed)
OCL=18707
CL=18922

16 years agoAdd a cache to avoid unnecessary parsing of type strings when constructing values
Rob Pike [Mon, 10 Nov 2008 22:53:40 +0000 (14:53 -0800)]
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

16 years agofix start/stop bug in prof.
Rob Pike [Mon, 10 Nov 2008 22:53:32 +0000 (14:53 -0800)]
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

16 years agoProtocol buffer encoding.
Rob Pike [Mon, 10 Nov 2008 22:47:28 +0000 (14:47 -0800)]
Protocol buffer encoding.

R=rsc
DELTA=1075  (1028 added, 31 deleted, 16 changed)
OCL=18865
CL=18918

16 years agoAdded missing Set method for Vector
Robert Griesemer [Sat, 8 Nov 2008 02:31:50 +0000 (18:31 -0800)]
Added missing Set method for Vector

BUG=1474670
TBR=r
DELTA=6  (6 added, 0 deleted, 0 changed)
OCL=18839
CL=18843

16 years ago- steps towards "flexible tab stops" simulation in pretty
Robert Griesemer [Sat, 8 Nov 2008 02:30:58 +0000 (18:30 -0800)]
- steps towards "flexible tab stops" simulation in pretty
  printing output
- not yet enabled

R=r
OCL=18842
CL=18842

16 years agowrong system call number for stat
Rob Pike [Sat, 8 Nov 2008 00:17:42 +0000 (16:17 -0800)]
wrong system call number for stat

TBR=rsc
OCL=18833
CL=18833

16 years agobyte multiply
Ken Thompson [Sat, 8 Nov 2008 00:05:17 +0000 (16:05 -0800)]
byte multiply

R=r
OCL=18830
CL=18830

16 years agobyte multiply
Ken Thompson [Fri, 7 Nov 2008 22:20:32 +0000 (14:20 -0800)]
byte multiply

R=r
OCL=18807
CL=18807

16 years ago- language to define type equality rigorously
Robert Griesemer [Fri, 7 Nov 2008 21:34:37 +0000 (13:34 -0800)]
- 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

16 years agoDon't use a type guard with a type which is not an interface.
Ian Lance Taylor [Fri, 7 Nov 2008 19:44:15 +0000 (11:44 -0800)]
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

16 years agoTest case for evaluation order of select statement.
Ian Lance Taylor [Fri, 7 Nov 2008 06:27:32 +0000 (22:27 -0800)]
Test case for evaluation order of select statement.

R=r
DELTA=47  (47 added, 0 deleted, 0 changed)
OCL=18581
CL=18748

16 years agobug in select default
Ken Thompson [Fri, 7 Nov 2008 01:50:28 +0000 (17:50 -0800)]
bug in select default

R=r
OCL=18741
CL=18741

16 years agoErroneous test case. The break statement should break out of
Ian Lance Taylor [Fri, 7 Nov 2008 01:39:48 +0000 (17:39 -0800)]
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

16 years ago- binomial implementation (fixing broken build)
Robert Griesemer [Fri, 7 Nov 2008 01:29:07 +0000 (17:29 -0800)]
- binomial implementation (fixing broken build)

R=r
OCL=18738
CL=18738

16 years agosimpleminded ascii to floating point conversion
Rob Pike [Fri, 7 Nov 2008 00:32:28 +0000 (16:32 -0800)]
simpleminded ascii to floating point conversion

R=rsc
DELTA=111  (107 added, 0 deleted, 4 changed)
OCL=18720
CL=18725

16 years agoadd sys.float32bits, sys.float64bits
Rob Pike [Thu, 6 Nov 2008 23:48:36 +0000 (15:48 -0800)]
add sys.float32bits, sys.float64bits

R=rsc
DELTA=21  (21 added, 0 deleted, 0 changed)
OCL=18709
CL=18718

16 years agoTest that a break statement inside a select statement breaks
Ian Lance Taylor [Thu, 6 Nov 2008 23:24:10 +0000 (15:24 -0800)]
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

16 years agos/gins/gbranch/
Russ Cox [Thu, 6 Nov 2008 23:05:19 +0000 (15:05 -0800)]
s/gins/gbranch/

R=ken
OCL=18713
CL=18713

16 years agochange minimum sethi/ullman number to 1
Russ Cox [Thu, 6 Nov 2008 22:50:58 +0000 (14:50 -0800)]
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

16 years agoA recreational programming exercise:
Robert Griesemer [Thu, 6 Nov 2008 22:23:49 +0000 (14:23 -0800)]
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

16 years ago6g ninit fixes - fixes the two test cases
Russ Cox [Thu, 6 Nov 2008 21:31:13 +0000 (13:31 -0800)]
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

16 years ago- implemented String() and Format functionality in Bignum
Robert Griesemer [Thu, 6 Nov 2008 20:13:52 +0000 (12:13 -0800)]
- implemented String() and Format functionality in Bignum
- added a test

R=r
OCL=18687
CL=18687

16 years ago- fixes to sprintf (by rob)
Robert Griesemer [Thu, 6 Nov 2008 19:56:08 +0000 (11:56 -0800)]
- fixes to sprintf (by rob)

R=r
OCL=18685
CL=18685

16 years agoIf a value implements String(), use that in fmt.print (not fmt.printf)
Rob Pike [Thu, 6 Nov 2008 19:38:44 +0000 (11:38 -0800)]
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

16 years agoPolymorphic printing.
Rob Pike [Thu, 6 Nov 2008 18:40:57 +0000 (10:40 -0800)]
Polymorphic printing.

R=rsc
DELTA=100  (70 added, 10 deleted, 20 changed)
OCL=18663
CL=18669

16 years agoselect default
Ken Thompson [Thu, 6 Nov 2008 05:50:28 +0000 (21:50 -0800)]
select default

R=r
OCL=18646
CL=18646

16 years agomore runtime support for chan select default
Russ Cox [Thu, 6 Nov 2008 02:04:24 +0000 (18:04 -0800)]
more runtime support for chan select default

R=ken
OCL=18630
CL=18630

16 years agoruntime support for default in select.
Russ Cox [Thu, 6 Nov 2008 01:57:18 +0000 (17:57 -0800)]
runtime support for default in select.
assumes cas->send == 2 for default case.

R=ken
OCL=18628
CL=18628

16 years agoallow any type at all in sys.unreflect;
Russ Cox [Thu, 6 Nov 2008 00:09:12 +0000 (16:09 -0800)]
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

16 years ago- fixed typo in parser.go
Robert Griesemer [Thu, 6 Nov 2008 00:05:36 +0000 (16:05 -0800)]
- fixed typo in parser.go
- re-enabled bug118.go for pretty

R=r
OCL=18604
CL=18604

16 years agofix renamed-package bug in exported names:
Russ Cox [Wed, 5 Nov 2008 23:59:34 +0000 (15:59 -0800)]
fix renamed-package bug in exported names:
always show original name

R=ken
OCL=18603
CL=18603

16 years ago- temporarily excluding bug118.go, causing pretty trouble
Robert Griesemer [Wed, 5 Nov 2008 23:55:51 +0000 (15:55 -0800)]
- temporarily excluding bug118.go, causing pretty trouble

R=r
OCL=18602
CL=18602

16 years agomore on t,ok = I.(T)
Ken Thompson [Wed, 5 Nov 2008 23:33:01 +0000 (15:33 -0800)]
more on t,ok = I.(T)

R=r
OCL=18599
CL=18599

16 years ago6g dumps core on this input file.
Ian Lance Taylor [Wed, 5 Nov 2008 23:27:40 +0000 (15:27 -0800)]
6g dumps core on this input file.

R=ken,rsc
DELTA=14  (14 added, 0 deleted, 0 changed)
OCL=18555
CL=18598

16 years agoT,ok = I.(T)
Ken Thompson [Wed, 5 Nov 2008 22:27:07 +0000 (14:27 -0800)]
T,ok = I.(T)

R=r
OCL=18580
CL=18582

16 years agonew interface error messages
Russ Cox [Wed, 5 Nov 2008 21:05:01 +0000 (13:05 -0800)]
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

16 years agotrim tags from type strings for structure fields.
Rob Pike [Wed, 5 Nov 2008 21:01:33 +0000 (13:01 -0800)]
trim tags from type strings for structure fields.

R=rsc
DELTA=28  (14 added, 4 deleted, 10 changed)
OCL=18561
CL=18563

16 years agoFix powser1.go to compile with the current 6g, which doesn't
Ian Lance Taylor [Wed, 5 Nov 2008 20:06:48 +0000 (12:06 -0800)]
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

16 years ago6g interface changes:
Russ Cox [Wed, 5 Nov 2008 19:27:50 +0000 (11:27 -0800)]
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

16 years agoDon't use a named pointer type as a receiver type. The
Ian Lance Taylor [Wed, 5 Nov 2008 19:25:30 +0000 (11:25 -0800)]
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

16 years agominor tweak to still non-portable alignment calculation
Rob Pike [Wed, 5 Nov 2008 19:02:55 +0000 (11:02 -0800)]
minor tweak to still non-portable alignment calculation

R=rsc
DELTA=4  (1 added, 1 deleted, 2 changed)
OCL=18528
CL=18533

16 years agomake sizes and offsets int, not uint64
Rob Pike [Wed, 5 Nov 2008 18:17:38 +0000 (10:17 -0800)]
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

16 years agofix bugs parsing functions in reflect library.
Rob Pike [Wed, 5 Nov 2008 16:17:01 +0000 (08:17 -0800)]
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

16 years agotype strings through the reflection library.
Rob Pike [Wed, 5 Nov 2008 06:54:11 +0000 (22:54 -0800)]
type strings through the reflection library.

R=rsc
DELTA=187  (107 added, 28 deleted, 52 changed)
OCL=18510
CL=18510

16 years ago- added (incomplete) section on parameter passing
Robert Griesemer [Wed, 5 Nov 2008 00:46:45 +0000 (16:46 -0800)]
- 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

16 years agoupdate golden.out
Rob Pike [Tue, 4 Nov 2008 22:33:47 +0000 (14:33 -0800)]
update golden.out

R=rsc
OCL=18482
CL=18484

16 years agoget rid of bignum leftovers
Robert Griesemer [Tue, 4 Nov 2008 22:08:47 +0000 (14:08 -0800)]
get rid of bignum leftovers

R=r
OCL=18475
CL=18475

16 years agoprepare for recursive printfs
Rob Pike [Tue, 4 Nov 2008 21:57:21 +0000 (13:57 -0800)]
prepare for recursive printfs

R=rsc
DELTA=31  (9 added, 6 deleted, 16 changed)
OCL=18470
CL=18472

16 years agoinstall bignum as library
Robert Griesemer [Tue, 4 Nov 2008 21:55:18 +0000 (13:55 -0800)]
install bignum as library

R=r
DELTA=3501  (1752 added, 1749 deleted, 0 changed)
OCL=18460
CL=18471

16 years ago- better support for string conversions
Robert Griesemer [Tue, 4 Nov 2008 19:37:19 +0000 (11:37 -0800)]
- better support for string conversions
- removed trailing tabs

R=r
OCL=18458
CL=18458

16 years agomove invalid method uses to new test
Russ Cox [Tue, 4 Nov 2008 17:45:27 +0000 (09:45 -0800)]
move invalid method uses to new test

R=iant
DELTA=24  (13 added, 10 deleted, 1 changed)
OCL=18424
CL=18439

16 years ago- completed integer support (some logical functions missing)
Robert Griesemer [Tue, 4 Nov 2008 17:33:15 +0000 (09:33 -0800)]
- completed integer support (some logical functions missing)
- completed rational support
- better documentation
- more tests
- cleanups

R=r
OCL=18438
CL=18438

16 years agoruntime support for interface ok,
Russ Cox [Tue, 4 Nov 2008 01:34:37 +0000 (17:34 -0800)]
runtime support for interface ok,
whatever the final syntax ends up being.

R=ken
OCL=18414
CL=18414

16 years ago6l: generate gotypesigs on demand.
Russ Cox [Tue, 4 Nov 2008 00:03:12 +0000 (16:03 -0800)]
6l: generate gotypesigs on demand.
add sys.unreflect, which uses gotypesigs.

R=r
DELTA=170  (152 added, 12 deleted, 6 changed)
OCL=18396
CL=18404