I have now added new code to make calls from Boot to Spad. There is macro SpadFun which is used like:
$SPADRREAD_fun := [0, nil] SPADRREAD(stream, key) == fun := SpadFun($SPADRREAD_fun, getFunctionFromDomain1("read", '(BasicKeyedAccessFile), '(None), '((BasicKeyedAccessFile) (String)))) SPADCALL(stream, key, fun) That is first argument is a variable name, the second one is call to lookup function which searches for a given Spad function. Main point of SpadFun is that the variable is a cache: first field may be 0, 1 or 2. 0 means it was not called, so of course need lookup. 1 means that there was one call. However, cached value may contain 'newGoGet', in such case Spad part of lookup still needs to be done. Only after second call we know that function is fully resolved, so we can use cached value. There is also function 'clear_callbacks' in 'clam.boot'. It is called if a constructor is recompiled. clear_callbacks' is supposed to clear all variables used as caches. Without clearing Boot would use cached value, so call old functions (a not the new re-compiled ones). Currently one has to manually add all caching variables to 'clear_callbacks'. ATM there are two such variables. There will be more, but I do not expect many of them and they should change rather slowly, so hopefully manual update will not be a problem. -- Waldek Hebisch -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/fricas-devel/aJQCCs2LQUslqch_%40fricas.org.