1
0
mirror of https://github.com/golang/go synced 2024-11-26 23:01:23 -07:00
go/usr/austin/eval
Austin Clements 816e3da26d Make Value always represent an l-value and never a generic
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-15 17:56:17 -07:00
..
decls.go Make Value always represent an l-value and never a generic 2009-07-15 17:56:17 -07:00
expr.go Make Value always represent an l-value and never a generic 2009-07-15 17:56:17 -07:00
scope.go Make Value always represent an l-value and never a generic 2009-07-15 17:56:17 -07:00
type.go Make Value always represent an l-value and never a generic 2009-07-15 17:56:17 -07:00
util.go Beginnings of a Go interpreter. This implements basic and 2009-07-15 11:59:13 -07:00
value.go Make Value always represent an l-value and never a generic 2009-07-15 17:56:17 -07:00