-
Notifications
You must be signed in to change notification settings - Fork 830
Closed
Description
I noticed that there is some source map support but no way to provide the information necessary in the C-API yet. Hence, what if we'd do something like:
- Call
BinaryenAddFile(const char* name): BinaryenFileReffor each source file being compiled, returning a reference to the file (avoids having to copy file name strings every time in JS) - Call
BinaryenSetLoc(BinaryenFileRef file, BinaryenIndex lineStart, BinaryenIndex columnStart, BinaryenIndex lineEnd, BinaryenIndex columnEnd): void, taking the file reference from above plus line and column information of the next function / global / import / export / expression being compiled - Call the respective C-API method as usual that then honors the location info previously set
- Generate a source map from this information when creating the module (maybe
BinaryenModulePrintSourceMap).
Would something like this be possible as of today?
Metadata
Metadata
Assignees
Labels
No labels