function calling. Implement a type compiler and named types.
Implement a universal scope containing built-in named types,
and some built-in constants. Implement a simple virtual
machine for executing statements and single-valued return.
Fix many places that incorrectly dealt with named types. In
particular, the Type.Zero methods now use the type's bit count
to determine the appropriate value representation. As a
result, a bit count of 0 now means architecture-dependent and
bounded types use unsafe.Sizeof to determine the correct
bounds. Previously, the bounds on a 32-bit machine would have
been wrong.
Eliminated Type.compatible, since the implementation is
equivalent for all types. Added Type.rep that shallowly
strips named types. Replaced almost all uses of Type.literal
with Type.rep.
Fix implementation of assign-op's so it only evaluates the
left side once. As part of this, there is now a generic way
to separate out the effect and value of an expression.
R=rsc
APPROVED=rsc
DELTA=1530 (1244 added, 68 deleted, 218 changed)
OCL=32184
CL=32230
so that golden.out does not include
the name of the compiler (which is
arch-specific and shows up in diffs).
R=r,iant
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=31980
CL=31983
if there is a goroutine waiting to run
and the init goroutine enters a system call,
entersyscall was trying to kick off a new
scheduler for the other goroutine, causing
a panic (new goroutines can't run until main.main).
R=r
DELTA=32 (32 added, 0 deleted, 0 changed)
OCL=31982
CL=31982
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