Refers:
Part 1 - The weekend ‘Scheme’ compiler in C#
Part 2 - Compiling Scheme style function dispatch to IL
This is fun. I added variable argument support. So everything is of type void foo(object[] args) now.
Effectively I can have the full set of lambda signatures -
(lambda () <code>)
(lambda (a) <code>)
(lambda (a b) <code>)
(lambda a <code>)
(lambda (a . b) <code>)
Lambda’s now have a preamble that maps formal parameters and does arity checking. In the cases of lambda’s I populate I create one local variable each to represent each parameter. When there is a variable number of arguments I create a scheme list out of the section of the object[] and assign the list to the local variable.
I hope all this is consistent with scheme.
Download
Remember Me
a@href@title, strike
Powered by: newtelligence dasBlog 2.0.7226.0
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2008, Roshan James
E-mail