types were supposed to be identical but only needed to be
compatible. This gets rid of the Type.literal method. I
renamed the Type.rep method to Type.lit because I believe it
corresponds to the term "literal" as used in the spec.
R=rsc
APPROVED=rsc
DELTA=228 (57 added, 35 deleted, 136 changed)
OCL=32606
CL=32608
the position where they were defined so I can produce good
error messages on redefinitions.
R=rsc
APPROVED=rsc
DELTA=204 (126 added, 13 deleted, 65 changed)
OCL=32599
CL=32605
- more orthogonal functionality of filter functions for better re-use
go/doc/doc.go:
- simplified interface
- collect filenames of packages so that they can be shown
godoc:
- removed TODO, show list of package (linked) files used to create documentation
R=rsc
DELTA=130 (68 added, 24 deleted, 38 changed)
OCL=32549
CL=32552
let errchk exit 0 even if it has reported a BUG.
it echoed BUG and that's all that matters.
R=r
DELTA=143 (1 added, 89 deleted, 53 changed)
OCL=32533
CL=32542
Return checking is now done as a general flow check at the end
of function compilation, since break and goto complicated the
way I was doing return checking before. Goto-over-declaration
checking is also done as a final flow check.
Temporary variables used for effect extraction are now
actually temporary. Otherwise "op=", "++", and "--" appear as
declarations that cannot be jumped over.
R=rsc
APPROVED=rsc
DELTA=421 (344 added, 38 deleted, 39 changed)
OCL=32527
CL=32535
- Changed filter function for parser.ParsePackage to
take an *os.Dir instead of a filename for more
powerful filters
- Removed TODO in ast.PackageInterface: Now collect
package comments from all package files
- Cleanups in godoc: Use the new ParsePackage and
PackageInterface functions; as a result computing
package information is much simpler now.
R=rsc
DELTA=285 (80 added, 110 deleted, 95 changed)
OCL=32473
CL=32486
4 known bugs; 0 unexpected bugs
which should be less scary to people
unfamiliar with the tests.
R=r
DELTA=44 (29 added, 12 deleted, 3 changed)
OCL=32460
CL=32464
single frame and non-overlapping variables reuse frame slots.
As a result, entering and exiting blocks no longer requires
code execution, which means jumps across block boundaries
should be doable now. Frame slot initialization happens at
definition time now, instead of at frame creation time. As an
added bonus, Scope's are now exclusively compile-time objects
and we no longer need to specially track the function
activation frame for access to out vars.
R=rsc
APPROVED=rsc
DELTA=313 (102 added, 90 deleted, 121 changed)
OCL=32416
CL=32420
so that == on func means that the
functions originated in the same
execution of a func literal or definition.
before, there was an inconsistency:
func() {x++} != func() {x++}
but
func() {} == func() {}
this CL makes the second case != too,
just like
make(map[int]int) != make(map[int]int)
R=r
DELTA=202 (71 added, 62 deleted, 69 changed)
OCL=32393
CL=32398
easier and faster to read. they are now either a one-byte value or a n-byte value
preceded by a byte holding -n.
R=rsc
DELTA=150 (45 added, 7 deleted, 98 changed)
OCL=32381
CL=32387
gofmt formatted source code looks pretty good already;
with a bit more fine-tuning it should be great.
printer.go:
- Implemented comment intersperse algorithm.
The approach is a result of many trial-and-error
experiments but at this point reasonably simple
and open to arbitrary fine-tuning.
parser.go:
- Simplified handling of lead and line comments
(formerly called leading and trailing comments).
- Use a comments list instead of an array (I may
change this back - this is not obviously better
and uses more space).
doc.go:
- Remove comments from AST nodes that have been
'consumed' in the documentation to avoid duplicate
printing of them. Allows for better control of
what is printed w/o use of printing control flags
(which are hard to use and not fine-grained enough).
Corresponding adjustments to various clients of these
files.
R=rsc
DELTA=478 (275 added, 108 deleted, 95 changed)
OCL=32185
CL=32380
- Provides analogous functionality to a doubly-linked list
implementation.
- Completely symmetric set of operations.
- Operations on the ADT do not lead to results that are
outside the domain of the ADT (closed interface).
- Alternative to container/list.
R=rsc
DELTA=489 (489 added, 0 deleted, 0 changed)
OCL=32284
CL=32323