as go is concerned). the -d flag is now flipped; as on the mac, -d disables dynamic.
much remains to be improved to move the output closer to the gcc format.
R=rsc
DELTA=366 (310 added, 30 deleted, 26 changed)
OCL=31929
CL=31951
all type-specific value functions, and use ZeroVal to create
new frames. Remove Value.Type; it was unused and difficult
for values with composite types. Add Value.Assign methods.
R=rsc
APPROVED=rsc
DELTA=282 (135 added, 90 deleted, 57 changed)
OCL=31894
CL=31930
Some cleanup. Elem() on PtrType is now just Elem and matches
with ArrayType. Generators now switch over the result type
instead of the operand type. Delete unused diag function.
R=rsc
APPROVED=rsc
DELTA=281 (219 added, 18 deleted, 44 changed)
OCL=31876
CL=31891
them as we go.
Lots of bug fixes. Let the parser toss illegal character and
string literals. Compile unary + correctly. Allow float OP
ideal. Compile unary * correctly. Implement min and max float
values.
R=rsc
APPROVED=rsc
DELTA=64 (29 added, 7 deleted, 28 changed)
OCL=31811
CL=31814
literals and when the parser hits an unexpected EOF. Also,
disallow newlines in character literals.
R=gri
APPROVED=gri
DELTA=23 (15 added, 1 deleted, 7 changed)
OCL=31790
CL=31797
introduce NodeList* type in compiler to replace OLIST.
this clarifies where lists can and cannot occur.
list append and concatenation are now cheap.
the _r rules are gone from yacc.
rev and unrev are gone.
no more lists of lists.
the representation of assignments is a bit clunkier.
split into OAS (1=1) and OAS2 (2 or more on one side).
delete dead chanrecv3 code.
delay construction of func types.
R=ken
OCL=31745
CL=31762
- renamed Program -> SourceFile
- added Package node representing the AST for an entire package
- added filter function to create a source file mimicking the
interface of an entire package
parser:
- parser entry to parse entire packages
- unified naming of parser entry points
- factored out entry points into new file (interface.go)
gofmt:
- extended to accept single .go files, and package paths:
gofmt file.go // formatting of a single file
gofmt -x file.go // interface of a single file
gofmt -x ./MyPackage // interface of a local package
gofmt -x math // interface of a $GOROOT relative package
Various adjustments in dependent files, documentation.
R=rsc
DELTA=634 (369 added, 153 deleted, 112 changed)
OCL=31743
CL=31748
considered running, so WaitStop doesn't lock up and
breakpoints get installed and uninstalled. We also don't try
to detach from them, since that will fail.
R=rsc
APPROVED=rsc
DELTA=35 (26 added, 2 deleted, 7 changed)
OCL=31683
CL=31731
container for values.
Instead of having one evaluator function that returns a
generic Value, there is now an evaluator function for each
generalized type that simply returns a native type.
The compiler is more type-safe now because there are almost no
type conversions at evaluation time and it's impossible to
invoke a nil evaluator function during evaluation. This also
makes ideals and pointers really clean.
As an added bonus, expression evaluation should be faster
because it doesn't require heap allocation for every
intermediate value, type switches, or lots of conversions to
and from Value. It also involves fewer function calls.
R=rsc
APPROVED=rsc
DELTA=431 (280 added, 115 deleted, 36 changed)
OCL=31705
CL=31709