Rob Pike
7293dab5a9
fix two print statements
...
R=gri
OCL=14105
CL=14105
2008-08-11 21:37:46 -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
Robert Griesemer
683ded80c9
- changed go-in-go parser to require ()'s for panic and print
...
- adjusted much of the existing go code
- missing: tests
R=r
DELTA=229 (1 added, 17 deleted, 211 changed)
OCL=14103
CL=14103
2008-08-11 21:20:42 -07:00
Robert Griesemer
58ba20b5a2
- allow reserved words as field and method names
...
R=r
OCL=14102
CL=14102
2008-08-11 20:40:37 -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
Robert Griesemer
40c93a5238
- experiments with forward-declaring types of non-imported packages
...
- adjusted switch syntax (no repeated case: case: anymore)
- enabled some constant expressions that work now
R=r
OCL=14098
CL=14098
2008-08-11 18:44:41 -07:00
Robert Griesemer
fe582137f4
- removed fall-through for case: case: in switch statements
...
- added ()'s to all print calls in examples
- augmented rule about use of identifiers
R=r
DELTA=11 (0 added, 1 deleted, 10 changed)
OCL=14097
CL=14097
2008-08-11 18:09:31 -07:00
Rob Pike
968701beb1
- fix signedness bug in sys.Inf()
...
- add NaN, Inf printing to fmt
- fix a couple of bugs in fmt
- add a test for fmt
R=ken
OCL=14092
CL=14092
2008-08-11 15:04:54 -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
Rob Pike
2738f42d18
add test for maps.
...
R=gri
OCL=14090
CL=14090
2008-08-11 13:32:13 -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
Rob Pike
cbaca0be24
code in bug was wrong; correct and improve. works now.
...
R=gri
OCL=14088
CL=14088
2008-08-11 13:08:16 -07:00
Robert Griesemer
1e0b17b24c
- added test case for compiler bug re: exported
...
variables of function pointer type
R=r
OCL=14086
CL=14086
2008-08-11 11:40:19 -07:00
Rob Pike
1f41ed375b
update tests.
...
fixedbugs/bug012.go is broken again but i left it where it is, with
the golden file not reflecting the breakage so it will be noticed
R=ken,gri
OCL=14073
CL=14073
2008-08-11 10:10:48 -07:00
Robert Griesemer
c7fb27f6e4
- more steps towards automatic recursive compilation of dependencies
...
- make forward declarations of types match 6g
- better factoring
R=r
OCL=14059
CL=14059
2008-08-11 09:45:40 -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
Rob Pike
baf0747dd3
fix minor bug uncovered by new constant evaluator
...
R=gri
OCL=14025
CL=14025
2008-08-09 14:50:29 -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
Robert Griesemer
7924b3862d
- removed misleading comment in bug041.go
...
- removed bug042.go - not a bug according to updated spec
R=r
DELTA=43 (5 added, 36 deleted, 2 changed)
OCL=14008
CL=14010
2008-08-08 16:12:34 -07:00
Rob Pike
3963fe3b32
fix a couple of tests that had shell errors
...
clean up the golden file a bit to have less meaningless content and be more robust to spurious diffs.
now there is output only for tests that produce output or failure.
R=gri
OCL=14005
CL=14005
2008-08-08 10:57:23 -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
Robert Griesemer
bc13a1a374
first primitive cut at resolving missing imports automatically:
...
if an import file is missing, the corresponding source
is compiled automatically, if found
R=r
OCL=13990
CL=13990
2008-08-07 19:32:22 -07:00
Robert Griesemer
4addd94687
bug: cannot take len() of a constant string
...
R=r
OCL=13989
CL=13989
2008-08-07 17:56:12 -07:00
Rob Pike
fa7d54ff2e
include syscall in default build
...
fix an issue with autolib names by compiling to target location
print a bit more when compiling
R=gri
OCL=13988
CL=13988
2008-08-07 17:36:50 -07:00
Robert Griesemer
e3fc124640
revert specification of pointer types to current implementation
...
(do not allow explicit type forward declarations) and more clearly
specify resolution
R=r
DELTA=30 (9 added, 7 deleted, 14 changed)
OCL=13967
CL=13987
2008-08-07 17:15:10 -07:00
Rob Pike
69353f0a50
fix erroneous code in bugs; reported by iant.
...
also rob1.go runs, so fix its status.
R=gri,iant
OCL=13957
CL=13957
2008-08-07 13:27:58 -07:00
Robert Griesemer
882ac63885
- implement scanner token stream via channel
...
- change test_scanner to scan using both methods
- add -pscan flag to Go front-end to choose between conventional
synchronous or parallel asynchronous scanning
R=r
OCL=13937
CL=13937
2008-08-06 18:57:37 -07:00
Robert Griesemer
333b70bee0
snapshot of today's changes - more semantic tests
...
R=r
OCL=13932
CL=13932
2008-08-06 17:26:46 -07:00
Robert Griesemer
20c5bcfdbb
returning from a function that specified a result should cause a run-time
...
failure if no return is actually executed
R=r
OCL=13915
CL=13915
2008-08-06 10:02:18 -07:00
Robert Griesemer
687f387c0b
- added more semantic checks - more to come
...
- distinguish float/int literals syntactically
- fixed a tracing bug
R=r
OCL=13906
CL=13906
2008-08-05 18:52:37 -07:00
Robert Griesemer
044a3b1a5e
bug: package name not visible
...
R=r
OCL=13898
CL=13898
2008-08-05 16:09:49 -07:00
Robert Griesemer
28547615ce
- fixed another export bug
...
- more self-verification code
R=r
OCL=13894
CL=13894
2008-08-05 15:20:58 -07:00
Russ Cox
f7f6329e26
kill trailing white space.
...
(apparently my first attempt didn't work.)
R=r
OCL=13888
CL=13888
2008-08-05 14:21:42 -07:00
Russ Cox
96824000ed
* comment, clean up scheduler
...
* rewrite lock implementation to be correct
(tip: never assume that an algorithm you found
in a linux man page is correct.)
* delete unneeded void* arg from clone fn
* replace Rendez with Note
* comment mal better
* use 6c -w, fix warnings
* mark all assembly functions 7
R=r
DELTA=828 (338 added, 221 deleted, 269 changed)
OCL=13884
CL=13886
2008-08-05 14:18:47 -07:00
Rob Pike
5adbacb8e7
allow pointers as keys in maps, treating them the same as ints - ptr eq not value equality
...
R=ken,gri
OCL=13879
CL=13879
2008-08-05 11:14:35 -07:00
Rob Pike
033682deec
workaround for compiler bug: len(a) is zero
...
TBR=iant
OCL=13873
CL=13873
2008-08-05 08:20:34 -07:00
Russ Cox
4a0765b2c9
fix go build
...
these files were missing from the acid change
(include/mach_amd64.h in particular)
R=r
OCL=13858
CL=13858
2008-08-04 17:26:24 -07:00
Russ Cox
c8dee2770d
acid. works only on Linux for now
...
R=r
DELTA=7031 (6906 added, 113 deleted, 12 changed)
OCL=13847
CL=13852
2008-08-04 17:24:25 -07:00
Robert Griesemer
2f4352a26d
- switched most of existing Go code to new export syntax
...
- adjusted lang doc
R=r
DELTA=192 (26 added, 65 deleted, 101 changed)
OCL=13844
CL=13848
2008-08-04 17:17:59 -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
Rob Pike
f439299035
fix bug - need to read final message in daisy chain to avoid hang
...
R=rsc
OCL=13840
CL=13840
2008-08-04 16:29:22 -07:00
Robert Griesemer
7a799be49a
- switch to new export syntax
...
- deprecate old syntax in this front-end (use -6g for compatibility)
R=r
OCL=13831
CL=13833
2008-08-04 15:37:47 -07:00
Rob Pike
4f6ba4c8a5
use new export syntax to avoid repetition
...
R=gri
OCL=13819
CL=13819
2008-08-04 14:23:51 -07:00
Robert Griesemer
997a94294f
- import/export cleanup: added comments, removed dead code, re-org structure
...
R=r
OCL=13816
CL=13816
2008-08-04 13:27:05 -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