emscripten-core / emscripten

Emscripten: An LLVM-to-WebAssembly Compiler
Other
25.76k stars 3.3k forks source link

What are some scripts in tools directory for? #5917

Closed saschanaz closed 6 years ago

saschanaz commented 6 years ago

It seems make_file.py, make_minigzip.py, merge_asm.py, etc. are not used by other scripts nor documented anywhere. What are they for?

merge_asm.py even is broken because it refers os without importing, so I would say they are obsolete?

kripken commented 6 years ago

make_file.py's comment suggests we used it in debugging tests. The last real update was in 2011 though, and I can't remember using this at all. We can remove it I think.

make_minigzip.py was used in zlib testing somehow. I don't remember the details, but we can remove it.

merge_asm.py looks broken, yeah - I think it was started but not finished. Can be removed.

saschanaz commented 6 years ago

The list continues:

kripken commented 6 years ago

Some of those are debugging tools,

autodebugger_c.py
autodebugger_indenter.py
autodebugger_js.py
autodediffer.py
bisect_pair_lines.py
bisect_pair_wast.py
bisect_pair_.py
diff_autodebugger.py
find_bigis.py
ll-strip.py
scan_js.py
scan_ll.py
stubify_ll.py

We could maybe move them to a subdir debug or something like that.

creat_dom_pk_codes.py was added by @juj, it generates a table of codes for an html.h API call.

eval_on_use.js was a compression experiment, can be removed.

file2json.py looks like something before we could embed/preload files. Can be removed, although git history shows a commit in 2016, hmm.

Not sure what parse_unaligned.py, profile_stripper.py, traverse.py are. Can probably remove.

reproduceriter.py was a weird experiment. I think @juj has a better way to do it, but we should keep it around for now (maybe in a subdir "experimental" or such).

saschanaz commented 6 years ago

Thank you for your explanations 👍

file2json.py looks like something before we could embed/preload files. Can be removed, although git history shows a commit in 2016, hmm.

I'm not sure why the author of #4688 used it...