Branch: refs/heads/master
  Home:   https://github.com/dyninst/dyninst
  Commit: c856fbf5060f50cec84d8dbca19f740581b13491
      
https://github.com/dyninst/dyninst/commit/c856fbf5060f50cec84d8dbca19f740581b13491
  Author: Tim Haines <[email protected]>
  Date:   2026-01-28 (Wed, 28 Jan 2026)

  Changed paths:
    M dyninstAPI/CMakeLists.txt
    M dyninstAPI/src/BPatch_addressSpace.C
    M dyninstAPI/src/BPatch_function.C
    M dyninstAPI/src/BPatch_snippet.C
    M dyninstAPI/src/IAPI_to_AST.C
    A dyninstAPI/src/OperandType.h
    M dyninstAPI/src/addressSpace.C
    M dyninstAPI/src/ast.C
    M dyninstAPI/src/ast.h
    M dyninstAPI/src/baseTramp.C
    M dyninstAPI/src/baseTramp.h
    M dyninstAPI/src/codegen.h
    M dyninstAPI/src/dynProcess.C
    M dyninstAPI/src/emit-x86.C
    M dyninstAPI/src/inst-aarch64.C
    M dyninstAPI/src/inst-power.C
    M dyninstAPI/src/inst-x86.C
    M dyninstAPI/src/inst.h
    M dyninstAPI/src/linux-x86.C
    M dyninstAPI/src/opcode.h
    A dyninstAPI/src/regTracker.C
    A dyninstAPI/src/regTracker.h
    M dyninstAPI/src/registerSpace.h
    M dyninstAPI/src/syscallNotification.C

  Log Message:
  -----------
  Clean up dyninstAPI AstNode classes (#2114)

* Remove deepCopy

It was added by 21d1427b9 in 2010, but never used.

* Remove Dyn_C error reporting variables

These were only used in the deepCopy member functions.

* Remove nodeType

Its usage was removed by 20116a1026 in 2006

* Remove cleanRegTracker

This was added by 123a8c7f31 in 2010, but never implemented.

* Move cfjRet_t into baseTramp

This is the only place it's used.

* Remove dataReqNode declaration

It's never used.

* Extract regTracker_t

I'm suspicious of the gymanastics in AstNode::generateCode, but
I'll leave it as-is for now.

* Remove 'void' parameter

This isn't legal c++.

* Remove checkUseCount

Its usage was removed by 123a8c7f in 2006.

* Remove printUserCount

Its usage was removed by 123a8c7f3 in 2006.

* Remove AstNode::getArgs

It was added by 21d1427b9 in 2010, but never used.

* Remove setChildren

Added by 48fb32bc23 in 2010
Used in AST::Ptr AST::substitute(AST::Ptr in, AST::Ptr a, AST::Ptr b)

Usage removed by 807e320e334c in 2010.

Current implementation was added by 21d1427b92be10 in 2010, but no call
to it was added.

* Provide a default for canBeKept

* Remove stealRegister

It was added by 0380c4db951 in 2006, but never implemented.

* Remove subpath

Its usage and definition were removed by 123a8c7f31 in 2006.

* Move children into AstNode

This simplifies the implementations.

* Remove AstNode(AstNodePtr)

Its original implementation 'AstNode(AstNode *src)' was removed by
5dabf3ca8b1 in 2006. The interface was changed to its current form by
e7c183b934 in 2007, but was never re-implemented.

* Remove AstNode::getTreeSize

It was added by 97dc86ee3f0 in 2006, but never used.

* Remove accessesParam

Its usage was removed by 47c4dfe96 in 2010.

* Provide default for containsFuncCall

For AstCallNode, this is only safe because its child nodes are
only added to AstNode::children in the AstCallNode ctor if they exist.

* Provide a default for setVariableAST

For AstOperatorNode, AstOperandNode, AstCallNode, and AstSequenceNode,
this is only safe because its child nodes are only added to
AstNode::children in their respecitive ctor if the children exist.

* Provide a default for usesAppRegister

* Require generateCode_phase2

All of the ASTs already implement it. This also converts the runtime check
into a compile-time one.

* AstNode: use in-class member initializers

* AstNode: use default dtor

* AstNode: inline getType

* Remove AstNode::labelNode(std::string)

This should have been removed by eac8cf2c8.

* Extract operandType

This centralizes the type and its functions and will help with
possibly refactoring the operand-specific methods out of AstNode
some day.

* Remove operandType::DataReg

Its only usage was in BPatch_regExpr that was was deprecated by 4d15de8
in 2008 and removed by f4ee3410b in 2020.

* Use simpler, faster isPowerOf2 in ast.C

* Move isPowerOf2(int,int&) into inst.h

This is the only place it's used now.

* Extract AstNode::format(opCode) into opcode.h

* Remove unneeded include of 'opcode.h'

* Move declaration of emitLoadPreviousStackFrameRegister to registerSpace

This is the only place it's used.

* Remove SCAST_AST macro

It's no longer used.

* Move DCAST_AST to baseTramp.C

That's the only place it's used.

* Clean up comments

* Clean up includes

* Update include guard name in ast.h

* Remove reference-counting in AstNode

1. referenceCount is never directly checked, only modified
2. decRefCount _always_ returns true
3. Callsites for decRefCount only check if it returns true

These combined mean that modifying referenceCount has no observable
side effect.

* Remove unused 'breakOp' operator type

It was added by 0a3392d0e in 2009, but never implemented.

* Remove unused 'doOp' operatory type

It was added by ccc39c2b2 in 1998, but never implemented.

* Remove unused 'funcCallOp' operator type

It was added by 6616f912a in 2009 and removed by 73039f3d931 in 2011.

* Remove unused 'getSysParamOp' operator type

It was added by 0aa3b67be in 1996 for SunOS and
the last vestiges were removed by dee8900 in
2011.

* Remove unused 'getSysRetValOp' operator type

It was added by d2d5831e7 in 1996 for SunOS and
the last vestiges were removed by dee8900 in
2011.

* Remove unused 'loadStateOp','storeStateOp' operator types

They were added by 18ab46621 in 2006 but never implemented.

* Remove unused 'trampPreamble' operator type

Its last usage as an operation was removed by 123a8c7 in 2006.

* Remove unused 'updateCostOp' operator type

Its last usage as an operation was removed by cb0b86cc in 2006.

* Remove unused variable in AstVariableNode ctor



To unsubscribe from these emails, change your notification settings at 
https://github.com/dyninst/dyninst/settings/notifications
_______________________________________________
Dyninst-api mailing list
[email protected]
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api

Reply via email to