AlexAltea / capstone.js

Capstone disassembler framework for JavaScript
https://alexaltea.github.io/capstone.js/
BSD 3-Clause "New" or "Revised" License
172 stars 28 forks source link

Arch-specific builds contain constants for all architectures #7

Open copy opened 7 years ago

copy commented 7 years ago

On my minor conquest to reduce the size of capstone-x86.min.js, I noticed that the cs object exported by capstone-x86.min.js also contains constants for other architectures (ARM_*, MIPS_*, etc.).

I believe these could be safely removed to achieve a decent (about 12k) size reduction.

AlexAltea commented 7 years ago

True, constants were loaded from capstone-constants.js regardless of what was actually being built.

I think the build scripts need to be updated to take care of this issue, and the previous one you reported (#6, which by the way would also reduce the amount of constants, as far as I know).

I would gladly do this immediately, but I will be quite busy for the next weeks, so any pull requests would be really welcome. :-)