-
Notifications
You must be signed in to change notification settings - Fork 194
Compiler improvement #22
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
Conversation
Some more cleaning more cleaning
free var2
better coloring more coloring
no need for Var.stream
COMPILER: typo coloring COMPILER: missing file
add missing ast elt COMPILER: missing ops merge with more ast
COMPILER: js parser
@vouillon, I've pushed a javascript parser (extracted from facebook/pfff). I would like to use this parser during linking.
any suggestion ? note: I fixed 2 missing semicolon in the runtime. (pushed on master). I don't know if the parser should handle those cases. |
Semicolons are optional at line end, but it's considered good practice anyway. You can go ahead with using a parser during linking. We should merge this branch first, though. I'm not sure we want to use it to compute Requires and Provides. In particular, how can you tell whether a function is part of the browser APIs or whether it corresponds to a requirement? On the other hand, the three other points make sense. Also, you don't want to automatically infer functional purity: functions can be implemented in an imperative ways (loops, cached values, ...) while still appearing functional externally. |
The precedences in Js_output seem correct. |
This is an impressive amount of work. You need to fix the -pretty option to generate readable variable name again, and I would disable the variable naming optimization (in Js_var) for now. Otherwise, I'm eager to see this merged. Thanks a lot! |
By curiosity and interest, could we have a comprehensive Changelog of this ? The first post is a bit short on explanations from an outside point of view but there seems to be a lot of interesting new things. |
You may proceed to the merge ;) |
CHANGES may need more entry |
Huge number of compiler improvements contributed by Hugo
Do no merge, Review only.
ouput_file
in case of compilation failure-opt 3
) : missing deadcode elimination btw inline and flow