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
[Solidity] Tuple Support #1647
base: master
Are you sure you want to change the base?
[Solidity] Tuple Support #1647
Conversation
Sync Forked Repo With Main Repo
…or Continue and Break
Rebase
@@ -2602,7 +2830,7 @@ bool solidity_convertert::get_func_decl_ref( | |||
exprt &new_expr) | |||
{ | |||
// Function to configure new_expr that has a +ve referenced id, referring to a function declaration | |||
// This allow to get func symbol before we add it to the symbol table | |||
// This allow to get func syfmbol before we add it to the symbol table |
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.
typo
return output; | ||
} | ||
|
||
std::vector<nlohmann::json> solidity_convertert::make_struct_elementary_types( |
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 think you can obtain the type info in the typeDescriptions
node in each component, right?
You can do something like:
if (get_expr(args.at(i), members.at(i)["typeDescriptions"], init))
return true;
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 have yet to delete this function in case I may use it in the future for an unknown reason. I will delete it shortly
std::string label = std::to_string(expr["id"].get<int>()); | ||
std::string name, id; | ||
name = "tuple#" + label; | ||
id = "sol:@C@" + current_contractName + "@" + name; |
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.
same as above
// e.g. (uint age, uint money) = (....); | ||
if(context.find_symbol(id) != nullptr) | ||
{ | ||
std::cout << "Could not find symbol" << std::endl; |
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.
Maybe just log_error
@@ -40,7 +41,7 @@ solidity_convertert::solidity_convertert( | |||
|
|||
bool solidity_convertert::convert() | |||
{ | |||
// This function consists of two parts: | |||
// This function consists of two output: |
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 think we keep the word "parts"
Overall, it looks good. Just some small comments:
contract Base
{
uint x;
bool y;
constructor() { (x,y) = (1,true); }
}
contract Derived is Base
{
function test() public
{
assert(y == true);
}
} |
Tuple support
Merge branch 'esbmc:master' into tuple_support
No description provided.