Commit Graph

2698 Commits

Author SHA1 Message Date
Robert Griesemer
5945b25158 - adjust to new token.Position definition
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31574
CL=31604
2009-07-14 10:45:57 -07:00
Robert Griesemer
2d58fa6f18 - use new scanner error handling code
R=rsc
DELTA=109  (0 added, 87 deleted, 22 changed)
OCL=31573
CL=31603
2009-07-14 10:45:43 -07:00
Robert Griesemer
a010d45caa - adjust to new scanner interface (pass filename to Init)
- delete error handling code which is not needed anymore

R=rsc
DELTA=83  (0 added, 65 deleted, 18 changed)
OCL=31572
CL=31602
2009-07-14 10:45:22 -07:00
Robert Griesemer
14228f3898 - added Filename field to token.Position
- handle //line filename:line comments in scanner
- moved error handling code used by various scanner clients
  to errors.go
- added extra tests

R=rsc
DELTA=385  (343 added, 18 deleted, 24 changed)
OCL=31551
CL=31601
2009-07-14 10:44:57 -07:00
Russ Cox
10e995fba8 dead code
R=r
DELTA=20  (0 added, 20 deleted, 0 changed)
OCL=31584
CL=31598
2009-07-14 09:28:42 -07:00
Russ Cox
be16caf872 step toward no function prototypes.
delay evaluation of most types (all but func)
from parse time to type check time.

R=ken
OCL=31585
CL=31585
2009-07-13 23:38:39 -07:00
Russ Cox
a6799963ef update 6g to new REGARG convention.
silence gcc warning.

R=ken
OCL=31583
CL=31583
2009-07-13 23:30:30 -07:00
Russ Cox
e11447f7da bug148.
R=ken
OCL=31582
CL=31582
2009-07-13 23:29:44 -07:00
Kai Backman
60d223a418 added missing pieces required by reflection
R=rsc
APPROVED=rsc
DELTA=61  (40 added, 18 deleted, 3 changed)
OCL=31502
CL=31580
2009-07-13 22:06:28 -07:00
Kai Backman
0e2cce70cb tiny naming cleanup
R=rsc
APPROVED=rsc
DELTA=17  (0 added, 0 deleted, 17 changed)
OCL=31503
CL=31579
2009-07-13 22:04:24 -07:00
Kai Backman
7258bac6e8 fix bug in codegen when we modified move instruction instead
of text.

R=rsc
APPROVED=rsc
DELTA=3  (1 added, 2 deleted, 0 changed)
OCL=31575
CL=31575
2009-07-13 20:33:59 -07:00
Austin Clements
ffb4b0d7b7 Avoid clash between os.WRUSAGE and Linux's WALL flag.
R=rsc
APPROVED=rsc
DELTA=5  (4 added, 0 deleted, 1 changed)
OCL=31564
CL=31567
2009-07-13 19:28:00 -07:00
Russ Cox
9e2f2fcd2e compilers were inconsistent about
whether no register argument was
REGARG == 0 or REGARG < 0.
use REGARG < 0 because arm needs 0 for R0.

R=ken
OCL=31562
CL=31566
2009-07-13 19:20:43 -07:00
Austin Clements
da1da8d07e Add accessor for SIGTRAP cause in wait status
R=rsc
APPROVED=rsc
DELTA=7  (7 added, 0 deleted, 0 changed)
OCL=31563
CL=31565
2009-07-13 19:20:38 -07:00
Russ Cox
218c393029 add LockOSThread and UnlockOSThread to
runtime package for use by debugger,
which needs to make sure that all ptrace calls
about a given pid come from the same thread.

R=r
DELTA=175  (90 added, 63 deleted, 22 changed)
OCL=31546
CL=31558
2009-07-13 17:28:39 -07:00
Rob Pike
9126b75e35 rpc.
client library.
muxes on both ends.

R=rsc
DELTA=178  (132 added, 26 deleted, 20 changed)
OCL=31541
CL=31556
2009-07-13 16:52:57 -07:00
Russ Cox
29e93590b0 fix undefined function error.
before:
	mainstart: undefined: main·init in mainstart
	mainstart: branch out of range in mainstart
	(95)    CALL    ,0(PC) [main·init]
	mainstart: undefined: main·main in mainstart
	mainstart: branch out of range in mainstart
	(97)    CALL    ,0(PC) [main·main]
	mainstart: doasm: notfound from=6f to=6f (95)    CALL    ,
	mainstart: doasm: notfound from=6f to=6f (97)    CALL    ,
	mainstart: doasm: notfound from=6f to=6f (95)    CALL    ,
	mainstart: doasm: notfound from=6f to=6f (97)    CALL    ,
	mainstart: doasm: notfound from=6f to=6f (95)    CALL    ,
	mainstart: doasm: notfound from=6f to=6f (97)    CALL    ,

