-
Notifications
You must be signed in to change notification settings - Fork 41
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
Context.getVar failing compilation (and likely can't be deserialized) #978
Comments
This is a limitation of MethodCall (see this ScalaDoc) Specifically for this use case, since CONTEXT is singleton, every CONTEXT.getVar method call can be (and should be) compiled down to GetVar node, thus eliminating this specific MethodCall. The elimination would even work in lambdas like Added a new issue #980 |
Not necessary, see deserializeRaw implementation
You can replace method call with GetVar in compiler, but then what to do with the method itself, it is still available. |
Well, if we will have either PolyMethodCall of just generalized MethodCall itself supporing types serialization then we can have CONTEXT.getVar as MethodCall in the ErgoTree and execute it at runtime. So lowering will be a compilation option (on or off). In such case this issue can be fixed completely. |
test for method-call version of
getVar
(you can put it inBasicOpsSpecification
) is failing compilation(and all the method calls with parametrized types as well)
Also, after fixing compilation serialization will be failed for
Context.getVar[T]
, asMethodCallSerializer
is not serializing and so not able to restoreT
The text was updated successfully, but these errors were encountered: