summaryrefslogtreecommitdiff
path: root/usr/austin/eval/func.go
AgeCommit message (Collapse)AuthorFilesLines
2009-10-14move austin/eval and austin/ogle to exp/eval and exp/ogleRuss Cox1-89/+0
R=r OCL=35736 CL=35746
2009-09-02move abortChan into Thread.Russ Cox1-5/+10
reuse Thread in function calls. R=austin DELTA=59 (8 added, 7 deleted, 44 changed) OCL=34266 CL=34266
2009-09-02s/vm/Thread/Russ Cox1-8/+7
change eval functions from taking *Frame to *Thread R=austin DELTA=500 (7 added, 4 deleted, 489 changed) OCL=34256 CL=34260
2009-08-12Convert interpreter to whole-package compilation.Austin Clements1-5/+0
R=rsc APPROVED=rsc DELTA=334 (110 added, 211 deleted, 13 changed) OCL=33135 CL=33137
2009-07-29Flatten the Frame tree. Now each function call produces aAustin Clements1-10/+6
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
2009-07-28Implement if, for (modulo ranges), break, continue, increment,Austin Clements1-0/+4
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
2009-07-27Fix bug where nothing could ever be added to a code buffer.Austin Clements1-2/+2
R=rsc APPROVED=rsc DELTA=2 (0 added, 0 deleted, 2 changed) OCL=32245 CL=32247
2009-07-27Implement single-valued, non-variadic function literals andAustin Clements1-0/+90
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