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
moreover there is now also a third one - CoerceNothing.
At various places we are using different combinations of these nodes. That results in inconsistencies in treating foreign values. Some may be converted when passed as parameters, but not converted when obtained from a method or read from an array. We have to unify all these boundary conversions into a single Node and use it everywhere.
This is closely related to runtime type system (not the one @ekmett is working on, internal to Enso engine). We have to guarantee the conversion node accepts all interop valid values and makes sure all of them are consistently converted to on of Enso supported types.
Btw. rule of Truffle Interop is: delay conversions of TruffleObject instances as long as possible. CoercePrimitiveNode does convert - e.g. it is probably not the right approach and HostValueToEnsoNode is better.
Comments:
Just to clarify - CoerceNothing was introduced separately because CoercePrimitiveNode is in epb and the former needs Nothing. (Hubert Plociniczak - Sep 13, 2022)
Can the dependency of epb be reverted? E.g. move all the code into `runtime` and only leave the language registration in the `runtime-language-epb`? Then we wouldn't have to have two conversion nodes and could unify around a single node to convert it all. EPB isn't the only place that requires conversions. Array, Vector builtins, Java inteorp need that as well. (jaroslavtulach - Sep 15, 2022)
The text was updated successfully, but these errors were encountered:
This task is automatically imported from the old Task Issue Board and it was originally created by jaroslavtulach.
Original issue is here.
While working on #183000876 it come to my attention that there are two similar, yet different nodes performing a very important functionality:
At various places we are using different combinations of these nodes. That results in inconsistencies in treating foreign values. Some may be converted when passed as parameters, but not converted when obtained from a method or read from an array. We have to unify all these boundary conversions into a single
Node
and use it everywhere.This is closely related to runtime type system (not the one @ekmett is working on, internal to Enso engine). We have to guarantee the conversion node accepts all interop valid values and makes sure all of them are consistently converted to on of Enso supported types.
Btw. rule of Truffle Interop is: delay conversions of
TruffleObject
instances as long as possible. CoercePrimitiveNode does convert - e.g. it is probably not the right approach and HostValueToEnsoNode is better.Comments:
Just to clarify - CoerceNothing was introduced separately because CoercePrimitiveNode is in epb and the former needs Nothing. (Hubert Plociniczak - Sep 13, 2022)
Can the dependency of epb be reverted? E.g. move all the code into `runtime` and only leave the language registration in the `runtime-language-epb`? Then we wouldn't have to have two conversion nodes and could unify around a single node to convert it all. EPB isn't the only place that requires conversions. Array, Vector builtins, Java inteorp need that as well. (jaroslavtulach - Sep 15, 2022)
The text was updated successfully, but these errors were encountered: