Closed kripken closed 9 years ago
With this commit in place, I can parse latest emscripten hello world output successfully, and emit a wasm. (But this doesn't store the stdlibness.)
So I didn't quite think this patch was the right strategy (I'm also not sure if it was finished, I couldn't find where the is_stdlib bool was used.
Instead, I wrote a patch (611ec5c8c41b08b112cf064ec49b13bf87e400cd) that adds a hash table of stdlib_doubles (in addition to the current stdlib_funcs) and added NaN and Infinity to that from analyze_imports. Then the analyze_name/write_name could be modified to note these names and convert them to plain old NaN/Infinity F64 literals. On the other end, when asked to print a NaN or Infinity, the name of the auto-imported stdlib is used instead.
Let me know if you have any other problems.
Cool, thanks.
This starts to parse stdlib globals like
stdlib.NaN
andstdlib.Infinity
. This is mostly for feedback, as there are various ways to do this, let me know what you think.