what does and doesn't get complied in a standalone?
Bob Sneidar
bobs at twft.com
Thu Sep 13 17:36:19 EDT 2012
I would only add that the mainstack is not editable, and seems to be incorporated into the "app" itself, whereas substacks (with the option to keep substacks separate option checked in the Standalone Apps settings) and stack files are individual files located in a folder in the app bundle on a Mac, and in a folder in the program folder on Windows. Not sure about Linux.
The Mac bundle DOES contain a file named the same as the mainstack, but without the .livecode extension. If I add the extension, and then try to open the file as a stack, Livecode complains it is not a stack, showing that the mainstack is actually not simply included in the bundle, but is incorporated into a unix executable, which I believe is the runtime engine glued together with the mainstack.
If you need further confusion and obfuscation I will be glad to assist! ;-)
Bob
On Sep 13, 2012, at 12:23 PM, Richard Gaskin wrote:
> Dr. Hawkins wrote:
>> After many recent posts, I'm starting to wonder: what does and
>> doesn't get complied in a standalone?
>>
>> Several messages have suggested, if I'm reading them write, that the
>> main stack is compiled, while the others, even if password protected,
>> are interpreted at runtime. Am I getting that right?
>>
>> And if so, what is the performance hit?
>>
>> So should all of the more intensive work be moved into routines in the
>> main stack?
>
> No difference between mainstack made into an app and any other stack files used for code. And AFAIK no difference in execution speed between password-protected and non-protected scripts, though I haven't measured it in many years.
>
> In the modern world with so many different types of compilers, determining exactly what "compile" means can be tricky.
>
> My understanding of what LiveCode does is that it uses a two-pass compilation method, similar to many other high-level languages, in which a script is tokenized into a highly efficient bytecode format at runtime as objects are unpacked, and that bytecode is then run through the engine during execution.
>
> Exceptions to this include "do", "send", "call", and "dispatch", which must be tokenized on the fly since they're effectively working with dynamic strings, which explains why those run so much slower than alternatives.
>
> If anyone has more details beyond this I'd love to hear them.
>
> --
> Richard Gaskin
> Fourth World
> LiveCode training and consulting: http://www.fourthworld.com
> Webzine for LiveCode developers: http://www.LiveCodeJournal.com
> Follow me on Twitter: http://twitter.com/FourthWorldSys
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list