You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user does not define the compiled smart contract class and its methods as static, the compiler builds an unnecessary argument, and input it as arg 0 (this of the class object) for all the non-static methods. An example is the compilation results of neo-devpack-dotnet/tests/Neo.Compiler.CSharp.TestContracts/Contract_Abort.cs (manifest and dumpnef affliated). Maybe we can avoid generating this unnecessary arg 0 in the compiler.
If (in the future) we have a symbolic VM that analyzes reads and writes to storage evaluation stack, static fields, arguments and local varaiables, we may try to identify the unnecessary constructions and delete the codes in the optimizer.
This problem can be handled by #1185 in most cases. But in polymorphism tests, I did not remove the constructors in a derived smart contract class, because base may be called at any time.
When a user does not define the compiled smart contract class and its methods as static, the compiler builds an unnecessary argument, and input it as arg 0 (
this
of the class object) for all the non-static methods. An example is the compilation results ofneo-devpack-dotnet/tests/Neo.Compiler.CSharp.TestContracts/Contract_Abort.cs
(manifest and dumpnef affliated). Maybe we can avoid generating this unnecessary arg 0 in the compiler.If (in the future) we have a symbolic VM that analyzes reads and writes to storage evaluation stack, static fields, arguments and local varaiables, we may try to identify the unnecessary constructions and delete the codes in the optimizer.
Contract_Abort.nef.txt
Contract_Abort.manifest.json
The text was updated successfully, but these errors were encountered: