AssemblyScript / assemblyscript

A TypeScript-like language for WebAssembly.
https://www.assemblyscript.org
Apache License 2.0
16.6k stars 650 forks source link

Update Binaryen to fix #2810 #2811

Closed CountBleck closed 5 months ago

CountBleck commented 5 months ago
dcodeIO commented 5 months ago

The global access changes seem interesting, btw. Not sure if Binaryen no longer optimizes these to cache to locals, or undoes what the compiler already does on purpose. If it's the former, then perhaps there are new configuration options (to achieve the same as before), and if it's the latter, we might simplify emitted code.

CountBleck commented 5 months ago

It looks like (from my limited testing) there's some smarter threshold that isn't "some variable being accessed a bunch of times". I'll try to look into it further.

MaxGraey commented 5 months ago

he global access changes seem interesting, btw

Binaryen doesn't optimize simple global access anymore: https://github.com/WebAssembly/binaryen/pull/6087

CountBleck commented 5 months ago

@dcodeIO is there any particular reason one might prefer the old behavior?

CountBleck commented 5 months ago

@dcodeIO Do I have the green light to merge?