-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source maps #41
base: main
Are you sure you want to change the base?
Source maps #41
Conversation
library TonUtil // TON Blockchain Fift Library | ||
|
||
library Lists // List utilities |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftovers from concatenating Fift libraries into this big amalgamation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's just a concatenation of some existing Fift files, let's create a script to do that concat and put all those files separately. Also, add the links to the original Fift files (including commit info), so it's reproducible
Initial implementation for source map from Fift assembly file from FunC
At the time when decompiling we get function names like
?fun_HASH_0_to_16
, but we would like to see the real names, like in the original FunC code.For this we add a new function
obtainSourceMap
which takes the path to the original.fif
file.To get the
HASH -> name
mapping we run the Fift compilation passing the contents of not just a.fif
file, but a special version ofAsm.fif
+ our.fif
file. With this changes inAsm.fif
, Fift compiler prints the name and hash of each function to stdout during compilation, which we then transform into a source map.This map then passed to
AssemblyWriter.write()
for actual use:Towards #46