22 Mai
2007
22 Mai
'07
22:49
On May 20, 2007, at 6:17 PM, Christian Jaeger wrote:
One thing I still don't get are those define-prim which don't have a body, where is the code that's actually being executed for them?
Ah, that's in the define-prim macro in header.scm. So (define-prim (##bignum.adigit-inc! x i)) gets expanded to (define ##bignum.adigit-inc! (let () (##declare (not inline) (standard-bindings) (extended-bindings)) (lambda (x i) (##bignum.adigit-inc! x i)))))) and gsc knows how to expand the call to ##bignum.adigit-inc! into the GVM macro BIGAINC from gambit.h. Brad