Yeah, and in particular, you can't even reuse snapshots across V8 patch
versions.

The binary AST is pretty much the only way to go on this one, and they have
in fact looked for ways to reduce common sugared operations (like method vs
function calls). Their focus is more on size and parsing/compilation speed,
since it makes a very real difference in load times with larger web
applications.

On Wed, Oct 25, 2017, 02:21 J Decker <d3c...@gmail.com> wrote:

> 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.jasz...@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" <dooda...@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:qantas94he...@gmail.com]
>>> *Sent:* Wednesday, October 25, 2017 12:57 AM
>>> *To:* doodad-js Admin <dooda...@gmail.com>
>>> *Cc:* es-discuss <es-discuss@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 <dooda...@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@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@mozilla.org
>>> https://mail.mozilla.org/listinfo/es-discuss
>>>
>>>
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss@mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to