Skip to content

Create and call pointers#262

Merged
shargon merged 14 commits intomasterfrom
callbacks
May 7, 2020
Merged

Create and call pointers#262
shargon merged 14 commits intomasterfrom
callbacks

Conversation

@shargon
Copy link
Copy Markdown
Member

@shargon shargon commented Apr 30, 2020

Require neo-project/neo-vm#317
Required for neo-project/neo#284

Also was added a DROP optimization rule

Optimized tests require #263

@shargon shargon changed the title Create callback Create callbacks Apr 30, 2020
@shargon shargon changed the title Create callbacks Create pointers May 1, 2020
@shargon shargon marked this pull request as ready for review May 1, 2020 13:35
@shargon shargon changed the title Create pointers Create and call pointers May 1, 2020
@shargon shargon requested a review from lightszero May 2, 2020 09:03
lightszero
lightszero previously approved these changes May 2, 2020
@shargon
Copy link
Copy Markdown
Member Author

shargon commented May 6, 2020

We need to wait for #263

@shargon shargon requested a review from lightszero May 6, 2020 12:57
@shargon
Copy link
Copy Markdown
Member Author

shargon commented May 6, 2020

Ready to merge

@shargon shargon merged commit 63bad2a into master May 7, 2020
@shargon shargon deleted the callbacks branch May 7, 2020 07:24
@ProDog
Copy link
Copy Markdown
Contributor

ProDog commented May 15, 2020

I have tested it.

  • The callback function runs normally without arguments.
  • An error occurred while compiling the contract, when the callback function has arguments:

image

In addition, an exception is thrown when deploy contract if CreateFuncPointer() is public:

image

@shargon
Copy link
Copy Markdown
Member Author

shargon commented May 15, 2020

Could you create a PR with the failing UT?

@ProDog
Copy link
Copy Markdown
Contributor

ProDog commented May 15, 2020

Could you create a PR with the failing UT?

I have added it #269.

Jim8y pushed a commit that referenced this pull request Aug 3, 2025
* Create callback
* Add DROP
* Test it optimized and not
* Fix test without optimization
* Fix One UT
* Call pointer
* Remove comment
* Add UT for DROP optimization
* Update Neo.Compiler.MSIL.csproj
* Fix merge
* Update nuget
Co-authored-by: lights li <lightsever@hotmail.com>
Jim8y pushed a commit that referenced this pull request Aug 18, 2025
* Create callback

* Add DROP

* Test it optimized and not

* Fix test without optimization

* Fix One UT

* Call pointer

* Remove comment

* Add UT for DROP optimization

* Update Neo.Compiler.MSIL.csproj

* Fix merge

* Update nuget

Co-authored-by: lights li <lightsever@hotmail.com>
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.

3 participants