Robert Griesemer
808341dd6e
- completed AST cleanup
...
- implemented support for type switches
R=r
OCL=26608
CL=26608
2009-03-20 17:18:48 -07:00
Rob Pike
2a5af744a6
fix wording of &T{x}
...
R=rsc
DELTA=5 (0 added, 2 deleted, 3 changed)
OCL=26607
CL=26607
2009-03-20 17:03:48 -07:00
Russ Cox
2bd101c4b1
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
2009-03-20 16:40:00 -07:00
Russ Cox
c1e748bd2e
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
2009-03-20 16:34:13 -07:00
Ian Lance Taylor
90943c8ee4
Test that interfaces work in type switches.
...
R=ken,rsc
DELTA=30 (30 added, 0 deleted, 0 changed)
OCL=26599
CL=26604
2009-03-20 16:30:54 -07:00
Russ Cox
7d443bb67a
make 8l generate Darwin Mach-O and Linux ELF binaries
...
R=ken
OCL=26584
CL=26589
2009-03-20 14:22:59 -07:00
Russ Cox
997b6f9d89
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
2009-03-20 14:22:46 -07:00
Russ Cox
0932b1f9b8
move pragtextflag into lexbody
...
R=ken
OCL=26581
CL=26587
2009-03-20 14:22:37 -07:00
Russ Cox
54aa835b44
range over channels.
...
also fix multiple-evaluation bug in range over arrays.
R=ken
OCL=26576
CL=26576
2009-03-20 11:32:58 -07:00
Ian Lance Taylor
386845b23f
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
2009-03-20 10:34:46 -07:00
Ian Lance Taylor
8b3df525a2
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
2009-03-19 17:33:28 -07:00
Robert Griesemer
091cba8d03
minor adjustments to switches text
...
R=r
DELTA=16 (5 added, 1 deleted, 10 changed)
OCL=26530
CL=26543
2009-03-19 08:39:40 -07:00
Rob Pike
37ab838d3a
&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
2009-03-18 22:58:36 -07:00
Rob Pike
70c1a106e6
drop the ,ok switch; keep the straight type switch.
...
R=rsc,gri
DELTA=97 (26 added, 42 deleted, 29 changed)
OCL=26436
CL=26527
2009-03-18 19:23:59 -07:00
Russ Cox
f7772627ad
fix b/1722502
...
BUG=1722502
R=ken
OCL=26526
CL=26526
2009-03-18 19:20:54 -07:00
Tom Szymanski
658ca49898
Make adler32 cleaner.
...
R=rsc
APPROVED=rsc
DELTA=22 (9 added, 6 deleted, 7 changed)
OCL=26498
CL=26500
2009-03-18 14:57:55 -07:00
Rob Pike
bdbb3b455e
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
2009-03-18 14:09:16 -07:00
Rob Pike
08eeb2535d
simplify test to eliminate now-deprecated forms of switch.
...
R=rsc
DELTA=76 (0 added, 63 deleted, 13 changed)
OCL=26439
CL=26490
2009-03-18 14:05:05 -07:00
Ken Thompson
1cdcfda140
remove assignment cases from switch
...
R=r
OCL=26480
CL=26480
2009-03-18 12:13:42 -07:00
Rob Pike
bd3c478f93
add value checks to the other switch - should have done this in prior round
...
R=rsc
OCL=26438
CL=26438
2009-03-17 20:57:54 -07:00
Rob Pike
bcb464d221
add test for type switches
...
R=rsc
DELTA=169 (169 added, 0 deleted, 0 changed)
OCL=26433
CL=26437
2009-03-17 20:55:42 -07:00
Ken Thompson
1e0c17e294
switch on false error
...
R=r
OCL=26434
CL=26434
2009-03-17 19:10:32 -07:00
Robert Griesemer
592dbb2d0a
daily snapshot:
...
- first part of AST cleaned up and documented
- tons of related cleanups and adjustments
R=r
OCL=26430
CL=26430
2009-03-17 18:41:35 -07:00
Rob Pike
5a5784977a
type switches
...
R=rsc,gri
DELTA=107 (90 added, 1 deleted, 16 changed)
OCL=26420
CL=26427
2009-03-17 16:48:35 -07:00
Ken Thompson
0f469a99a3
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
2009-03-17 13:58:38 -07:00
Rob Pike
e9f4fb2839
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
2009-03-16 22:53:23 -07:00
Ian Lance Taylor
bd64e81041
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
2009-03-16 21:48:07 -07:00
Ian Lance Taylor
1e39143966
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
2009-03-16 21:47:38 -07:00
Robert Griesemer
3cfd91f85b
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
2009-03-16 20:29:31 -07:00
Robert Griesemer
dea4394a67
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
2009-03-16 17:36:52 -07:00
Ken Thompson
5136a9e1f7
change format of Sigt and Sigi
...
to allow room for type hash
needed for log-time type switch.
R=r
OCL=26354
CL=26354
2009-03-16 15:27:08 -07:00
Robert Griesemer
1b141ca068
added &^ and &^=
...
R=rsc
DELTA=14 (12 added, 0 deleted, 2 changed)
OCL=26278
CL=26348
2009-03-16 14:20:08 -07:00
Robert Griesemer
5a27079801
spec and implementation disagree with respect to label declarations
...
R=rsc
DELTA=19 (19 added, 0 deleted, 0 changed)
OCL=26284
CL=26336
2009-03-16 11:21:58 -07:00
Robert Griesemer
ec77e75e5d
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
2009-03-13 16:59:51 -07:00
Ken Thompson
4523ee9ac8
close/closed on chans
...
R=r
OCL=26281
CL=26285
2009-03-13 16:47:54 -07:00
Kai Backman
db3a21d7c6
5a 5c 5l from inferno distribution
...
R=rsc
APPROVED=rsc
DELTA=19042 (19042 added, 0 deleted, 0 changed)
OCL=26268
CL=26270
2009-03-13 15:03:07 -07:00
Robert Griesemer
b260916a55
internal compiler error
...
R=rsc
DELTA=18 (18 added, 0 deleted, 0 changed)
OCL=26266
CL=26266
2009-03-13 14:14:50 -07:00
Russ Cox
5fbadf0bc3
warn -> yyerror in mparith.
...
close two more bugs.
R=ken
OCL=26226
CL=26226
2009-03-12 19:57:30 -07:00
Russ Cox
f8ba0f4511
mem.html: nit
...
go_spec.html: document const type propagation
R=ken
OCL=26223
CL=26225
2009-03-12 19:04:56 -07:00
Russ Cox
8f194bf5ff
make 6g constants behave as ken proposes. (i hope.)
...
various bug fixes and tests involving constants.
test/const1.go is the major new test case.
R=ken
OCL=26216
CL=26224
2009-03-12 19:04:38 -07:00
Rob Pike
9b5d82327b
s/expressios/expressions/
...
OCL=26222
CL=26222
2009-03-12 18:47:49 -07:00
Rob Pike
e20834092f
weasel words about types in shift expressions suggested by rsc
...
R=rsc
OCL=26220
CL=26220
2009-03-12 18:40:07 -07:00
Ken Thompson
6eb54cb05b
chan flags close/closed installed
...
runtime not finished.
R=r
OCL=26217
CL=26217
2009-03-12 17:55:11 -07:00
Robert Griesemer
e06a654ce1
daily snapshot:
...
- correctly associate comments with declarations
(available through AST)
- very raw printing of interface
- much more functionality, now needs some formatting, sorting, etc.
R=r
OCL=26213
CL=26213
2009-03-12 17:24:03 -07:00
Rob Pike
ce9417ee1a
fix language regarding type of numeric literals
...
R=rsc
DELTA=4 (0 added, 2 deleted, 2 changed)
OCL=26208
CL=26212
2009-03-12 17:08:47 -07:00
Rob Pike
307ec21932
what is the name for "&^". let's go with bit clear (and not)
...
R=rsc
DELTA=14 (0 added, 0 deleted, 14 changed)
OCL=26159
CL=26206
2009-03-12 15:53:56 -07:00
Robert Griesemer
6f321e28f4
- remove special handling of '\n' characters (used to be treated as comments
...
for pretty printer purposes - now properly ignored as white space since we
have line/col information)
- changed sample use in comment to an actually compiled function to make sure
sample is actually working
- added extra tests (checking line and column values, and the tokenize function)
R=rsc
DELTA=253 (61 added, 67 deleted, 125 changed)
OCL=26143
CL=26181
2009-03-12 11:04:11 -07:00
Rob Pike
0282719387
fix unqouted &
...
R=gri
OCL=26158
CL=26158
2009-03-11 22:02:18 -07:00
Rob Pike
cd04ec95ea
bit clear: &^ and &^=
...
R=gri
DELTA=5 (3 added, 0 deleted, 2 changed)
OCL=26155
CL=26157
2009-03-11 21:59:05 -07:00
Ken Thompson
bb02e481d2
added bitclear operators &^ and &^=
...
R=r
OCL=26152
CL=26152
2009-03-11 19:59:35 -07:00