EricGrange/DWScript

Looking for DWScript coding style documentation

YogiYang opened this issue · 3 comments

I want to understand as to how DWScript is coded and modify the code to get it to work in a different environment.

Eric, can you please explain the same here?

Thanks

hmmm, I do not understand your question... or rather what I understand of
it is way too broad :)
DWScript is using an executable expression tree, mixed with optional JITted
leaves.

On Mon, Sep 21, 2015 at 8:46 AM, YogiYang notifications@github.com wrote:

I want to understand as to how DWScript is coded and modify the code to
get it to work in a different environment.

Eric, can you please explain the same here?

Thanks


Reply to this email directly or view it on GitHub
#2.

I mean if I need to make changes in DWScript to get it to work in an application what have I to do for example?

Another thing. If i want to add a few internal commands/functions in which module should I add them?

Finally I am really interested in compiling DWScript into a DLL and then call the DLL in my software. For this where should I make changes?

Do I have to setup any hooks to get DWScript to save compiled code to a file as p-code or some such format?

Hmm, it depends on what kind of changes you make :)
First thing would probably be to add tests related to your changes and
ensure the full test suite still passes.

DWScript does not use p-code or bytecode (cf
https://www.delphitools.info/2010/10/26/why-no-bytecode-format/).

For use in a DLL, you can probably just use it as in a normal application,
though I have not written DLLs during the last decade, so there may be some
gotchas related to DLLs and Delphi. You will however have to figure out
your own DLL interfaces, and these will depend on the target environment
for the DLL.

On Mon, Sep 21, 2015 at 8:54 AM, YogiYang notifications@github.com wrote:

I mean if I need to make changes in DWScript to get it to work in an
application what have I to do for example?

Another thing. If i want to add a few internal commands/functions in which
module should I add them?

Finally I am really interested in compiling DWScript into a DLL and then
call the DLL in my software. For this where should I make changes?

Do I have to setup any hooks to get DWScript to save compiled code to a
file as p-code or some such format?


Reply to this email directly or view it on GitHub
#2 (comment).