« Return to Thread: [rvm-core] [Re possible bug]but the value is conveted to long and int?

Re: [rvm-core] [Re possible bug]but the value is conveted to long and int?

by Eliot Moss :: Rate this Message:

Reply to Author | View in Thread

Da Feng wrote:
> Does magic treat these setInt, setLong, setByte differently?
>  long bits = Magic.getLongAtOffset(obj, offset);
>
> then
> Magic.setLongAtOffset(newObj, offset, bits);

Differently from what? They are for fetching and setting
ranges of bytes at specified offsets, and can be used to
index into any kind of object at positive or negative
offsets. If the offset is a constant, and corresponds
to the position of a declared field, then they will act
like a field access (though possibly without any
associated barrier (non-pointer fields do not usually
have a barrier, however)). But you can use these to
access into any structure, and could even read or
update a byte in the middle of a pointer or something,
that is, they are not type safe and therefore need
to be used with care. The offset also need not be a
constant, but can be calculated.

Typically these are appropriate for internal system
components, such as garbage collectors.

Best wishes -- Eliot Moss

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Jikesrvm-core mailing list
Jikesrvm-core@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-core

 « Return to Thread: [rvm-core] [Re possible bug]but the value is conveted to long and int?