Martin Rubey <[EMAIL PROTECTED]> writes: [...]
| > | But I have no idea at what point during compilation the names of the | > | operations are determined. | > | > Could you expand on exactly what you mean by this? Do you mean the | > encoding, or do you mean the result of overload resolution? | | I mean the encoding. For encoding of exported functions, see compile. The actual function that computes the encoding is encodeFunctionName. | That is, at some point when compiling bar in, say | | FOO(): with | bar: Integer -> Integer | foo: Integer -> Integer | == add | foo m == m**2 | bar m == foo m + random 100 [...] | What I'd like to have, however, is that in certain circumstances (namely, | whenever we are not in a category, and the definition of foo is independent of | the parameters of the constructor), that comp3 returns a direct call to foo, | i.e., | | |FOO;foo;2I;???| If the function is exported, why do you think it is safe to make the replacement? | To do so, I'd need to construct this name given the arguments of comp3. see encodeFunctionName. | But I | do not know whether this is possible. It may well be that the running index | (??? above) is known only after all of the domain has been compiled. It might | be helpful to know how the 8 in (elt $ 8) above is determined... The running index -- called $suffix -- is incremented one item at a time -- as they are being compiled. But, again, I believe you need to justify why the transformation you want to do is OK. | | > | I hope it's before actually compiling them -- I'd like to be able to get | > | the name in comp3, but I cannot see it anywhere... | > | | > | Any clues about question (1)? | > | > Why is the condition of the modemap insufficient? | | I hope that the above answers this question, too. No, it does not. At least if I understand question (1) correctly. | In short, it seems that the | (lisp) name of the function can not be deduced from the modemap alone. That is correct -- because you also need the $suffix. But, your question -- if I understand it correctly -- is to know the condition that controls the operations' definition. I don't see a better place than the modemap. -- Gaby ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel