-
Notifications
You must be signed in to change notification settings - Fork 277
object_size can now do objects with dynamic size #2852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
30aa417
to
0149e41
Compare
407eb86
to
0149e41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with some suggestions below to make understanding the code easier.
if(to_integer(size_expr, object_size)) | ||
continue; | ||
object_size = | ||
typecast_exprt::conditional_cast(size_expr, postponed.expr.type()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the code around here be refactored so that it is trivial that object_size
will always be initialised when used below? I'd suggest:
if(expr.id() != ID_symbol)
continue;
const size_expr = size_of_expr(type, ns);
if(size_expr.is_nil())
continue;
const exprt object_size =
typecast_exprt::conditional_cast(size_expr, postponed.expr.type());
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
0149e41
to
763d005
Compare
@@ -786,24 +786,19 @@ void bv_pointerst::do_postponed( | |||
{ | |||
const exprt &expr=*it; | |||
|
|||
mp_integer object_size; | |||
exprt object_size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer needed.
05c7f6e
to
86f4394
Compare
86f4394
to
5641ebc
Compare
5641ebc
to
11431ea
Compare
No description provided.