Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transport asm.js correctly #2741

Open
shicks opened this issue Dec 5, 2017 · 4 comments
Open

Transport asm.js correctly #2741

shicks opened this issue Dec 5, 2017 · 4 comments

Comments

@shicks
Copy link
Member

shicks commented Dec 5, 2017

Peephole passes and others should not traverse into functions annotated with 'use asm'. The 'use asm' string needs to be retained.

@MatrixFrog
Copy link
Contributor

It seems rather strange to me, to use both asm.js and Closure Compiler on the same code. But I have heard that some people do it, so I guess we could do this.

@L3P3
Copy link

L3P3 commented Feb 6, 2022

Is there any progress on this? Would be very nice to have asm.js in very hot functions without closure compiler ripping it apart into normal js code.

@L3P3
Copy link

L3P3 commented Jun 27, 2022

I have not much knowledge how closure-compiler works but I assume that it would be enough to just fall back to white-space only (and maybe variable renaming) inside of blocks that have "use-asm"; at their beginning. Is that somewhat easy to implement?
I have code where hot loops were converted to asm code, like you would do it in c projects with inline assembly.

@L3P3
Copy link

L3P3 commented Jun 27, 2022

The "only" thing really needed is that a function with "use asm" at its beginning is just handled like a text, so that if not making it smaller, it is at least preserved 1:1 instead of loosing its performance gains...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants