Summary: Add ability to distinguish if a Script was parsed as a module For starters we can use this for Esprima related features: - pretty print module code - enable type profiler and code coverage profilers in module code Where "module code" consists of <script type="module"> and transitively imported modules. Eventually we may want to use this information for other reasons.
<rdar://problem/29323817>
Created attachment 295123 [details] [PATCH] Proposed Fix This may not actually depend on the updated Esprima, but it was created from a tree that had it applied so it may not apply otherwise.
Created attachment 295124 [details] [IMAGE] Module Code with Type Profiler
<https://trac.webkit.org/changeset/209492>