curiousdannii / if-decompiler Goto Github PK
View Code? Open in Web Editor NEWDecompile Glulx storyfiles into C code
License: MIT License
Decompile Glulx storyfiles into C code
License: MIT License
Like Emscripten, you could manually set functions as safe, for better performance.
Currently nodes that are not part of a loop scc are not pulled out (ie, made a next edge) unless they are not dominated by the loop header. This means that a series of loops becomes deeply nested. As most loops have only one exit node, we can put it out as long as there isn't already a next edge. We could simply pull the first non-scc node out, or try to weigh the options somehow.
The most common Glk functions (those in perform_glk
) could be directly output. Match on the function ID and number of arguments so that wrong argument number calls will fall through to the default implementation.
disassembling a story file threw up this message "Disassembling the storyfile...Stopping on unknown object type 4 at 41549699"
If given a debug file (inline or external) we should be able to at least get function names, if not more.
It would let us immediately disassemble the functions instead of the fragile code that currently parses the file, skipping other objects, and would also tell us how long each function is, so that we can find late branch targets. This might be the only way to get dynamic jumps to work.
Optimise stack operands. Easy to do within a basic block, but across block boundaries would probably require some sort of phi function?
Decompile strings AOT
When making a Loop->Multiple from merged branches, could we output a switch statement instead?
Add support for compiling against Emglken
Catch the stack overflow message and display one alerting the user to the stack size setting instead.
This will probably mean switching from a thread to a child process.
Thank you for bringing the Relooper problem class to my attention (and indirectly the Stackifier problem class).
.
I had previously assumed that bytecode was "always" a 100% decompilable substitute for missing source code (100% identical, except temporary names), as is the case with Smalltalk decompiler.
.
What might be the reason for the problems of Relooper and Stackifier that are not present in the Smalltalk system?
Adjacent branch instructions could be combined before identifying basic blocks, to simply the output and improve performance. However I'm not sure if Inform actually compiles many adjacent branch instructions?
Add more specific reasons to the FunctionSafety enum, and add an option to output a file list each function and its safety status.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.