-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This implements generating source maps for the generated Wasm files. Copying dart2js's command line interface, a source map file with the name `<program name>.wasm.map` is generated unless `--no-source-maps` is passed. When a source map is generated, the generated .wasm file gets a new section `sourceMappingURL` with the contents `<program name>.wasm.map`. This section seems to be undocumented, but Chrome and binaryen recognize it as the URI to the source map file. Chrome is then loads it automatically in the DevTools. ## Implementation - `wasm_builder` package is updated with the new `source_map` library, which describes the source mapping entries. - `wasm_builder`'s `InstructionsBuilder` is updated with the new public members: - `startSourceMapping`: starts mapping the instructions generated to the given source code. - `stopSourceMapping`: stops mapping the instructions generated to a source code. These instructions won't have a mapping in the source map. - `CodeGenerator` sets the source file URI and location in the file when: - Starting compiling a new member - Compiling an expression and statement Change-Id: Ic8f723f7a154402c0d34710689db57d640b83b86 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370500 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Ömer Ağacan <omersa@google.com>
- Loading branch information
Showing
20 changed files
with
601 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.