-
Notifications
You must be signed in to change notification settings - Fork 6
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
TruffleSOM does not accept writes to method arguments #17
Comments
Hm, this is indeed a departure from SOM. Though, it is the standard semantics in various Smalltalks, I believe. Beside |
I have tested this now with Pharo (6.1) which does not allow a write to an argument. I'm really fine with the readonly behaviour. Just wondering, why this went so long (24 Oct 2013) unnoticed ;) I was surprised, because SOM accepted it. I write most source code in Java - where the write to an argument is fine, so the argument write didn't trigger anything. |
Yeah, I don't remember any specific reason of disallowing the writes. But, I think, it's not a bad idea to stick more strictly to the common Smalltalks. So, I'll close this issue, and mark it as a bug for SOM to have writable arguments. Thanks for pointing it out :) Thanks! |
Hmm, needs another careful thought as per discussion on SOM-st/SOM#7 |
SOM accepts writes to method arguments. TruffleSOM throws a runtime exception at compile time. Is this the expected behaviour?
I have written the following attached TestCase ArgumentReadonlyTest.som.txt. The runtime exception is found in the attached file
exception.txt.
('mysom' is 'som' with the change from 'som.vm.Universe' to 'trufflesom.vm.Universe'.)
Maybe the root cause has something to do with the setting von JAVA_HOME and GRAAL_HOME? I'm only able to run the provided samples in truffleSOM if JAVA_HOME is identical to GRAAL_HOME and points to the 'normal' Java VM. If GRAAL_HOME points to '... graalvm-ce-1.0.0-rc8/Contents/Home' I get the exception, that 'Caused by: java.lang.AssertionError: Only one implementation Engine.Impl allowed.'.
The text was updated successfully, but these errors were encountered: