Skip to content
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

Improve top level objects support #728

Merged
merged 8 commits into from
Dec 17, 2020
Merged

Improve top level objects support #728

merged 8 commits into from
Dec 17, 2020

Conversation

montyly
Copy link
Member

@montyly montyly commented Dec 14, 2020

This is a first step towards better handling of top-level objects

  • Split declaration.Enum/Structure to EnumContract/EnumToplevel (same for structure)
  • Remove the placeholder top level contract
  • Update the parsing accordingly

This PR changes the API, so we will need to evaluate the impact of the public/private detectors.

Related: #619, #708.

- Split declaration.Enum/Structure to EnumContract/EnumToplevel (same
for structure)
- Update the parsing accordingly
@lgtm-com
Copy link

lgtm-com bot commented Dec 14, 2020

This pull request introduces 4 alerts and fixes 2 when merging 0a7738d into e52a2ae - view on LGTM.com

new alerts:

  • 2 for Unused import
  • 2 for Missing call to __init__ during object initialization

fixed alerts:

  • 2 for Missing call to __init__ during object initialization

@lgtm-com
Copy link

lgtm-com bot commented Dec 14, 2020

This pull request introduces 2 alerts and fixes 2 when merging c0406c3 into e52a2ae - view on LGTM.com

new alerts:

  • 2 for Missing call to __init__ during object initialization

fixed alerts:

  • 2 for Missing call to __init__ during object initialization

@lgtm-com
Copy link

lgtm-com bot commented Dec 15, 2020

This pull request introduces 2 alerts and fixes 2 when merging fe50daa into 1c12a13 - view on LGTM.com

new alerts:

  • 2 for Missing call to __init__ during object initialization

fixed alerts:

  • 2 for Missing call to __init__ during object initialization

@montyly montyly changed the title Change handling of top level enum/struct Change handling of top level objects Dec 16, 2020
@montyly
Copy link
Member Author

montyly commented Dec 16, 2020

Added support for top-level variable and functions

The support for top-level functions is partial. Among other, what is missing:

  • Legacy ast support (impact mostly dapp codebases)
  • import X as B is not correctly supported if B is used to refer to top level objects. For example, B.function will lead to generate a High level call instead of an internal call at the IR level

@lgtm-com
Copy link

lgtm-com bot commented Dec 16, 2020

This pull request introduces 6 alerts and fixes 3 when merging 330325a into 1c12a13 - view on LGTM.com

new alerts:

  • 3 for Unused import
  • 2 for Missing call to __init__ during object initialization
  • 1 for __eq__ not overridden when adding attributes

fixed alerts:

  • 3 for Missing call to __init__ during object initialization

@montyly montyly changed the title Change handling of top level objects Improve top level objects support Dec 17, 2020
Fix dupplicate parsers
Minor code improvements
Prevent the CI to run on solc 0.8
@lgtm-com
Copy link

lgtm-com bot commented Dec 17, 2020

This pull request introduces 3 alerts and fixes 3 when merging d778ed6 into 1c12a13 - view on LGTM.com

new alerts:

  • 2 for Missing call to __init__ during object initialization
  • 1 for __eq__ not overridden when adding attributes

fixed alerts:

  • 3 for Missing call to __init__ during object initialization

@lgtm-com
Copy link

lgtm-com bot commented Dec 17, 2020

This pull request introduces 2 alerts and fixes 3 when merging d1eee22 into 1c12a13 - view on LGTM.com

new alerts:

  • 2 for Missing call to __init__ during object initialization

fixed alerts:

  • 3 for Missing call to __init__ during object initialization

@montyly montyly merged commit 7d3bf29 into dev Dec 17, 2020
@montyly montyly deleted the dev-top-level-elements branch December 17, 2020 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant