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
and decrement. blockCompilers now form a tree the mimics the
nesting of scopes and provide convenient ways to enter and
exit scopes. blockCompilers also track the break and continue
PC for the current block. The statement testing interface now
works in lists of statements, which simplifies a bunch of
things.
R=rsc
APPROVED=rsc
DELTA=401 (335 added, 44 deleted, 22 changed)
OCL=32308
CL=32317
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