summaryrefslogtreecommitdiff
path: root/usr/austin/eval
AgeCommit message (Collapse)AuthorFilesLines
2009-07-17Cleanup func literals. "func (" -> "func("Austin Clements1-39/+39
R=rsc APPROVED=rsc DELTA=41 (0 added, 0 deleted, 41 changed) OCL=31773 CL=31773
2009-07-17Implement all unary and binary arithmetic operators.Austin Clements3-186/+514
R=rsc APPROVED=rsc DELTA=689 (497 added, 169 deleted, 23 changed) OCL=31755 CL=31772
2009-07-15Make Value always represent an l-value and never a genericAustin Clements5-148/+313
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
2009-07-15Beginnings of a Go interpreter. This implements basic andAustin Clements6-0/+1775
pointer types, supports literals, identifiers, type-checking most unary and binary operators, "compiling" a few unary and binary operators, and assignment and declaration statements. R=rsc APPROVED=rsc DELTA=1751 (1751 added, 0 deleted, 0 changed) OCL=31309 CL=31691