Commit Graph

1976 Commits

Author SHA1 Message Date
Russ Cox
80f4ab47ee split heapmap, which is specific to 64-bit pointer addresses,
out of malloc proper.

TBR=r
OCL=26689
CL=26689
2009-03-24 15:11:56 -07:00
Russ Cox
209865be7c convert Linux to auto-generated defs.h
TBR=r
OCL=26686
CL=26688
2009-03-24 15:04:18 -07:00
Russ Cox
08cfcd1dd6 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
2009-03-24 13:51:48 -07:00
Russ Cox
8ee041dc24 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
2009-03-24 13:17:10 -07:00
Russ Cox
878822f355 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
2009-03-24 13:06:51 -07:00
Russ Cox
5a68303a15 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
2009-03-24 12:12:57 -07:00
Russ Cox
fcd76f7dc9 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
2009-03-24 11:49:22 -07:00
Russ Cox
13584f4a23 add test for close/closed, fix a few implementation bugs.
R=ken
OCL=26664
CL=26664
2009-03-23 18:50:35 -07:00
Russ Cox
86145611b0 allow range on nil maps
R=ken
OCL=26663
CL=26663
2009-03-23 18:32:37 -07:00
Rob Pike
8d44052b6d iterator for vector
R=rsc
DELTA=35  (35 added, 0 deleted, 0 changed)
OCL=26662
CL=26662
2009-03-23 17:46:59 -07:00
Rob Pike
482cbb1f33 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
2009-03-22 21:53:40 -07:00
Rob Pike
7525e085d2 bug141 is fixed
R=ken
DELTA=56  (26 added, 30 deleted, 0 changed)
OCL=26628
CL=26628
2009-03-22 21:02:17 -07:00
Ken Thompson
79fa5b65cb rewrote switch
fixed bug 141

R=r
OCL=26627
CL=26627
2009-03-22 20:54:21 -07:00
Rob Pike
afee1c5f0c 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
2009-03-20 17:41:25 -07:00
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