diff options
| author | Mark Rowe <mark@vector35.com> | 2025-10-20 23:28:36 -0700 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2025-10-22 07:33:29 -0700 |
| commit | 4c8fa3972ad50c07631418620eb9be44d629b2ae (patch) | |
| tree | 449f00df976cc4a15602d6af4a196a91f54b6a69 /function.cpp | |
| parent | 623f07a2b44ac9dbc86bab2ea011ee5899664f15 (diff) | |
Move implementations of key functions on Variable and SSAVariable to headers
These types are heavily used as map keys so allowing the compiler to
inline these functions makes map lookups cheaper.
Diffstat (limited to 'function.cpp')
| -rw-r--r-- | function.cpp | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/function.cpp b/function.cpp index 1d35aa7d..df41b977 100644 --- a/function.cpp +++ b/function.cpp @@ -29,69 +29,6 @@ using namespace BinaryNinja; using namespace std; -Variable::Variable() -{ - type = RegisterVariableSourceType; - index = 0; - storage = 0; -} - - -Variable::Variable(BNVariableSourceType t, uint32_t i, uint64_t s) -{ - type = t; - index = i; - storage = s; -} - - -Variable::Variable(const BNVariable& var) -{ - type = var.type; - index = var.index; - storage = var.storage; -} - - -Variable::Variable(const Variable& var) -{ - type = var.type; - index = var.index; - storage = var.storage; -} - - -Variable& Variable::operator=(const Variable& var) -{ - type = var.type; - index = var.index; - storage = var.storage; - return *this; -} - - -bool Variable::operator==(const Variable& var) const -{ - if (type != var.type) - return false; - if (index != var.index) - return false; - return storage == var.storage; -} - - -bool Variable::operator!=(const Variable& var) const -{ - return !((*this) == var); -} - - -bool Variable::operator<(const Variable& var) const -{ - return ToIdentifier() < var.ToIdentifier(); -} - - uint64_t Variable::ToIdentifier() const { return BNToVariableIdentifier(this); |
