]> Cypherpunks repositories - gostls13.git/log
gostls13.git
17 years ago* move go-specific loader code
Russ Cox [Tue, 31 Mar 2009 07:20:07 +0000 (00:20 -0700)]
* move go-specific loader code
into gc directory, where it gets included as ../gc/ldbody
this is similar to the assemblers including ../cc/lexbody
and ../cc/macbody.

* hook go-specific loader code into 8l.

* make current 8.out.h and 6.out.h backward compatible
with plan 9's versions.  i had added some constants in
the middle of enums and have now moved them to the end.
this keeps us from invalidating old .8 and .6 files.
not sure how much it really matters, but easy to do.

R=r
DELTA=1314  (667 added, 623 deleted, 24 changed)
OCL=26938
CL=26941

17 years agomove tiny gsubr functions together at the top of the file.
Russ Cox [Tue, 31 Mar 2009 07:19:38 +0000 (00:19 -0700)]
move tiny gsubr functions together at the top of the file.
delete unused mkenam file

R=ken
OCL=26940
CL=26940

17 years agoSeparate the alignment of a field from the alignment of the
Ian Lance Taylor [Tue, 31 Mar 2009 06:19:31 +0000 (23:19 -0700)]
Separate the alignment of a field from the alignment of the
type of the field.  Use the field alignment to compute the
size of a structure.

This may help 8g but is mainly for gccgo.  gccgo maintains the
standard C/C++ ABI for structure field alignment.  For the
i386, this requires that a float64 field in a struct be
aligned on a 32-bit boundary, although for efficiency a
variable of type float64 or []float64 should be aligned on a
64-bit boundary.

I also removed the unused size field from structField.

R=r
DELTA=117  (75 added, 2 deleted, 40 changed)
OCL=26842
CL=26936

17 years agofix http://b/1748082
Russ Cox [Tue, 31 Mar 2009 05:26:00 +0000 (22:26 -0700)]
fix http://b/1748082

package main
var f = func(a, b int) int { return a + b }

R=ken
OCL=26935
CL=26935

17 years agofix build (moved decl to go.h earlier
Russ Cox [Tue, 31 Mar 2009 04:39:10 +0000 (21:39 -0700)]
fix build (moved decl to go.h earlier
and changed vlong to int64).

R=ken
OCL=26934
CL=26934

17 years agomove portable object routines (especially
Russ Cox [Tue, 31 Mar 2009 04:31:29 +0000 (21:31 -0700)]
move portable object routines (especially
signature generation) into gc.

R=ken
OCL=26933
CL=26933

17 years agoclosure bug: carry along outnamed flag.
Russ Cox [Tue, 31 Mar 2009 02:21:36 +0000 (19:21 -0700)]
closure bug: carry along outnamed flag.

R=ken
OCL=26930
CL=26930

17 years agomove portable code generation (basic statements) to gc.
Russ Cox [Tue, 31 Mar 2009 02:15:07 +0000 (19:15 -0700)]
move portable code generation (basic statements) to gc.

R=ken
OCL=26929
CL=26929

17 years agolog.Stderr should actually go to stderr.
David Symonds [Tue, 31 Mar 2009 02:01:59 +0000 (19:01 -0700)]
log.Stderr should actually go to stderr.

R=r
APPROVED=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=26926
CL=26928

17 years agomove some portable pieces of 6g/gsubr.c into gc/subr.c
Russ Cox [Tue, 31 Mar 2009 00:52:21 +0000 (17:52 -0700)]
move some portable pieces of 6g/gsubr.c into gc/subr.c

int brcom(int);
int brrev(int);
void setmaxarg(Type*);
Sig* lsort(Sig*, int(*)(Sig*, Sig*));
int dotoffset(Node*, int*, Node**);
void stringpool(Node*);
void tempname(Node*, Type*);

R=ken
OCL=26922
CL=26922

17 years agodelete dregs: inarggen, genpanic, regret
Russ Cox [Tue, 31 Mar 2009 00:15:54 +0000 (17:15 -0700)]
delete dregs: inarggen, genpanic, regret

R=ken
OCL=26916
CL=26918

17 years agodaily snapshot:
Robert Griesemer [Tue, 31 Mar 2009 00:13:11 +0000 (17:13 -0700)]
daily snapshot:
- separating printing of AST and documentation
- astprinter: will subsume ast printing functionality of printer
- docprinter: will subsume doc printing functionality of printer
        also: more logic to collect all the documentation pertaining
      to all files of a package
- parser: some cleanups, stricter syntax checks
- gds: hooks to test new doc printer (disabled)

R=r
OCL=26915
CL=26915

17 years agomove alignment calculations into gc
Russ Cox [Tue, 31 Mar 2009 00:09:28 +0000 (17:09 -0700)]
move alignment calculations into gc

R=ken
OCL=26914
CL=26914

17 years agodon't crash on
Russ Cox [Tue, 31 Mar 2009 00:07:30 +0000 (17:07 -0700)]
don't crash on
unsafe.Alignof(struct{x float}{0}.x)

R=ken
OCL=26911
CL=26913

17 years agomove bits.c from 6g to gc
Russ Cox [Mon, 30 Mar 2009 23:13:11 +0000 (16:13 -0700)]
move bits.c from 6g to gc

R=ken
OCL=26909
CL=26909

17 years agofix last 3 references to 'type guards'
Rob Pike [Mon, 30 Mar 2009 23:08:41 +0000 (16:08 -0700)]
fix last 3 references to 'type guards'

R=gri
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=26908
CL=26908

17 years agotests changed - throw calls panic directly now
Russ Cox [Mon, 30 Mar 2009 07:28:08 +0000 (00:28 -0700)]
tests changed - throw calls panic directly now
instead of dereferencing nil, so no more SIGSEGVs.

R=r
DELTA=28  (0 added, 14 deleted, 14 changed)
OCL=26881
CL=26881

17 years agonew tool godefs.
Russ Cox [Mon, 30 Mar 2009 07:21:25 +0000 (00:21 -0700)]
new tool godefs.
uses gcc to determine system header layouts and
emits simple C or Go.  see comment in main.c.

R=r
DELTA=1069  (1067 added, 0 deleted, 2 changed)
OCL=26682
CL=26880

17 years agodon't write cmp's output to the c file.
Russ Cox [Mon, 30 Mar 2009 07:12:56 +0000 (00:12 -0700)]
don't write cmp's output to the c file.
cope better with p4 not found.

R=r
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=26877
CL=26879

17 years agomore 386 runtime - can run tiny c programs.
Russ Cox [Mon, 30 Mar 2009 07:01:07 +0000 (00:01 -0700)]
more 386 runtime - can run tiny c programs.

R=r
DELTA=1926  (1727 added, 168 deleted, 31 changed)
OCL=26876
CL=26878

17 years ago- receiver syntax verification
Robert Griesemer [Sat, 28 Mar 2009 06:11:54 +0000 (23:11 -0700)]
- receiver syntax verification
- removed left-over panic() call
- fixed a couple of bugs

R=r
OCL=26856
CL=26856

17 years agoSignificant parser cleanup:
Robert Griesemer [Sat, 28 Mar 2009 02:27:09 +0000 (19:27 -0700)]
Significant parser cleanup:
- commented public interface
- much better and very precise error messages
- much better tracing output
- many more checks (still permits more than just syntactically legal
  programs, but much more is checked that can be checked w/o semantic information)
- updated with respect to updated AST
- general cleanup throughout

Parser almost ready for move into lib/go.

R=r
OCL=26853
CL=26855

17 years ago- have explicit KeyValueExpr node instead of BinaryExpr ':' (as discussed)
Robert Griesemer [Sat, 28 Mar 2009 02:26:03 +0000 (19:26 -0700)]
- have explicit KeyValueExpr node instead of BinaryExpr ':' (as discussed)
- remove ':' token from operator precedence levels

R=rsc
DELTA=25  (13 added, 8 deleted, 4 changed)
OCL=26850
CL=26854

17 years agoVerify that "byte" is an alias for "uint8".
Ian Lance Taylor [Fri, 27 Mar 2009 20:43:50 +0000 (13:43 -0700)]
Verify that "byte" is an alias for "uint8".

R=r
DELTA=6  (6 added, 0 deleted, 0 changed)
OCL=26836
CL=26841

17 years ago- minor tweak to composite literal production:
Robert Griesemer [Fri, 27 Mar 2009 20:43:28 +0000 (13:43 -0700)]
- minor tweak to composite literal production:
renamed PairExpr -> KeyValueExpr and PairExprList -> KeyValueList
(to match corresponding nodes in AST per rsc' suggestion)

- added a couple of TODOs

R=r,rsc
DELTA=10  (2 added, 0 deleted, 8 changed)
OCL=26837
CL=26840

17 years agointegrate feedback from rsc
Robert Griesemer [Fri, 27 Mar 2009 16:49:11 +0000 (09:49 -0700)]
integrate feedback from rsc

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=26810
CL=26834

17 years agoAdd a few tests which weren't being run.
Ian Lance Taylor [Fri, 27 Mar 2009 05:20:27 +0000 (22:20 -0700)]
Add a few tests which weren't being run.

R=r
DELTA=4  (4 added, 0 deleted, 0 changed)
OCL=26797
CL=26814

17 years ago- adjustments to match slightly changed scanner interface
Robert Griesemer [Fri, 27 Mar 2009 05:16:06 +0000 (22:16 -0700)]
- adjustments to match slightly changed scanner interface
- more comments on parser, various cleanups

TBR=r
OCL=26813
CL=26813

17 years agominor tweaks:
Robert Griesemer [Fri, 27 Mar 2009 05:13:49 +0000 (22:13 -0700)]
minor tweaks:
- permit scanner to run w/o error handler
- provide an error counter

R=iant
DELTA=43  (25 added, 0 deleted, 18 changed)
OCL=26804
CL=26812

17 years agorename redefined symbols
Rob Pike [Fri, 27 Mar 2009 05:04:34 +0000 (22:04 -0700)]
rename redefined symbols

R=iant
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=26802
CL=26811

17 years agomove AST into src/lib/go
Robert Griesemer [Fri, 27 Mar 2009 00:51:44 +0000 (17:51 -0700)]
move AST into src/lib/go

R=r
DELTA=1509  (756 added, 751 deleted, 2 changed)
OCL=26799
CL=26801

17 years agofix scanner initialization, add test
Robert Griesemer [Fri, 27 Mar 2009 00:40:51 +0000 (17:40 -0700)]
fix scanner initialization, add test

R=r
DELTA=27  (25 added, 0 deleted, 2 changed)
OCL=26798
CL=26798

17 years ago- adjustments to match new token/scanner/ast
Robert Griesemer [Thu, 26 Mar 2009 23:10:07 +0000 (16:10 -0700)]
- adjustments to match new token/scanner/ast

R=r
OCL=26794
CL=26794

17 years ago- renamed scanner.Location to token.Position
Robert Griesemer [Thu, 26 Mar 2009 23:08:44 +0000 (16:08 -0700)]
- renamed scanner.Location to token.Position
- by moving Position into token, scanner dependencies
  are removed from several files
- clearer field names in token.Position, now possible to
  have a Pos() accessor w/o naming conflicts
- added Pos() accessor
- use anonymous token.Position field in AST nodes

R=r
DELTA=244  (28 added, 55 deleted, 161 changed)
OCL=26786
CL=26793

17 years agoEncodeRuneToString
Robert Griesemer [Thu, 26 Mar 2009 23:05:30 +0000 (16:05 -0700)]
EncodeRuneToString

R=rsc
DELTA=22  (22 added, 0 deleted, 0 changed)
OCL=26779
CL=26792

17 years ago- introduce explicit Token type
Robert Griesemer [Thu, 26 Mar 2009 17:53:14 +0000 (10:53 -0700)]
- introduce explicit Token type
- convert some functions into methods
- corresponding changes in pretty

R=r
DELTA=57  (3 added, 0 deleted, 54 changed)
OCL=26764
CL=26777

17 years agoThis is really two changes in one but given interdependencies
Kai Backman [Wed, 25 Mar 2009 23:31:38 +0000 (16:31 -0700)]
This is really two changes in one but given interdependencies
and expected review latency I needed to combine the CLs.

1. Made the 5* toolpath build using the go build
   system. Hooked the subdirectories to clean.bash but added a
   separate make5.bash for now. Minor massage to make the code
   more similar to the current structure of 6c/6a/6l.

2. Change all references from long to int32 in line with
   similar change for the other toolchains.

The end result is that 5c, 5a and 5l can now be compiled and
the executables start up properly. Haven't thrown any input at
them yet.

R=rsc
APPROVED=rsc
DELTA=1052  (392 added, 328 deleted, 332 changed)
OCL=26757
CL=26761

17 years agouse FunctionType in FunctionLit production
Robert Griesemer [Wed, 25 Mar 2009 20:58:44 +0000 (13:58 -0700)]
use FunctionType in FunctionLit production

R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=26738
CL=26753

17 years agoadjustments matching updated ast
Robert Griesemer [Wed, 25 Mar 2009 19:45:06 +0000 (12:45 -0700)]
adjustments matching updated ast

R=r
OCL=26746
CL=26746

17 years agoAST for Go programs
Robert Griesemer [Wed, 25 Mar 2009 19:44:18 +0000 (12:44 -0700)]
AST for Go programs

R=rsc,r
DELTA=309  (67 added, 51 deleted, 191 changed)
OCL=26611
CL=26745

17 years agoadd some words (written by rsc) about the state of typed constants.
Rob Pike [Wed, 25 Mar 2009 02:16:42 +0000 (19:16 -0700)]
add some words (written by rsc) about the state of typed constants.

DELTA=31  (31 added, 0 deleted, 0 changed)
OCL=26709
CL=26716

17 years agoadd .8 support to libmach_amd64 [sic].
Russ Cox [Wed, 25 Mar 2009 01:04:50 +0000 (18:04 -0700)]
add .8 support to libmach_amd64 [sic].
add code to handle 32-bit Mach-O and ELF binaries.

R=r
DELTA=452  (365 added, 29 deleted, 58 changed)
OCL=26696
CL=26712

17 years agomake 8a, 8c build again.
Russ Cox [Wed, 25 Mar 2009 01:04:19 +0000 (18:04 -0700)]
make 8a, 8c build again.
add 8a 8c 8l to the build to keep us honest.

R=r
DELTA=33  (28 added, 0 deleted, 5 changed)
OCL=26694
CL=26711

17 years agodrop rt0 object from 8l (already dropped from 6l).
Russ Cox [Wed, 25 Mar 2009 01:02:24 +0000 (18:02 -0700)]
drop rt0 object from 8l (already dropped from 6l).
remove debugging print.

R=r
DELTA=8  (0 added, 8 deleted, 0 changed)
OCL=26695
CL=26710

17 years agochange notation: s/Stat/Stmt/ in grammatical productions
Rob Pike [Wed, 25 Mar 2009 00:45:53 +0000 (17:45 -0700)]
change notation: s/Stat/Stmt/ in grammatical productions

DELTA=26  (0 added, 0 deleted, 26 changed)
OCL=26703
CL=26705

17 years agodelete incorrect, dreg example of select on type
Rob Pike [Wed, 25 Mar 2009 00:40:47 +0000 (17:40 -0700)]
delete incorrect, dreg example of select on type

R=gri,rsc
DELTA=48  (28 added, 11 deleted, 9 changed)
OCL=26630
CL=26701

17 years agogolden
Ken Thompson [Tue, 24 Mar 2009 23:47:33 +0000 (16:47 -0700)]
golden

R=r
OCL=26699
CL=26699

17 years ago^ type(const) now inverts "enough" bits
Ken Thompson [Tue, 24 Mar 2009 23:40:38 +0000 (16:40 -0700)]
^ type(const) now inverts "enough" bits
^ signed(const) becomes illegal
^ unsigned(const) becomes legal

R=r
OCL=26697
CL=26697

17 years agofix build:
Russ Cox [Tue, 24 Mar 2009 23:04:25 +0000 (16:04 -0700)]
fix build:
install runtime lib in correct location.
fix one bad type definition in defs.h.
clear out $GOROOT/lib in clean.bash.

TBR=r
OCL=26691
CL=26691

17 years agosplit heapmap, which is specific to 64-bit pointer addresses,
Russ Cox [Tue, 24 Mar 2009 22:11:56 +0000 (15:11 -0700)]
split heapmap, which is specific to 64-bit pointer addresses,
out of malloc proper.

TBR=r
OCL=26689
CL=26689

17 years agoconvert Linux to auto-generated defs.h
Russ Cox [Tue, 24 Mar 2009 22:04:18 +0000 (15:04 -0700)]
convert Linux to auto-generated defs.h

TBR=r
OCL=26686
CL=26688

17 years agoconvert darwin to use godefs-generated defs.h.
Russ Cox [Tue, 24 Mar 2009 20:51:48 +0000 (13:51 -0700)]
convert darwin to use godefs-generated defs.h.

this change is much smaller if you ignore
the machine-generated defs.h.

TBR=r
OCL=26684
CL=26684

17 years agosplit rt1.c into signal.c and thread.c.
Russ Cox [Tue, 24 Mar 2009 20:17:10 +0000 (13:17 -0700)]
split rt1.c into signal.c and thread.c.
move out of arch-specific directory: only os-specific.
rm sys_types.h (unused).

TBR=r
OCL=26681
CL=26681

17 years agomove darwin specific code into runtime/darwin/
Russ Cox [Tue, 24 Mar 2009 20:06:51 +0000 (13:06 -0700)]
move darwin specific code into runtime/darwin/
move darwin-amd64 specific code into runtime/darwin/amd64/
repeat for linux.

move rt0 into runtime.a instead of keeping a separate .6 file.
6l seems to have no problem with that.

TBR=r
OCL=26680
CL=26680

17 years agothrow away most of the compat.h compatibility layer
Russ Cox [Tue, 24 Mar 2009 19:12:57 +0000 (12:12 -0700)]
throw away most of the compat.h compatibility layer
in favor of the lib9 compatibility layer.  no need for two.

now that mycreate is gone, .6 files are 0644 not 0755.

TBR=r
OCL=26679
CL=26679

17 years agomove amd64-specific (but os-independent) pieces of runtime
Russ Cox [Tue, 24 Mar 2009 18:49:22 +0000 (11:49 -0700)]
move amd64-specific (but os-independent) pieces of runtime
into amd64/ directory.

split rt2_amd64.c into closure.c and traceback.c.

TBR=r
OCL=26678
CL=26678

17 years agoadd test for close/closed, fix a few implementation bugs.
Russ Cox [Tue, 24 Mar 2009 01:50:35 +0000 (18:50 -0700)]
add test for close/closed, fix a few implementation bugs.

R=ken
OCL=26664
CL=26664

17 years agoallow range on nil maps
Russ Cox [Tue, 24 Mar 2009 01:32:37 +0000 (18:32 -0700)]
allow range on nil maps

R=ken
OCL=26663
CL=26663

17 years agoiterator for vector
Rob Pike [Tue, 24 Mar 2009 00:46:59 +0000 (17:46 -0700)]
iterator for vector

R=rsc
DELTA=35  (35 added, 0 deleted, 0 changed)
OCL=26662
CL=26662

17 years agochange file name so it can be copied without name change to a more public place.
Rob Pike [Mon, 23 Mar 2009 04:53:40 +0000 (21:53 -0700)]
change file name so it can be copied without name change to a more public place.

R=rsc
DELTA=1090  (545 added, 545 deleted, 0 changed)
OCL=26629
CL=26629

17 years agobug141 is fixed
Rob Pike [Mon, 23 Mar 2009 04:02:17 +0000 (21:02 -0700)]
bug141 is fixed

R=ken
DELTA=56  (26 added, 30 deleted, 0 changed)
OCL=26628
CL=26628

17 years agorewrote switch
Ken Thompson [Mon, 23 Mar 2009 03:54:21 +0000 (20:54 -0700)]
rewrote switch
fixed bug 141

R=r
OCL=26627
CL=26627

17 years agoadd simple text about & and *.
Rob Pike [Sat, 21 Mar 2009 00:41:25 +0000 (17:41 -0700)]
add simple text about & and *.
clean up html: PLEASE RUN TIDY WHEN YOU EDIT THIS DOCUMENT
deferring method value update until we decide what happens.

R=gri
DELTA=50  (38 added, 4 deleted, 8 changed)
OCL=26609
CL=26612

17 years ago- completed AST cleanup
Robert Griesemer [Sat, 21 Mar 2009 00:18:48 +0000 (17:18 -0700)]
- completed AST cleanup
- implemented support for type switches

R=r
OCL=26608
CL=26608

17 years agofix wording of &T{x}
Rob Pike [Sat, 21 Mar 2009 00:03:48 +0000 (17:03 -0700)]
fix wording of &T{x}

R=rsc
DELTA=5  (0 added, 2 deleted, 3 changed)
OCL=26607
CL=26607

17 years agoupdate 8a, 8c, 8l to use new object format.
Russ Cox [Fri, 20 Mar 2009 23:40:00 +0000 (16:40 -0700)]
update 8a, 8c, 8l to use new object format.

add "extern register" support to 8c.
extern register means allocate in the FS-relative segment.

make 8l generate segmented stack checks.

R=ken
OCL=26600
CL=26606

17 years agoembarassing bug in allocator:
Russ Cox [Fri, 20 Mar 2009 23:34:13 +0000 (16:34 -0700)]
embarassing bug in allocator:
was applying wrong waste check,
resulting in many more size classes
than necessary.

R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=26602
CL=26605

17 years agoTest that interfaces work in type switches.
Ian Lance Taylor [Fri, 20 Mar 2009 23:30:54 +0000 (16:30 -0700)]
Test that interfaces work in type switches.

R=ken,rsc
DELTA=30  (30 added, 0 deleted, 0 changed)
OCL=26599
CL=26604

17 years agomake 8l generate Darwin Mach-O and Linux ELF binaries
Russ Cox [Fri, 20 Mar 2009 21:22:59 +0000 (14:22 -0700)]
make 8l generate Darwin Mach-O and Linux ELF binaries

R=ken
OCL=26584
CL=26589

17 years agodon't need two names for the same function (vputl and llputl).
Russ Cox [Fri, 20 Mar 2009 21:22:46 +0000 (14:22 -0700)]
don't need two names for the same function (vputl and llputl).
also use thechar, to make copy/paste easier.

R=ken
OCL=26583
CL=26588

17 years agomove pragtextflag into lexbody
Russ Cox [Fri, 20 Mar 2009 21:22:37 +0000 (14:22 -0700)]
move pragtextflag into lexbody

R=ken
OCL=26581
CL=26587

17 years agorange over channels.
Russ Cox [Fri, 20 Mar 2009 18:32:58 +0000 (11:32 -0700)]
range over channels.

also fix multiple-evaluation bug in range over arrays.

R=ken
OCL=26576
CL=26576

17 years agoMatch gccgo error messages.
Ian Lance Taylor [Fri, 20 Mar 2009 17:34:46 +0000 (10:34 -0700)]
Match gccgo error messages.

bug090.go:41:6: error: floating point constant truncated to integer
bug090.go:32:6: error: floating point constant truncated to integer
bug090.go:34:14: error: floating point constant truncated to integer
bug090.go:37:5: error: incompatible types in assignment
bug090.go:40:5: error: incompatible types in assignment

R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=26564
CL=26574

17 years agoModify error regexps to match gccgo error messages.
Ian Lance Taylor [Fri, 20 Mar 2009 00:33:28 +0000 (17:33 -0700)]
Modify error regexps to match gccgo error messages.

const1.go:23:13: error: integer constant overflow
const1.go:25:13: error: integer constant overflow
const1.go:26:14: error: integer constant overflow
const1.go:27:18: error: integer constant overflow
const1.go:28:19: error: integer constant overflow
const1.go:29:16: error: integer constant overflow
const1.go:29:25: error: integer constant overflow
const1.go:30:13: error: integer constant overflow
const1.go:33:14: error: integer constant overflow
const1.go:34:14: error: integer constant overflow
const1.go:36:22: error: integer constant overflow
const1.go:37:7: error: integer constant overflow
const1.go:38:8: error: integer constant overflow
const1.go:39:7: error: integer constant overflow
const1.go:40:7: error: integer constant overflow
const1.go:41:8: error: integer constant overflow
const1.go:44:23: error: integer constant overflow
const1.go:46:13: error: integer constant overflow
const1.go:47:24: error: integer constant overflow
const1.go:48:24: error: integer constant overflow
const1.go:49:22: error: integer constant overflow
const1.go:51:23: error: integer constant overflow
const1.go:52:19: error: division by zero
const1.go:58:11: error: division by zero
const1.go:43:17: error: integer constant overflow
const1.go:45:13: error: integer constant overflow
const1.go:55:19: error: floating point overflow
const1.go:56:28: error: floating point overflow
const1.go:57:11: error: floating point overflow
const1.go:64:2: error: argument 0 has wrong type
const1.go:65:2: error: argument 0 has wrong type
const1.go:66:2: error: argument 0 has wrong type
const1.go:68:2: error: argument 0 has wrong type
const1.go:69:2: error: argument 0 has wrong type
const1.go:70:4: error: floating point constant truncated to integer
const1.go:72:2: error: argument 0 has wrong type
const1.go:73:2: error: argument 0 has wrong type
const1.go:74:2: error: argument 0 has wrong type

R=rsc
DELTA=34  (0 added, 0 deleted, 34 changed)
OCL=26560
CL=26560

17 years agominor adjustments to switches text
Robert Griesemer [Thu, 19 Mar 2009 15:39:40 +0000 (08:39 -0700)]
minor adjustments to switches text

R=r
DELTA=16  (5 added, 1 deleted, 10 changed)
OCL=26530
CL=26543

17 years ago&Foo{x,y} wasn't in the spec. This gets it in, dependent on a proper section regarding
Rob Pike [Thu, 19 Mar 2009 05:58:36 +0000 (22:58 -0700)]
&Foo{x,y} wasn't in the spec.  This gets it in, dependent on a proper section regarding
address operators, to follow.

R=rsc
DELTA=11  (10 added, 0 deleted, 1 changed)
OCL=26529
CL=26532

17 years agodrop the ,ok switch; keep the straight type switch.
Rob Pike [Thu, 19 Mar 2009 02:23:59 +0000 (19:23 -0700)]
drop the ,ok switch; keep the straight type switch.

R=rsc,gri
DELTA=97  (26 added, 42 deleted, 29 changed)
OCL=26436
CL=26527

17 years agofix b/1722502
Russ Cox [Thu, 19 Mar 2009 02:20:54 +0000 (19:20 -0700)]
fix b/1722502

BUG=1722502
R=ken
OCL=26526
CL=26526

17 years agoMake adler32 cleaner.
Tom Szymanski [Wed, 18 Mar 2009 21:57:55 +0000 (14:57 -0700)]
Make adler32 cleaner.

R=rsc
APPROVED=rsc
DELTA=22  (9 added, 6 deleted, 7 changed)
OCL=26498
CL=26500

17 years agoremove print() from the tutorial, generating a little clumsiness around "import"
Rob Pike [Wed, 18 Mar 2009 21:09:16 +0000 (14:09 -0700)]
remove print() from the tutorial, generating a little clumsiness around "import"

R=rsc,gri
DELTA=103  (36 added, 33 deleted, 34 changed)
OCL=26442
CL=26491

17 years agosimplify test to eliminate now-deprecated forms of switch.
Rob Pike [Wed, 18 Mar 2009 21:05:05 +0000 (14:05 -0700)]
simplify test to eliminate now-deprecated forms of switch.

R=rsc
DELTA=76  (0 added, 63 deleted, 13 changed)
OCL=26439
CL=26490

17 years agoremove assignment cases from switch
Ken Thompson [Wed, 18 Mar 2009 19:13:42 +0000 (12:13 -0700)]
remove assignment cases from switch

R=r
OCL=26480
CL=26480

17 years agoadd value checks to the other switch - should have done this in prior round
Rob Pike [Wed, 18 Mar 2009 03:57:54 +0000 (20:57 -0700)]
add value checks to the other switch - should have done this in prior round

R=rsc
OCL=26438
CL=26438

17 years agoadd test for type switches
Rob Pike [Wed, 18 Mar 2009 03:55:42 +0000 (20:55 -0700)]
add test for type switches

R=rsc
DELTA=169  (169 added, 0 deleted, 0 changed)
OCL=26433
CL=26437

17 years agoswitch on false error
Ken Thompson [Wed, 18 Mar 2009 02:10:32 +0000 (19:10 -0700)]
switch on false error

R=r
OCL=26434
CL=26434

17 years agodaily snapshot:
Robert Griesemer [Wed, 18 Mar 2009 01:41:35 +0000 (18:41 -0700)]
daily snapshot:
- first part of AST cleaned up and documented
- tons of related cleanups and adjustments

R=r
OCL=26430
CL=26430

17 years agotype switches
Rob Pike [Tue, 17 Mar 2009 23:48:35 +0000 (16:48 -0700)]
type switches

R=rsc,gri
DELTA=107  (90 added, 1 deleted, 16 changed)
OCL=26420
CL=26427

17 years agobinary search on type switches.
Ken Thompson [Tue, 17 Mar 2009 20:58:38 +0000 (13:58 -0700)]
binary search on type switches.
new feature 'case nil:' in type switch
will match iff the interface is nil.

R=r
OCL=26404
CL=26404

17 years agochange the tutorial to use File, file rather than FD, fd.
Rob Pike [Tue, 17 Mar 2009 05:53:23 +0000 (22:53 -0700)]
change the tutorial to use File, file rather than FD, fd.
also make the default input for makehtml be go_tutorial.txt.

R=rsc
DELTA=176  (58 added, 58 deleted, 60 changed)
OCL=26374
CL=26374

17 years agoRecognize gccgo error message.
Ian Lance Taylor [Tue, 17 Mar 2009 04:48:07 +0000 (21:48 -0700)]
Recognize gccgo error message.

const2.go:7:9: error: expected '='

Uses '.' to recognize the quotation marks, as the actual
characters printed depend on the user's locale.

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

17 years agoDon't try to define the same label twice, as that produces a
Ian Lance Taylor [Tue, 17 Mar 2009 04:47:38 +0000 (21:47 -0700)]
Don't try to define the same label twice, as that produces a
label redefinition error.

R=gri
DELTA=6  (0 added, 0 deleted, 6 changed)
OCL=26357
CL=26372

17 years agodaily snapshot:
Robert Griesemer [Tue, 17 Mar 2009 03:29:31 +0000 (20:29 -0700)]
daily snapshot:
- use explicit expression lists instead of binary trees to represent lists of the form a, b, c
(per discussion w/ Russ)
- use explicit nodes for various language constructs for better readability
- various adjustments in parsing and printing

next steps:
- clean up AST fully so it can be checked in as library

R=r
OCL=26371
CL=26371

17 years agoinstead of unlabeled statements, have a single labeled statement
Robert Griesemer [Tue, 17 Mar 2009 00:36:52 +0000 (17:36 -0700)]
instead of unlabeled statements, have a single labeled statement
- no syntactic or semantic change

R=r
DELTA=45  (24 added, 18 deleted, 3 changed)
OCL=26349
CL=26368

17 years agochange format of Sigt and Sigi
Ken Thompson [Mon, 16 Mar 2009 22:27:08 +0000 (15:27 -0700)]
change format of Sigt and Sigi
to allow room for type hash
needed for log-time type switch.

R=r
OCL=26354
CL=26354

17 years agoadded &^ and &^=
Robert Griesemer [Mon, 16 Mar 2009 21:20:08 +0000 (14:20 -0700)]
added &^ and &^=

R=rsc
DELTA=14  (12 added, 0 deleted, 2 changed)
OCL=26278
CL=26348

17 years agospec and implementation disagree with respect to label declarations
Robert Griesemer [Mon, 16 Mar 2009 18:21:58 +0000 (11:21 -0700)]
spec and implementation disagree with respect to label declarations

R=rsc
DELTA=19  (19 added, 0 deleted, 0 changed)
OCL=26284
CL=26336

17 years agodaily snapshot:
Robert Griesemer [Fri, 13 Mar 2009 23:59:51 +0000 (16:59 -0700)]
daily snapshot:
- various parser fixes to match updated spec (&&, &^=, label decls, const decls)
- using html template for directory and error page in doc server
- show compile errors inplace in the source
- cleanups

R=rsc
OCL=26287
CL=26287

17 years agoclose/closed on chans
Ken Thompson [Fri, 13 Mar 2009 23:47:54 +0000 (16:47 -0700)]
close/closed on chans

R=r
OCL=26281
CL=26285

17 years ago5a 5c 5l from inferno distribution
Kai Backman [Fri, 13 Mar 2009 22:03:07 +0000 (15:03 -0700)]
5a 5c 5l from inferno distribution

R=rsc
APPROVED=rsc
DELTA=19042  (19042 added, 0 deleted, 0 changed)
OCL=26268
CL=26270

17 years agointernal compiler error
Robert Griesemer [Fri, 13 Mar 2009 21:14:50 +0000 (14:14 -0700)]
internal compiler error

R=rsc
DELTA=18  (18 added, 0 deleted, 0 changed)
OCL=26266
CL=26266