Skip to content

Refactor the mechanism for supplying arguments in codegen #16529

@nikola-matic

Description

@nikola-matic

The recent bug (fixed) exposed a shortcoming in the manner in which we deal with supplying function parameters at their callsite (during code generation) depending on whether said parameters were provided in declaration order or as named parameters. If former, the arguments should be supplied using the arguments() function, whereas if named parameters are supported for that particular type of function call, then sortedArguments() must be used in order to make sure that the passed parameters (call site) are supplied in the correct order (declaration site).

One way to do this would be to make additional use of the FuncCallArgument struct as suggested by @cameel; other approaches can also be investigated for merit.

Ultimately, we should end up with a unique 'interface' that will always supply the parameters in correct order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    medium effortDefault level of effortmedium impactDefault level of impactmust have eventuallySomething we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.refactor

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions