RE: A Euphoria DLL?

new topic     » goto parent     » topic index » view thread      » older message » newer message

> -----Original Message-----
> From: Bernie Ryan [mailto:xotron at localnet.com]

>    The code that is used in a bound form is byte codes
>    that only the interpeter understands. Now if the
>    code is used in the DLL, it has to be "C" code or some
>    big lump of binary code

Why does the Eu code need to be C or binary for a dll if it doesn't for an
exe?

>    that has to interfaced with
>    "C" code so the DLL can export it or expose each
>    routine to the outside world.

DLL's call Eu routines all the time (call_back), and they're still in byte
code form.  I assume (I don't have the source) that the way Eu does this is
to set up a 'fake' entry point into the interpreter that knows to execute
the Eu function within the interpreter.  Currently, (I suspect) the fake
call_back generation is done on the fly, as you make calls to call_back().
Why couldn't 'bindd' do this at bind time, inserting the entry point code
whereever it needs to be in order for the outside world to see it as an
entry point?  Then generate the stub so that everyone can see the entry
points.

>    Also the routines have
>    to be able to call other code in other DLLs and also
>    comunicate with the interpeter.

Eu apps (interpreted and compiled) do this all the time.  I don't understand
why this would be a stumbling block.

-External app calls LoadLibrary
-Interpreter inside the DLL initializes and runs any top level code
-External app makes calls to the Eu code through pre-generated call_back's
(perhaps for all global routines)

>    That sounds like a lot of work to get around someone
>    just translating a program and compiling it with a compiler.

This is a bit more complicated than that, though.  You've found out yourself
that different compilers have their own quirks and errors that are not easy
to pin down.  By using bound dlls, it's possible to avoid some of those
errors.  Besides, the main reason for compiling (that people have raised) is
for speed.  If you don't need speed for an executable, you'll probably just
use bind.  I think the same logic goes for dlls.

>    I rather see your idea of trying to interface things
>    with COM that would create a whole new world for euphoria.

Binding dll's could also work in favor of this, for the same reasons as
above.  AFAIK, COM objects aren't really any different from DLL's from the
compiler's stand point (typelib stuff aside).

Does anyone know of any other language that will create dll's without actual
compilation to machine code?

Matt Lewis

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu