Ken Thompson
2119294af9
methods on any type
...
-- but only *struct tested
R=r
OCL=15326
CL=15326
2008-09-14 16:57:55 -07:00
Ken Thompson
b9cee1b6c1
package name on signatures thru rename
...
R=r
OCL=15314
CL=15314
2008-09-13 14:51:39 -07:00
Ken Thompson
1ae08bee90
Automated g4 rollback of changelist 15312.
...
*** Reason for rollback ***
<enter reason for rollback>
*** Original change description ***
correct signal name thru package rename
R=r
OCL=15313
CL=15313
2008-09-13 14:49:36 -07:00
Ken Thompson
28b9702741
correct signal name thru package rename
...
R=r
OCL=15312
CL=15312
2008-09-13 14:46:19 -07:00
Ken Thompson
bb3269fba0
snprints for safety
...
R=r
OCL=15311
CL=15311
2008-09-13 14:37:56 -07:00
Ken Thompson
904d4045d3
1 got rid if static 'fn wo return' test
...
2 added dynamic calls to throw for array bounds
and 'fn wo return'
3 small optimization on index[constant]
R=r
OCL=15281
CL=15281
2008-09-12 16:48:35 -07:00
Ken Thompson
47580f79b4
bug075
...
R=r
OCL=15192
CL=15192
2008-09-11 19:09:25 -07:00
Ken Thompson
ff65872fbf
function wo return is an error - not warning
...
R=r
OCL=15169
CL=15169
2008-09-11 15:44:45 -07:00
Ken Thompson
d30c9a4be5
implement discussed function wo return statement
...
R=r
OCL=15166
CL=15166
2008-09-11 15:23:01 -07:00
Ken Thompson
0a7e4a7415
bug generating duplicate interface signatures
...
R=r
OCL=15119
CL=15119
2008-09-10 19:49:35 -07:00
Ken Thompson
a0e57201c7
bug in type of first argument to slice
...
R=r
OCL=15113
CL=15113
2008-09-10 16:45:41 -07:00
Ken Thompson
d40f032d18
fixed bug in certain
...
evaluation of complex literals
R=r
OCL=15036
CL=15036
2008-09-09 15:47:31 -07:00
Russ Cox
c3ca056143
go linux x86-64 kernel fixes:
...
* change .gosymtab and .gopclntab to section 7 (note)
* start INITTEXT at 4MB, not 4KB
R=r
OCL=14953
CL=14959
2008-09-08 15:22:55 -07:00
Ken Thompson
077fe40867
bug with struct literal with metods
...
R=r
OCL=14937
CL=14937
2008-09-08 13:10:11 -07:00
Ken Thompson
0194aaf918
T{} syntax for constructors
...
T(expression) for conversion
FUNC keyword no longer a type
R=r
OCL=14887
CL=14887
2008-09-05 19:50:34 -07:00
Ken Thompson
193eac7917
bugs 29, 61, 62, 74
...
fixedbugs 49 now (correctly) fails
bugs 32, 41, 68, 77 shouldnt be bugs
R=r
OCL=14842
CL=14842
2008-09-04 17:15:15 -07:00
Ken Thompson
9dbaab54d1
rewriting bugs
...
R=r
OCL=14810
CL=14810
2008-09-04 12:21:10 -07:00
Rob Pike
6c72bfa55b
fix bug in stack overflow check.
...
if stack is in low memory and frame size is huge, test could wrap around!
fix by omitting test altogether if we know frame is big.
R=gri
OCL=14782
CL=14782
2008-09-03 19:58:46 -07:00
Ken Thompson
182f91ffe0
map literals
...
R=r
OCL=14759
CL=14759
2008-09-03 14:40:22 -07:00
Ken Thompson
4539ced714
array literals
...
R=r
OCL=14756
CL=14756
2008-09-03 14:09:29 -07:00
Ken Thompson
1423bf3dc4
structure literals
...
R=r
OCL=14735
CL=14735
2008-09-02 19:11:25 -07:00
Ken Thompson
0ffacfd995
order of evaluation in function args
...
R=r
OCL=14733
CL=14733
2008-09-02 17:12:32 -07:00
Ken Thompson
9c5669bd0b
bug in conv(string, bytearray)
...
R=r
OCL=14732
CL=14732
2008-09-02 16:21:30 -07:00
Ken Thompson
a7f1af81bd
minor bugs
...
R=r
OCL=14702
CL=14702
2008-09-01 14:37:32 -07:00
Ken Thompson
33ee52727f
fixed labels/break/continue/goto
...
R=r
OCL=14675
CL=14675
2008-08-29 20:30:19 -07:00
Ken Thompson
944ad62ecd
fix type of (1<<x)
...
R=r
OCL=14656
CL=14656
2008-08-29 13:24:53 -07:00
Ken Thompson
53010efe01
shift operations to new spec
...
R=r
OCL=14641
CL=14641
2008-08-28 19:59:42 -07:00
Ken Thompson
c6130e9f1f
get rid of static/dynamic array distinction
...
R=r
OCL=14634
CL=14634
2008-08-28 15:17:37 -07:00
Ken Thompson
66a603c986
arrays
...
R=r
OCL=14603
CL=14603
2008-08-27 17:28:30 -07:00
Ken Thompson
30fd44cf9d
fix fat copy of overlapping data
...
R=r
OCL=14417
CL=14417
2008-08-21 20:49:04 -07:00
Rob Pike
b59b551be7
allow predefined identifiers (len, etc.) to be exported.
...
(they were not accepted as names by the import parser)
R=ken
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=14159
CL=14159
2008-08-13 15:24:55 -07:00
Ken Thompson
52861558f4
put i2s, s2i and i2i in convert
...
R=r
OCL=14143
CL=14143
2008-08-12 19:13:09 -07:00
Ken Thompson
ead7a6d47a
i2s and i2i
...
R=r
OCL=14140
CL=14140
2008-08-12 16:36:18 -07:00
Ken Thompson
c1ab5a554f
resolve go.y edits
...
R=r
OCL=14132
CL=14132
2008-08-12 14:28:58 -07:00
Ken Thompson
4797523572
fixed bugs in const/case
...
R=r
DELTA=138 (75 added, 12 deleted, 51 changed)
OCL=14129
CL=14131
2008-08-12 14:04:03 -07:00
Rob Pike
72d50900e3
fix a typo in the comments
...
R=ken
OCL=14104
CL=14104
2008-08-11 21:29:11 -07:00
Ken Thompson
a8a9dbc9c6
print() and field names
...
R=r
DELTA=86 (61 added, 3 deleted, 22 changed)
OCL=14099
CL=14099
2008-08-11 19:17:28 -07:00
Ken Thompson
2679eefb31
floating <= and >= compare
...
R=r
DELTA=8 (0 added, 0 deleted, 8 changed)
OCL=14091
CL=14091
2008-08-11 13:53:50 -07:00
Ken Thompson
2b75556436
export large constants
...
R=r
DELTA=37 (31 added, 4 deleted, 2 changed)
OCL=14089
CL=14089
2008-08-11 13:22:04 -07:00
Ken Thompson
5649c23c8c
fixed op=, ++ and -- on maps (bug060)
...
R=r
DELTA=22 (21 added, 0 deleted, 1 changed)
OCL=14049
CL=14049
2008-08-10 16:49:01 -07:00
Ken Thompson
258c817a1b
allow name-type or pointer-to-named-type as method name (bug046)
...
R=r
DELTA=17 (11 added, 3 deleted, 3 changed)
OCL=14048
CL=14048
2008-08-10 15:09:09 -07:00
Ken Thompson
b89c538473
fixed unary ^ opcode (bug082)
...
R=r
DELTA=11 (10 added, 1 deleted, 0 changed)
OCL=14047
CL=14047
2008-08-10 14:35:02 -07:00
Ken Thompson
091047f36c
adding and deleting files
...
R=r
DELTA=1685 (920 added, 765 deleted, 0 changed)
OCL=14030
CL=14030
2008-08-09 17:33:35 -07:00
Ken Thompson
272ae659db
mp fixed arith
...
R=r
DELTA=149 (80 added, 62 deleted, 7 changed)
OCL=14029
CL=14029
2008-08-09 17:29:26 -07:00
Ken Thompson
67c4cc473c
forgot a file
...
R=r
DELTA=427 (427 added, 0 deleted, 0 changed)
OCL=14017
CL=14017
2008-08-08 17:15:46 -07:00
Ken Thompson
9c2ade358d
mp constants
...
R=r
DELTA=381 (142 added, 26 deleted, 213 changed)
OCL=14011
CL=14016
2008-08-08 17:13:31 -07:00
Russ Cox
907f38acfc
Change generated acid to indent nested structures properly.
...
Before the change:
acid: M(m0)
g0 00008dd0
morearg 00000000
cret 00000000
curg 2aaaaaaab000
lastg 00000000
Gobuf sched {
SP ffffe5e0
PC 7fff00001ba1
}
...
acid:
After the change:
acid: M(m0)
g0 (G)00008dd0
morearg 00000000
cret 00000000
curg (G)2aaaaaaab000
lastg (G)00000000
Gobuf sched {
SP ffffe5e0
PC 00001ba1
}
...
acid:
R=ken
DELTA=27 (14 added, 2 deleted, 11 changed)
OCL=13802
CL=13998
2008-08-08 04:25:20 -07:00
Russ Cox
d28acc42ec
first cut at multithreading. works on Linux.
...
* kick off new os procs (machs) as needed
* add sys·sleep for testing
* add Lock, Rendez
* properly lock mal, sys·newproc, scheduler
* linux syscall arg #4 is in R10, not CX
* chans are not multithread-safe yet
* multithreading disabled by default;
set $gomaxprocs=2 (or 1000) to turn it on
This should build on OS X but may not.
Rob and I will fix soon after submitting.
TBR=r
OCL=13784
CL=13842
2008-08-04 16:43:49 -07:00
Ken Thompson
695f83a9e0
export external functions
...
R=r
DELTA=16 (10 added, 4 deleted, 2 changed)
OCL=13815
CL=13815
2008-08-04 13:18:59 -07:00
Russ Cox
7b3771401c
add nm
...
R=r
DELTA=339 (339 added, 0 deleted, 0 changed)
OCL=13786
CL=13794
2008-08-03 23:06:00 -07:00
Russ Cox
34514bdb72
Use a single Make.conf for setting CC, etc.
...
This makes it easy to build with other flags
(like -ggdb) or other compilers (like cc64).
R=r
DELTA=45 (6 added, 22 deleted, 17 changed)
OCL=13790
CL=13793
2008-08-03 23:03:31 -07:00
Ken Thompson
989676d2ba
add 'export' adjectives to external
...
var, const and type declarations.
R=r
DELTA=49 (12 added, 28 deleted, 9 changed)
OCL=13791
CL=13791
2008-08-03 18:47:02 -07:00
Russ Cox
9aad9fef76
make 6a, 6c, 6g, 6l, libmach_amd64 build on 64-bit gcc.
...
these guys really really want long to be 32-bits,
so ,s/long/int32/ (and then manual fixup).
still passes all tests.
(i started out looking for just those longs that
needed to be int32 instead, and it was just too hard
to track them down one by one.)
the longs were rare enough that i don't think
it will cause integration problems.
R=ken
OCL=13787
CL=13789
2008-08-03 17:25:15 -07:00
Ken Thompson
851100683e
6c delete .6 file on error
...
R=r
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=13785
CL=13785
2008-08-03 13:31:06 -07:00
Ken Thompson
7889e03477
go method
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=13765
CL=13765
2008-08-02 15:31:21 -07:00
Ken Thompson
b2d9020242
len now takes an expression
...
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=13523
CL=13523
2008-07-28 13:54:58 -07:00
Ken Thompson
b1abcc195d
random bug fixes
...
R=r
DELTA=18 (6 added, 1 deleted, 11 changed)
OCL=13504
CL=13504
2008-07-27 13:09:15 -07:00
Ken Thompson
bd397d2f9b
select
...
R=r
DELTA=29 (27 added, 1 deleted, 1 changed)
OCL=13503
CL=13503
2008-07-27 11:42:52 -07:00
Rob Pike
20a02661d9
beginnings of a low-level syscall library
...
R=ken
OCL=13483
CL=13496
2008-07-26 14:49:21 -07:00
Ken Thompson
120827284e
select/chan
...
R=r
DELTA=517 (137 added, 98 deleted, 282 changed)
OCL=13495
CL=13495
2008-07-26 14:21:21 -07:00
Ken Thompson
949ab5c7ff
select
...
R=r
APPROVED=r
DELTA=41 (24 added, 13 deleted, 4 changed)
OCL=13480
CL=13480
2008-07-25 17:03:27 -07:00
Ken Thompson
e963cba8a1
select
...
R=r
APPROVED=r
DELTA=147 (94 added, 14 deleted, 39 changed)
OCL=13477
CL=13477
2008-07-25 15:55:12 -07:00
Ken Thompson
ece3e57c85
read select
...
R=r
APPROVED=r
DELTA=120 (108 added, 0 deleted, 12 changed)
OCL=13468
CL=13468
2008-07-25 11:58:26 -07:00
Ken Thompson
cb9b1038db
select
...
R=r
APPROVED=r
DELTA=638 (433 added, 21 deleted, 184 changed)
OCL=13426
CL=13438
2008-07-24 15:57:30 -07:00
Rob Pike
35b7a174e6
maintain __.PKGDEF files in archives if the 'g' flag is given
...
use this facility to simplify the math lib-building script
R=ken
DELTA=183 (158 added, 16 deleted, 9 changed)
OCL=13364
CL=13366
2008-07-22 15:57:46 -07:00
Rob Pike
05caa7f820
help management of empty pkg and lib directories in perforce
...
R=gri
DELTA=4 (4 added, 0 deleted, 0 changed)
OCL=13328
CL=13328
2008-07-21 17:10:49 -07:00
Ken Thompson
b78676a49d
start of select
...
random bugs fixed
SVN=128149
2008-07-20 20:13:07 -07:00
Ken Thompson
963753d3f9
tweaks to init
...
rand using init
SVN=128142
2008-07-20 13:33:45 -07:00
Ken Thompson
f24f8ffae0
init
...
SVN=128128
2008-07-19 18:39:12 -07:00
Rob Pike
acf3d59847
update fmt to use some initialization
...
tweak ar so the pkgdef file doesn't cause it not to generate a symbol table
SVN=128119
2008-07-19 14:52:01 -07:00
Ken Thompson
90da636c15
init filename vs pkgname
...
SVN=128117
2008-07-19 14:20:46 -07:00
Ken Thompson
fb3af53f4e
initialization
...
SVN=128115
2008-07-19 13:38:29 -07:00
Ken Thompson
4c5a165873
len(fixed array)
...
SVN=128050
2008-07-18 11:59:35 -07:00
Ken Thompson
0ca551fc36
loop in subtype
...
SVN=127933
2008-07-17 18:15:05 -07:00
Ken Thompson
41861ca7bb
one more time for divide
...
SVN=127911
2008-07-17 16:22:40 -07:00
Ken Thompson
9e2d185040
div bug
...
[]ptr bug
proc reuses old g* structures
differnt assignment of offsets to parameters
SVN=127888
2008-07-17 15:03:39 -07:00
Ken Thompson
814320c8b4
parameter in fn literals
...
SVN=127695
2008-07-16 18:31:01 -07:00
Ken Thompson
8003849498
parameter declartions in func literals
...
SVN=127678
2008-07-16 17:22:54 -07:00
Ken Thompson
44b8934d35
back out last chan fix
...
allow print of pointers
SVN=127548
2008-07-16 12:44:21 -07:00
Ken Thompson
ac048ce7f4
new chan syntax
...
SVN=127437
2008-07-15 21:07:59 -07:00
Rob Pike
c870ac239e
add sys.writefile; support for darwin only in this CL
...
SVN=127153
2008-07-14 20:54:55 -07:00
Rob Pike
e9a194382e
disambiguate error message
...
SVN=127152
2008-07-14 20:54:16 -07:00
Ken Thompson
c6e8e1cebf
go call fn address
...
SVN=127151
2008-07-14 20:40:48 -07:00
Ken Thompson
2d9ff40774
chan asynch
...
SVN=127121
2008-07-14 17:41:38 -07:00
Ken Thompson
f7e2bb55ae
chan
...
SVN=126960
2008-07-13 16:22:50 -07:00
Ken Thompson
97cab903af
chan
...
SVN=126959
2008-07-13 16:20:27 -07:00
Ken Thompson
594175d0b5
chan
...
SVN=126958
2008-07-13 14:29:46 -07:00
Ken Thompson
3f982aeaf6
morestack magic number
...
automatically generated in 6g and 6c,
manually set in 6a. format is
TEXT a(SB),, $a-b
where a is auto size and b is parameter size
SVN=126946
2008-07-12 17:16:22 -07:00
Ken Thompson
3856e45e03
more on channels
...
arg space magic number for morestack
SVN=126936
2008-07-12 13:08:53 -07:00
Ken Thompson
751ce3a77a
segmented stacks AND goroutines
...
SVN=126929
2008-07-11 19:16:39 -07:00
Ken Thompson
2d7eecbbf4
bug in offsets in imported struct fields
...
SVN=126591
2008-07-09 17:15:10 -07:00
Rob Pike
d5f4d94b80
redefinition fix for autolib: if first ATEXT is already defined, skip this file
...
SVN=126580
2008-07-09 16:40:11 -07:00
Rob Pike
12c81a0ce8
enable autolib
...
handle archives with __.PKGDEF elements (although we can't create them yet)
introduce a pkg directory
search the pkg directory for packages during compilation
SVN=126574
2008-07-09 16:05:03 -07:00
Rob Pike
41b9617be4
fix ldexp, frexp, and make math package compile and test correctly
...
SVN=126423
2008-07-08 17:26:10 -07:00
Ken Thompson
4528854308
unique import/export names
...
more on go statement
SVN=126421
2008-07-08 17:19:17 -07:00
Rob Pike
655c281303
disambiguate typedefs in export blocks of .6 files
...
SVN=126366
2008-07-08 14:20:04 -07:00
Rob Pike
6db99de606
add bytestorune and stringtorune to sys.
...
SVN=126321
2008-07-08 10:36:43 -07:00
Ken Thompson
1d31a25d83
more coroutine
...
fixed a,b,c := x,x,x
SVN=126250
2008-07-07 17:59:32 -07:00
Ken Thompson
0d079a5362
start of coroutine
...
SVN=126152
2008-07-07 12:29:26 -07:00
Ken Thompson
caa7193c95
took out vlong/uvlong/rune conversions
...
SVN=126053
2008-07-06 11:20:44 -07:00