Compiled JS

J Decker d3ck0r at gmail.com
Wed Oct 25 06:21:12 UTC 2017


Each javascript engine uses different opcodes internally; there is no
universal bytecode like Java, C# or Vulkan.
using closure compiler or some other minification is the closest you can
come; short symbols are quicker to process.

Trying to learn how to do that for V8 Engine, it is possible to generate
precompiled javascript chunks and link them into the compiled product; but
it's not a universal solution, and, as far as I can tell, isn't even really
possible to do into dynamic libraries to add dynamically.


On Tue, Oct 24, 2017 at 10:48 PM, Peter Jaszkowiak <p.jaszkow at gmail.com>
wrote:

> Compiling JS into an intermediate representation like the JVM or LLVM
> isn't really possible because JavaScript is a dynamic language.
>
> That's my understanding anyways. The binary AST is as close as we can get.
>
> On Oct 24, 2017 23:43, "doodad-js Admin" <doodadjs at gmail.com> wrote:
>
>> No WASM/AST.... Don’t challenge my ignorance.... I’m basically suggesting
>> a way to compile:
>>
>>
>>
>> ````js
>>
>> const a = {};
>>
>> ```
>>
>>
>>
>> to opcodes, like:
>>
>>
>>
>> ```hex
>>
>> F10B6100
>>
>> ```
>>
>>
>>
>> *From:* Karl Cheng [mailto:qantas94heavy at gmail.com]
>> *Sent:* Wednesday, October 25, 2017 12:57 AM
>> *To:* doodad-js Admin <doodadjs at gmail.com>
>> *Cc:* es-discuss <es-discuss at mozilla.org>
>> *Subject:* Re: Compiled JS
>>
>>
>>
>> It seems that you're referring to something like WebAssembly
>> <http://webassembly.org/> or a binary AST
>> <https://github.com/syg/ecmascript-binary-ast>. Please check them out
>> and see if they're similar to what you're thinking of.
>>
>>
>>
>> On 25 October 2017 at 08:06, doodad-js Admin <doodadjs at gmail.com> wrote:
>>
>> Hi,
>>
>>
>>
>> By seeing many proposals about reducing the syntax for X and Y, I just
>> want to open the idea of a [non-native] compiled JS world. What do you
>> think?
>>
>>
>>
>> Because, if that’s not the problem (code size), what it is ?
>>
>>
>>
>> Claude Petit
>>
>>
>>
>>
>>
>>
>> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>>
>> Virus-free. *www.avg.com*
>> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>>
>>
>> _______________________________________________
>> es-discuss mailing list
>> *es-discuss at mozilla.org*
>> *https://mail.mozilla.org/listinfo/es-discuss*
>> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>>
>>
>>
>>
>> --
>> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>>
>> - Karl Cheng (Qantas94Heavy)
>> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>>
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20171024/62c3ec16/attachment.html>


More information about the es-discuss mailing list