-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Add DebugData to AssemblyItem. #14841
Conversation
0a11f83
to
3c4b64e
Compare
617c950
to
7657bba
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.
I'd call this almost done short of some very minor tweaks - nice that it just seems to work so far without too many complications!
2c7d4ab
to
3d9857c
Compare
fe5d789
to
6bd3e72
Compare
libevmasm/AssemblyItem.h
Outdated
return m_debugData->nativeLocation; | ||
} | ||
|
||
void setDebugData(langutil::DebugData::ConstPtr const& _debugData) { m_debugData = _debugData; } |
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.
void setDebugData(langutil::DebugData::ConstPtr const& _debugData) { m_debugData = _debugData; } | |
void setDebugData(langutil::DebugData::ConstPtr const& _debugData) | |
{ | |
solAssert(_debugData); | |
m_debugData = _debugData; | |
} |
if we want to guarantee that there's always a valid one there, we also need to do it here.
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.
If you want, while you're at it: passing the pointer by value and moving it is, I think, a bit more idiomatic for shared pointers... but also doesn't matter too much (and it's also not consistently done one way or the other on develop
either)
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.
You're right! I change that only where it is possible to use std::move
- e.g. if there is exactly one other place where this pointer can be moved. I let it be a constant reference, when the pointer is used to set multiple things.
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.
Ok, we somehow lost the change for #14841 (comment) (although it's also not exactly super vital) - and apart from that
#14841 (comment)
is the only thing missing I can still find.
4ebddfd
to
4032b59
Compare
No description provided.