Open brmataptos opened 8 months ago
Critical edge processor is expecting that no abort action is used in call instructions.
No duplicate labels; cf. https://github.com/aptos-labs/aptos-core/pull/11894#discussion_r148324750
This is likely also assumed by the control flow graph builder.
🚀 Feature Request
The V2 compiler has code which is making assumptions about invariants in the program IR which are currently true within the compiler but are not enforced by any mechanism. These should be documented, but even better, should be checked by an invariant checker which can serve as the documentation. Checks should have comments linking to code that makes use of these invariants so that if they are ever changed that code can be changed.
For example:
Call
operation takes anOption<AbortAction>
parameter which was added for possible future use but is never non-None
in code that is provided to the compilerUntil this is implemented, feel free to add or clarify invariants on this issue. After that, we can have an invariant checker pass to add new assumptions to.