srijs / rusha

High-performance pure-javascript SHA1 implementation suitable for large binary data, reaching up to half the native speed.
https://npmjs.org/rusha
MIT License
277 stars 32 forks source link

Sipplied rusha.min.js causes asm.js warning in FireFox #34

Closed SagePtr closed 8 years ago

SagePtr commented 8 years ago

In rusha.min.js:2:3938 TypeError: asm.js type error: duplicate name 'e' not allowed It happens with latest rusha.min.js from this repo ( https://raw.githubusercontent.com/srijs/rusha/2b6e4c1e55592f4386d1ded2e325cd07d73fd49d/rusha.min.js ) Previous version from march 2015 ( https://raw.githubusercontent.com/srijs/rusha/c14c28833ab28b270352f99f9ecc4db7d49baf0d/rusha.min.js ) does not have this problem. Please minify it with asm.js-compatible tool. (for me, uglifyjs done good job, but maybe it's factor of luck which names are randomly chosen for mangling variable names)

srijs commented 8 years ago

Hi!

Thanks for reporting this. I've just pushed a fix into master that should fix the issue.

Could you confirm that it works on your end?

SagePtr commented 8 years ago

Yes, now it works without warnings in Firefox. "Successfully compiled asm.js code (total compilation time 5ms; not stored in cache (too small to benefit))"

srijs commented 8 years ago

Cool! Closing this now.