Ty Overby

Results 123 comments of Ty Overby

Oh yeah, the `js` mode is required, sorry, we autogenerate those files, and it looks like we'll need to add some logic to insert that mode

Wouldn’t a global flag make it harder to use the jsoo compiler as a library, which could be invoked many times with different targets?

For example, an online ocaml repl, or a “godbolt explorer” output visualizer

This PR looks like it contains some formatting changes (using arrow functions) and also rewrites some of the most foundational primitives in the jsoo runtime. Could you split these up...

Also, why are you interested in using arrow functions and avoid using `arguments`?

> The function function binds this to its own scope, so you must explicitly bind this to prevent unintended behaviour in situations where this is treated differently. Does this ever...

> arguments is not Array, it's ArrayLike, and converting it to Array has some cost But Chrome is converting it to an array under the hood too. I benchmarked this...

> The rest parameter and arguments show almost no difference in the benchmark results for major browsers: https://jsben.ch/BQEVR On my machine at least, the new code is reliably 4% slower....

Yeah, very strange. ![Screenshot from 2024-09-26 12-54-30](https://github.com/user-attachments/assets/afa53210-f28a-4bfe-992c-1d0572960890)

> I ran it on the latest Chrome with Apple Silicon. What's your environment? Latest Chrome x86-64