after:
	mainstart: undefined: main·init in mainstart
	mainstart: undefined: main·main in mainstart

R=r
DELTA=7  (1 added, 0 deleted, 6 changed)
OCL=31555
CL=31555
2009-07-13 16:48:09 -07:00
Russ Cox
8afc6008a8 add note about once and closures
R=r
DELTA=13  (13 added, 0 deleted, 0 changed)
OCL=31535
CL=31549
2009-07-13 15:54:41 -07:00
Robert Griesemer
32cd887574 - handle type forward declarations correctly
R=r
DELTA=8  (6 added, 0 deleted, 2 changed)
OCL=31537
CL=31537
2009-07-13 13:55:39 -07:00
Rob Pike
efb918b7db the beginnings of an rpc service.
server side only; no client help yet (but it's easy).
no http yet.
service is synchronous.
all this will improve.

R=rsc
DELTA=403  (403 added, 0 deleted, 0 changed)
OCL=31522
CL=31536
2009-07-13 12:58:14 -07:00
Rob Pike
b2a66adc59 the name of the type was being sent twice. drop the outer instance.
R=rsc
DELTA=10  (5 added, 1 deleted, 4 changed)
OCL=31523
CL=31526
2009-07-13 11:41:02 -07:00
Robert Griesemer
7b7b83ba1b ebnflint command
- basic verification of EBNF grammars
- tested with (and has testcase for) go_spec.html

R=rsc
DELTA=150  (148 added, 0 deleted, 2 changed)
OCL=31481
CL=31517
2009-07-13 10:26:58 -07:00
Robert Griesemer
ef4347f19e Basic EBNF package:
- parsing of EBNF grammars
- basic consistency checks

R=rsc
DELTA=695  (695 added, 0 deleted, 0 changed)
OCL=31479
CL=31516
2009-07-13 10:10:56 -07:00
Kai Backman
092d6290d0 fixed typo where output arguments where pushed on to R0
instead of SP.

R=rsc
APPROVED=rsc
DELTA=13  (3 added, 7 deleted, 3 changed)
OCL=31488
CL=31501
2009-07-12 22:12:33 -07:00
Kai Backman
7842b03f70 Fixed minor typo in asm file.
R=rsc
APPROVED=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31487
CL=31500
2009-07-12 22:12:19 -07:00
Rob Pike
62011cfcdf first cut at gob decoder.
R=rsc
DELTA=184  (181 added, 1 deleted, 2 changed)
OCL=31474
CL=31486
2009-07-11 15:45:54 -07:00
Robert Griesemer
7c06f285d0 capital_letter was never used
R=rsc
DELTA=2  (0 added, 1 deleted, 1 changed)
OCL=31472
CL=31477
2009-07-10 18:21:07 -07:00
Russ Cox
92e925778e reflection for interface set
rename map access methods to Elem, SetElem.

R=r
DELTA=95  (66 added, 7 deleted, 22 changed)
OCL=31456
CL=31469
2009-07-10 16:32:26 -07:00
Russ Cox
0dadc4fe4f cleanup in preparation for new scoping.
walkstate -> walkstmt
walktype -> walkexpr; stmts moved to walkstmt

walktype and friends have a final Node **init
argument that can have side effects appended,
making it more explicit when they do and do not happen.
this replaces the old global addtop and addtotop.

delete switch map and interface conversion cases
(dropped from the language months ago).

R=ken
OCL=31465
CL=31468
2009-07-10 16:29:26 -07:00
Ken Thompson
ed124a971e segfault
R=rsc
OCL=31467
CL=31467
2009-07-10 16:12:21 -07:00
Robert Griesemer
f7ac313629 - mark actual EBNF with pre-formatted class "ebnf" instead of "grammar"
- make real productions for Unicode char classes so that they can be parsed
- use `` for tokens that contain "'s or \'s so that they can be parsed
- added a missing '.'

This version of the spec passes through ebnflint (forthcoming) without errors.

R=r,rsc
DELTA=74  (3 added, 1 deleted, 70 changed)
OCL=31464
CL=31466
2009-07-10 16:06:40 -07:00
Rob Pike
8a9e395f5f one more piece of testing: 2nd send should not send type info.
R=rsc
DELTA=25  (25 added, 0 deleted, 0 changed)
OCL=31460
CL=31460
2009-07-10 13:50:44 -07:00
Rob Pike
f0a9840d04 a better encoder test, with a couple of fixes for bugs it uncovered.
R=rsc
DELTA=84  (65 added, 9 deleted, 10 changed)
OCL=31458
CL=31458
2009-07-10 13:44:37 -07:00
Rob Pike
1880b90aff DeepEqual for maps
R=rsc
DELTA=47  (30 added, 16 deleted, 1 changed)
OCL=31455
CL=31455
2009-07-10 11:20:10 -07:00
Robert Griesemer
981f4b43ac mention file name only once in error message
R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=31450
CL=31452
2009-07-10 10:01:08 -07:00
Robert Griesemer
a47404bc1c fix error messages
R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=31449
CL=31451
2009-07-10 10:00:25 -07:00
Austin Clements
9de5df89c3 Give ptrace code a real home.
R=rsc
APPROVED=rsc
DELTA=422  (211 added, 211 deleted, 0 changed)
OCL=31425
CL=31431
2009-07-09 17:35:32 -07:00
Rob Pike
3928a4e11b printing maps
R=rsc
DELTA=57  (39 added, 3 deleted, 15 changed)
OCL=31424
CL=31430
2009-07-09 17:30:07 -07:00
Russ Cox
12ebbe7463 reflection for methods
R=r
DELTA=156  (135 added, 8 deleted, 13 changed)
OCL=31407
CL=31428
2009-07-09 17:27:49 -07:00
Austin Clements
76fef1deec Process tracing interface.
This is meant to be implemented per platform and used by
higher-level debugging libraries.

R=rsc
APPROVED=rsc
DELTA=211  (211 added, 0 deleted, 0 changed)
OCL=31003
CL=31423
2009-07-09 17:10:12 -07:00
Robert Griesemer
f7b92bb45d fix to scanner_test after change to //-style comment token
R=rsc
OCL=31421
CL=31421
2009-07-09 16:54:08 -07:00
Russ Cox
ee5fe7756f no longer necessary; directory not empty anymore
R=r
DELTA=2  (0 added, 2 deleted, 0 changed)
OCL=31417
CL=31420
2009-07-09 16:44:20 -07:00
Russ Cox
ec9b0428f8 various spec tunings
R=gri
DELTA=6  (0 added, 1 deleted, 5 changed)
OCL=31415
CL=31419
2009-07-09 16:44:13 -07:00
Robert Griesemer
38e7fddc21 Show BUG comments in godoc:
ast.go:
- rename Comments -> CommentGroup (less confusion)
- change all comments/docs to be *CommentGroup

filter.go:
- do not remove unassociated comments from program as part
  of export filtering (they are needed by doc.go for BUG comments)

scanner.go:
- exclude '\n' from //-style comments

parser.go:
- rewrote collection of comments: now all collected comments
  are *ast.CommentGroups
- clarified distinction between leading and trailing comments
- fixed a bug in comment collection (parseGenDecl);
  corresponding test case is in printer/testdata
- extra documentation

doc.go:
- collect BUG comments
- corresponding fix for parser bug in comment collection

comment.go:
- simplified regex

printer.go:
- adjust comment printing to new representation

printer_test.go, testdata/*:
- enable printing of doc comments
- extended tests

package.html, package.txt:
- added Bugs section

gofmt:
- enable printing of doc comments

R=rsc
DELTA=339  (126 added, 38 deleted, 175 changed)
OCL=31403
CL=31416
2009-07-09 16:38:17 -07:00
Rob Pike
ec23467e65 store ids rather than Types in the structs so they can be encoded.
change Type to gobType.
fix some bugs around recursive structures.
lots of cleanup.
add the first cut at a type encoder.

R=rsc
DELTA=400  (287 added, 11 deleted, 102 changed)
OCL=31401
CL=31406
2009-07-09 14:33:43 -07:00
Russ Cox
7472f4c951 bug168 (dsymonds) + fix
R=ken
OCL=31399
CL=31399
2009-07-09 12:08:50 -07:00
Ken Thompson
5ff7d84892 segment fault
R=rsc
OCL=31396
CL=31396
2009-07-09 11:41:06 -07:00
David Symonds
600d7828a7 archive/tar cleanups:
- rename untar{,_test}.go to reader{,_test}.go.
  - fix up some comments.
  - improve test output if it fails.

R=rsc
APPROVED=rsc
DELTA=821  (400 added, 392 deleted, 29 changed)
OCL=31376
CL=31378
2009-07-08 18:31:14 -07:00
Russ Cox
bba278a43b reflection for functions
add channel send type check (thanks austin).
fix type mismatch message.

R=r
DELTA=241  (225 added, 5 deleted, 11 changed)
OCL=31370
CL=31375
2009-07-08 18:16:09 -07:00
Ken Thompson
a68b1da3cc another nil reference
R=rsc
OCL=31373
CL=31373
2009-07-08 17:58:15 -07:00