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

write to memory (cheap) during execution and then only copy out to storage (expensive) what's needed #362

Closed
ivoysey opened this issue Aug 17, 2021 · 2 comments
Assignees
Milestone

Comments

@ivoysey
Copy link
Collaborator

ivoysey commented Aug 17, 2021

this should allow us to have a linked-list example working; after #371

@ivoysey ivoysey added this to the m1 milestone Sep 13, 2021
@ivoysey ivoysey self-assigned this Sep 13, 2021
@ivoysey
Copy link
Collaborator Author

ivoysey commented Nov 5, 2021

solc outputs something like this for a setter that takes one integer argument,

                case 0x60fe47b1
                {
                    // set(uint256)                                                                                              

                    if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
                    let param_0 :=  abi_decode_tuple_t_uint256(4, calldatasize())
                    fun_set_13(param_0)
                    let memPos := allocate_unbounded()
                    let memEnd := abi_encode_tuple__to__fromStack(memPos  )
                    return(memPos, sub(memEnd, memPos))

which pulls the argument from the stack. it's not clear to me how to do this when the first argument is the added implicit this argument that allows us to allocate into memory. from the outside there may not even be an instance of the object created, and in general actually won't be, so what would you even try to pass there?

@ivoysey
Copy link
Collaborator Author

ivoysey commented Nov 12, 2021

this issue doesn't make sense with respect to the current design as stated, so i'm going to close it as part of a clean up pass on the project board

@ivoysey ivoysey closed this as completed Nov 12, 2021
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

No branches or pull requests

1 participant