Re: GJS Warnings even on GJS_DISABLE_EXTRA_WARNINGS=1
- From: Andrea Giammarchi <andrea giammarchi gmail com>
- To: Philip Chimento <philip chimento gmail com>
- Cc: javascript-list <javascript-list gnome org>
- Subject: Re: GJS Warnings even on GJS_DISABLE_EXTRA_WARNINGS=1
- Date: Sat, 15 Apr 2017 09:41:00 +0100
>
Do you know if that's because they optimized it, or they just gave up showing the message?
The thing is that there are no ways to extend natives differently.
Imagine you want a Constructor to be an Array, `Object.setPrototypeOf(Constructor, Array)` is the only way to go because you cannot `Object.create` a constructor.
This is just an example of how pointless is that message, specially because it's Babel causing it and there's no way Babel should avoid using __proto__ where appropriate.
TL;DR the __proto__ bails out optimizations around inferred types so that both the object and the code dealing with such object cannot be heavily optimized.
At the same time ECMAScript 3rd Edition was already fast enough with functions, classes, and stuff that has never seen the light of JIT compilers.
As summary, that was just an overly-agressive message that someone at Mozilla decided was good to show to developers, the only people that would notice, mostly the one incapable of fixing it 'cause coming from transpiled code that inevitably needs it.
The race to close-to-mteal performance for a scripting language can take various unimaginable directions, showing warnings around ECMAScript specifications shouldn't be one of these ^_^
Apologies for the rant and thanks for your answer.
Best Regards
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]