On Wed, 22 Jul 2009, Gerhard Fiedler wrote: > Olin Lathrop wrote: > > > Gerhard Fiedler wrote: > >> I thought this all is basically understood when talking about > >> standard libraries (that is, libraries with an interface that is > >> part of the language standard). > > > > Normally "standard library" refers to a documented set of subroutines > > that have a widely agreed upon interface and are supplied with the > > compiler. > > Define "normally" and "documented" and "widely agreed upon" for this > context :) > > Or, alternatively, have a look at a language standard that contains > library interface definitions (e.g. the C++ standard -- you'll find a > link in this thread to a draft). > > If the interface is defined ("documented" in a "standard") -- both in > syntax and semantics --, the compiler writer can rely on this definition > for any high-level optimizations. > > I have written what I understand in this context as "standard library" > repeatedly in this thread; just search for it. > > > You seem to want intrinsic functions that you can also write yourself > > if you want to. > > No. I've written this already. Conclusions based on this have nothing to > do with what I wrote. Yes Gerhard as Olin says you do seem to want intrinsic functions that you can also write yourself if you want to. This is not a bad thing, just incredibly difficult to achive efficiently. By which I mean have a modern PC capable of generating an executable from such a compiler in an acceptable time. By definition, intrinsic means that the compiler understands what these functions do and how they do it. The exact optimised code generated for such a function could be contained in a special internal (to the compiler) macro with lots of conditional assembly going on inside it. Or as you have already suggested, it could be a function held as source (maybe C) which gets compiled everywhere it is needed (including conditional compilation). But this would still be intrinsic to the compiler because the compiler has a preconceived idea of what the function does and the actual source code for the function would not change this idea. The function calling protocol would be horrendus (very big and complicated and much slower to execute than that needed for the standard / normal function calling protocol) to allow for good optimisation but I can see that this could be done. Friendly Regards Sergio Masci -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist