truffleruby icon indicating copy to clipboard operation
truffleruby copied to clipboard

Avoid Env#asGuestValue for Truffle::Interop methods

Open eregon opened this issue 4 years ago • 1 comments

From discussion at https://github.com/oracle/truffleruby/issues/2257#issuecomment-785870837

For Truffle::Interop.source_location, [String, Integer] seems obvious.

For date/time-related InteropLibrary messages, it's not that clear, but at least we should treat foreign date+time+zone the same as Ruby's Time.

@fniephaus How do you actually use the result of asGuestValue? It seems not usable at all from https://github.com/oracle/truffleruby/issues/2257#issuecomment-785986474.

eregon avatar Feb 25 '21 16:02 eregon

I must admit I don't understand why asGuestValue doesn't work. Is it because it considers visibility of packages? Anyway, we have our own wrapper class for exposing host objects in TruffleSqueak, which shamelessly exposes everything possible to guest languages.

fniephaus avatar Feb 27 '21 11:02 fniephaus