Mercurial > hg > truffle
diff graal/com.oracle.graal.word/src/com/oracle/graal/word/Word.java @ 10759:7f186f1486f7
Use initializing write node in object clone snippets.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Mon, 15 Jul 2013 16:24:08 +0200 |
parents | a6d6e6afd897 |
children | 69e305a5cf09 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.word/src/com/oracle/graal/word/Word.java Mon Jul 15 16:24:03 2013 +0200 +++ b/graal/com.oracle.graal.word/src/com/oracle/graal/word/Word.java Mon Jul 15 16:24:08 2013 +0200 @@ -61,6 +61,7 @@ READ, READ_COMPRESSED, WRITE, + INITIALIZE, ZERO, FROM_UNSIGNED, FROM_SIGNED, @@ -758,6 +759,12 @@ } @Override + @Operation(opcode = Opcode.INITIALIZE) + public void initializeWord(WordBase offset, WordBase val, LocationIdentity locationIdentity) { + unsafe.putAddress(add((Word) offset).unbox(), ((Word) val).unbox()); + } + + @Override @Operation(opcode = Opcode.WRITE) public native void writeObject(WordBase offset, Object val, LocationIdentity locationIdentity); @@ -810,6 +817,12 @@ } @Override + @Operation(opcode = Opcode.INITIALIZE) + public void initializeWord(int offset, WordBase val, LocationIdentity locationIdentity) { + initializeWord(signed(offset), val, locationIdentity); + } + + @Override @Operation(opcode = Opcode.WRITE) public void writeObject(int offset, Object val, LocationIdentity locationIdentity) { writeObject(signed(offset), val, locationIdentity);