-
Notifications
You must be signed in to change notification settings - Fork 3
Feature/wire 194 abigen support enum #15
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
| // Use the enum's integer (underlying) type for storage mapping | ||
| td.type = translate_type(ED->getIntegerType()); | ||
| if (!td.new_type_name.empty() && !td.type.empty()) { | ||
| _abi.typedefs.insert(td); |
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 don't see any tests for this.
Did you verify this works with abieos and abi_serializer of wire-sysio and WharfKit?
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 did verify in abieos and a system contract depot, was the test point.
The problem with writing a test, is that the actual source is in cdt, but the compilation unit is in cdt-llvm...happy to have a quick chat and discuss?
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.
@heifner Added test @ tools/toolchain-tester/examples/abigen-pass/abigen_test_enum_example.cpp.
Should be good to go now
…nk creation.
## ADDED `ENUM` SUPPORT: `abigen` support via `typedef` for `enum` (NOT `enum class`)
Generated ABI with the inclusion of `enum` types.
```json
{
...,
"version": "sysio::abi/1.2",
"types": [
{
"new_type_name": "chain_kind",
"type": "uint8"
}
],
...
}
```
## ++ Eliminated unnecessary `make_directory` and `create_symlink` calls from CMake macros, streamlining the installation process. Added support for handling plain C++ enums in `abigen`, allowing typedefs to map enums to their underlying storage types.
…olchain-tester`. - Introduced abigen test example for enum support with corresponding ABI JSON. - Re-added required header `bluegrass/meta/preprocessor.hpp`.
2f05ff6 to
1bdf904
Compare
…validate enum support with [CDT PR #15](Wire-Network/wire-cdt#15)
…validate enum support with [CDT PR #15](Wire-Network/wire-cdt#15)
…validate enum support with [CDT PR #15](Wire-Network/wire-cdt#15)
Change Description
API Changes
Documentation Additions