From: Daniel F. <zyr...@zy...> - 2004-08-18 09:37:45
|
VM_Magic contains a lot of memory access functions that need to be accessible to MMTk. Other functions (such as those for calling methods and accessing special Jikes registers) should not be accessible from MMTk. I would suggest that these remain in a separate magic class within the RVM. Assuming this is the direction we take, then the use of instance methods on an Address type [e.g. Address y = x.loadAddress();] would remove the need for a functions package. On the other hand if we decide not use instance methods then we should probably use a name such as Memory instead of Magic for the static functions. As for the package name I think functions sounds fine. [Word org.magic.functions.Memory.loadWord(Address);] Cheers, Daniel. -----Original Message----- From: jik...@os... [mailto:jik...@os...] On Behalf Of Steve Blackburn Sent: Wednesday, 18 August 2004 4:00 PM To: jik...@os... Subject: Re: [Jikesrvm-core] putting magic in separate packages Thanks Dave, > <prefix>.functions (Steve, did we have a better name? for the > misc static functions now in VM_Magic). One suggestion that was made in the past week was that we move to using instance methods on address types. If so, many/most of the methods in VM_Magic would be subsumed: VM_Magic.getMemoryWord(ref); becomes ref.getMemoryWord() Obviously this approach would be disruptive to the existing code base but is arguably "nicer", and cleans up VM_Magic significantly. I'm not sure about the rest of the functions in VM_Magic, but .functions or .misc both seem possible. Cheers, --Steve _______________________________________________ Jikesrvm-core mailing list Jik...@os... http://www-124.ibm.com/developerworks/oss/mailman/listinfo/jikesrvm-core |