Separate module compilation and parsing into separate steps.

`compileModule` would previously return a `ParsedModule`, which has
reordered the ProgramElements by putting them into a `BuiltinMap`
(and prototypes have been removed entirely). For minification
purposes, we need a `LoadedModule`, which keeps all the
`ProgramElements` and leaves the in their original order.

Now `compileModule` returns the `LoadedModule` and you must call
`parse` on the `LoadedModule` to convert it into its final
`ParsedModule` form.

I think there are probably things we could do here to streamline the
API further (there probably isn't a need for two separate structs at
all) but I didn't want to gild the lily too much with a larger
refactor while this code is already in flux so much.

Change-Id: I2bd85dcafbeb08b50ebbcb8392eea1d438d514c5
Bug: skia:13775
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/585856
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
4 files changed