Branch: refs/heads/thaines/expression_base Home: https://github.com/dyninst/dyninst Commit: ea3da726793d7ea5db1bed6b0ed9590cdd95c850 https://github.com/dyninst/dyninst/commit/ea3da726793d7ea5db1bed6b0ed9590cdd95c850 Author: Tim Haines <thaines.as...@gmail.com> Date: 2025-04-15 (Tue, 15 Apr 2025)
Changed paths: M instructionAPI/h/Expression.h M instructionAPI/src/Expression.C M instructionAPI/src/InstructionAST.C Log Message: ----------- Remove DummyExpr Its usage was removed by 3714412b11cba in 2017. Commit: 526d2847a2a2abc975c054aeda4aad495537088d https://github.com/dyninst/dyninst/commit/526d2847a2a2abc975c054aeda4aad495537088d Author: Tim Haines <thaines.as...@gmail.com> Date: 2025-04-15 (Tue, 15 Apr 2025) Changed paths: M instructionAPI/h/InstructionAST.h Log Message: ----------- Remove unnecessary forward declaration Commit: f0aafa850d79c62b23b6c748aa60a435a97a67fe https://github.com/dyninst/dyninst/commit/f0aafa850d79c62b23b6c748aa60a435a97a67fe Author: Tim Haines <thaines.as...@gmail.com> Date: 2025-04-15 (Tue, 15 Apr 2025) Changed paths: M instructionAPI/h/BinaryFunction.h M instructionAPI/h/Dereference.h M instructionAPI/h/Immediate.h M instructionAPI/h/InstructionAST.h M instructionAPI/h/MultiRegister.h M instructionAPI/h/Register.h M instructionAPI/h/Ternary.h M instructionAPI/src/Immediate.C Log Message: ----------- Remove using declarations Commit: df3de364665fd5dc165b5e7542fdd81b5535b2c6 https://github.com/dyninst/dyninst/commit/df3de364665fd5dc165b5e7542fdd81b5535b2c6 Author: Tim Haines <thaines.as...@gmail.com> Date: 2025-04-15 (Tue, 15 Apr 2025) Changed paths: M instructionAPI/h/InstructionAST.h M instructionAPI/src/InstructionAST.C Log Message: ----------- Inline default ctor Commit: fcf7841c5f23af4b744f301f1a67bdad1cdb8203 https://github.com/dyninst/dyninst/commit/fcf7841c5f23af4b744f301f1a67bdad1cdb8203 Author: Tim Haines <thaines.as...@gmail.com> Date: 2025-04-15 (Tue, 15 Apr 2025) Changed paths: M instructionAPI/h/InstructionAST.h M instructionAPI/src/InstructionAST.C Log Message: ----------- Inline dtor Commit: 2bcfd6b7dd683970ec16d0515272ed7004f7d9f6 https://github.com/dyninst/dyninst/commit/2bcfd6b7dd683970ec16d0515272ed7004f7d9f6 Author: Tim Haines <thaines.as...@gmail.com> Date: 2025-04-15 (Tue, 15 Apr 2025) Changed paths: M instructionAPI/h/InstructionAST.h Log Message: ----------- Add missing SMFs These are needed since there is a user-provided dtor. Commit: 774dd4fa016ec6691360ea9dff608a0f02b92903 https://github.com/dyninst/dyninst/commit/774dd4fa016ec6691360ea9dff608a0f02b92903 Author: Tim Haines <thaines.as...@gmail.com> Date: 2025-04-15 (Tue, 15 Apr 2025) Changed paths: M instructionAPI/h/InstructionAST.h M instructionAPI/src/InstructionAST.C Log Message: ----------- Inline checkRegID Commit: e4213267ac12c99b06f11d40082ac0c88122e861 https://github.com/dyninst/dyninst/commit/e4213267ac12c99b06f11d40082ac0c88122e861 Author: Tim Haines <thaines.as...@gmail.com> Date: 2025-04-15 (Tue, 15 Apr 2025) Changed paths: M instructionAPI/CMakeLists.txt M instructionAPI/h/InstructionAST.h R instructionAPI/src/InstructionAST.C Log Message: ----------- Inline operator== Commit: 783f6dbcc9f6a05c9bed357880c1ec7a2cd2bbb5 https://github.com/dyninst/dyninst/commit/783f6dbcc9f6a05c9bed357880c1ec7a2cd2bbb5 Author: Tim Haines <thaines.as...@gmail.com> Date: 2025-04-15 (Tue, 15 Apr 2025) Changed paths: M instructionAPI/h/InstructionAST.h Log Message: ----------- Fixup includes Commit: 1f93f22f37572cb78cd39b8a0d5259f906e6dd15 https://github.com/dyninst/dyninst/commit/1f93f22f37572cb78cd39b8a0d5259f906e6dd15 Author: Tim Haines <thaines.as...@gmail.com> Date: 2025-04-15 (Tue, 15 Apr 2025) Changed paths: M instructionAPI/h/InstructionAST.h Log Message: ----------- Replace typedef with using alias Commit: cf8696ac627939cbc00cc90d32ed6746ec35aeb0 https://github.com/dyninst/dyninst/commit/cf8696ac627939cbc00cc90d32ed6746ec35aeb0 Author: Tim Haines <thaines.as...@gmail.com> Date: 2025-04-15 (Tue, 15 Apr 2025) Changed paths: M instructionAPI/h/InstructionAST.h Log Message: ----------- Whitespace Commit: 52036ef3738a0c60f802837e7327621f090e1b81 https://github.com/dyninst/dyninst/commit/52036ef3738a0c60f802837e7327621f090e1b81 Author: Tim Haines <thaines.as...@gmail.com> Date: 2025-04-15 (Tue, 15 Apr 2025) Changed paths: M instructionAPI/h/BinaryFunction.h M instructionAPI/h/Dereference.h M instructionAPI/h/Immediate.h M instructionAPI/h/MultiRegister.h M instructionAPI/h/Register.h Log Message: ----------- Make overrides explicit in AST classes Commit: a73ded498f1b696e765a27234625d4969da7b9b1 https://github.com/dyninst/dyninst/commit/a73ded498f1b696e765a27234625d4969da7b9b1 Author: Tim Haines <thaines.as...@gmail.com> Date: 2025-04-15 (Tue, 15 Apr 2025) Changed paths: M dataflowAPI/src/Absloc.C M dataflowAPI/src/AbslocInterface.C M dyninstAPI/src/StackMod/StackAccess.C M instructionAPI/doc/2-Abstractions.tex M instructionAPI/doc/3-API.tex M instructionAPI/doc/API/BinaryFunction.tex M instructionAPI/doc/API/Dereference.tex M instructionAPI/doc/API/Expression.tex M instructionAPI/doc/API/Immediate.tex R instructionAPI/doc/API/InstructionAST.tex M instructionAPI/doc/API/MultiRegisterAST.tex M instructionAPI/doc/API/RegisterAST.tex M instructionAPI/doc/API/TernaryAST.tex M instructionAPI/h/BinaryFunction.h M instructionAPI/h/Dereference.h M instructionAPI/h/Expression.h M instructionAPI/h/Immediate.h M instructionAPI/h/InstructionAST.h M instructionAPI/h/MultiRegister.h M instructionAPI/h/Register.h M instructionAPI/h/Ternary.h M instructionAPI/src/Expression.C M instructionAPI/src/Immediate.C M instructionAPI/src/MultiRegister.C M instructionAPI/src/Operand.C M instructionAPI/src/Register.C M instructionAPI/src/Ternary.C M instructionAPI/src/full_inheritance_graph.dot M patchAPI/src/PatchBlock.C Log Message: ----------- Make Expression the base of the InstructionAPI AST hierarchy The InstructionAST abstraction doesn't provide any functionality beyond its immediate child, Expression. This is particularly evident by 1) all uses of InstructionAST in Dyninst are immediately converted to an Expression 2) the lackluster description provided in the docs: The InstructionAST class is the base class for all nodes in the ASTs used by the Operand class. It defines the necessary interfaces for traversing and searching an abstract syntax tree representing an operand. But the real problem is with 'getChildren'. Because both InstructionAST::getChildren(std::vector<InstructionAST::Ptr> const&)=0 and Expression::getChildren(std::vector<Expression::Ptr> const&)=0 exist, then every AST type has to implement both which is redundant and provides no logical separation between an InstructionAST and an Expression. In C++, these are referred to as overloaded virtual functions and are generally a sign of an error since the one from the base class will be hidden (see -Woverloaded-virtual). The author "overcame" this by making them pure virtual. That doesn't remove the logical incorrectness, though. InstructionAST should have implemented 'getChildren' (or even better, 'getChildNodes') and Expression should have implemented 'getSubexpressions'. Then all of this would have been separated in a useful way. This merger is an ABI break only. No user code changes will be needed. Compare: https://github.com/dyninst/dyninst/compare/ea3da726793d%5E...a73ded498f1b To unsubscribe from these emails, change your notification settings at https://github.com/dyninst/dyninst/settings/notifications _______________________________________________ Dyninst-api mailing list Dyninst-api@cs.wisc.edu https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api