mirror of
https://github.com/vtil-project/VTIL-Core
synced 2026-08-17 08:23:03 -04:00
Minor changes, swap unnecessary fassert with dassert.
This commit is contained in:
parent
6c6274fe97
commit
d01191bfed
3 changed files with 15 additions and 11 deletions
|
|
@ -374,6 +374,8 @@ namespace vtil
|
|||
return { register_physical | register_flags, 0, size * 8, offset * 8 };
|
||||
else
|
||||
return { register_physical, ( uint64_t ) base, size * 8, offset * 8, architecture_arm64 };
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -386,10 +388,5 @@ namespace vtil
|
|||
|
||||
// Helper to make undefined of N bits.
|
||||
//
|
||||
static constexpr register_desc make_undefined( bitcnt_t sz )
|
||||
{
|
||||
register_desc copy = UNDEFINED;
|
||||
copy.bit_count = sz;
|
||||
return copy;
|
||||
}
|
||||
static constexpr register_desc make_undefined( bitcnt_t sz ) { return UNDEFINED.select( sz, 0 ); }
|
||||
};
|
||||
|
|
@ -135,7 +135,7 @@ namespace vtil
|
|||
{
|
||||
// Must not be used to allocate an array.
|
||||
//
|
||||
fassert( count == 1 );
|
||||
dassert( count == 1 );
|
||||
|
||||
// Try the fast path where possible.
|
||||
//
|
||||
|
|
@ -191,7 +191,7 @@ namespace vtil
|
|||
{
|
||||
// Must not be used to deallocate an array.
|
||||
//
|
||||
fassert( count == 1 );
|
||||
dassert( count == 1 );
|
||||
|
||||
// Try the fast path where possible.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -688,13 +688,20 @@ namespace vtil::symbolic
|
|||
// this way and additionally we avoid copying where an operand is being simplified
|
||||
// as that can be replaced by a simple swap of shared references.
|
||||
//
|
||||
reference ref = make_local_reference( this );
|
||||
reference ref = ( reference&& ) make_local_reference( this );
|
||||
simplify_expression( ref, prettify );
|
||||
if ( &*ref != this ) operator=( *ref );
|
||||
|
||||
// Set the simplifier hint to indicate skipping further calls to simplify_expression.
|
||||
//
|
||||
simplify_hint = true;
|
||||
ref->simplify_hint = true;
|
||||
|
||||
// If reference is changed, move from it.
|
||||
//
|
||||
if ( ref.get() != this )
|
||||
{
|
||||
if( ref.get_entry()->second.load() == 1 ) operator=( std::move( *ref ) );
|
||||
else operator=( *ref );
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue