annotate graal/com.oracle.graal.word/src/com/oracle/graal/word/ObjectAccess.java @ 21032:9507c925abe9

fix
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Sat, 18 Apr 2015 19:48:30 +0200
parents faebb143dab2
children 48c1ebd24120
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
1 /*
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2013, 2013, Oracle and/or its affiliates. All rights reserved.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
4 *
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
8 *
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
13 * accompanied this code).
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
14 *
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
18 *
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
21 * questions.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
22 */
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
23 package com.oracle.graal.word;
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
24
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
25 import com.oracle.graal.api.meta.*;
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
26 import com.oracle.graal.nodes.extended.*;
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
27 import com.oracle.graal.word.Word.Opcode;
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
28 import com.oracle.graal.word.Word.Operation;
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
29
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
30 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
31 * Low-level memory access for Objects. Similarly to the readXxx and writeXxx methods defined for
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
32 * {@link Pointer}, these methods access the raw memory without any null checks, read- or write
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
33 * barriers. When the VM uses compressed pointers, then readObject and writeObject methods access
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
34 * compressed pointers.
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
35 */
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
36 public final class ObjectAccess {
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
37
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
38 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
39 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
40 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
41 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
42 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
43 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
44 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
45 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
46 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
47 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
48 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
49 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
50 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
51 public static native byte readByte(Object object, WordBase offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
52
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
53 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
54 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
55 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
56 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
57 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
58 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
59 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
60 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
61 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
62 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
63 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
64 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
65 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
66 public static native char readChar(Object object, WordBase offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
67
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
68 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
69 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
70 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
71 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
72 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
73 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
74 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
75 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
76 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
77 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
78 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
79 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
80 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
81 public static native short readShort(Object object, WordBase offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
82
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
83 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
84 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
85 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
86 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
87 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
88 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
89 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
90 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
91 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
92 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
93 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
94 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
95 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
96 public static native int readInt(Object object, WordBase offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
97
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
98 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
99 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
100 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
101 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
102 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
103 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
104 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
105 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
106 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
107 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
108 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
109 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
110 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
111 public static native long readLong(Object object, WordBase offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
112
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
113 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
114 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
115 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
116 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
117 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
118 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
119 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
120 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
121 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
122 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
123 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
124 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
125 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
126 public static native float readFloat(Object object, WordBase offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
127
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
128 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
129 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
130 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
131 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
132 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
133 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
134 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
135 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
136 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
137 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
138 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
139 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
140 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
141 public static native double readDouble(Object object, WordBase offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
142
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
143 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
144 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
145 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
146 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
147 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
148 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
149 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
150 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
151 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
152 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
153 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
154 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
155 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
156 public static native Word readWord(Object object, WordBase offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
157
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
158 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
159 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
160 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
161 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
162 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
163 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
164 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
165 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
166 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
167 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
168 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
169 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
170 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
171 public static native Object readObject(Object object, WordBase offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
172
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
173 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
174 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
175 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
176 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
177 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
178 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
179 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
180 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
181 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
182 public static native byte readByte(Object object, int offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
183
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
184 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
185 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
186 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
187 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
188 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
189 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
190 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
191 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
192 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
193 public static native char readChar(Object object, int offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
194
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
195 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
196 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
197 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
198 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
199 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
200 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
201 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
202 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
203 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
204 public static native short readShort(Object object, int offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
205
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
206 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
207 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
208 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
209 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
210 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
211 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
212 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
213 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
214 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
215 public static native int readInt(Object object, int offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
216
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
217 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
218 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
219 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
220 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
221 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
222 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
223 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
224 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
225 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
226 public static native long readLong(Object object, int offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
227
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
228 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
229 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
230 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
231 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
232 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
233 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
234 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
235 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
236 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
237 public static native float readFloat(Object object, int offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
238
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
239 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
240 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
241 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
242 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
243 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
244 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
245 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
246 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
247 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
248 public static native double readDouble(Object object, int offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
249
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
250 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
251 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
252 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
253 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
254 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
255 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
256 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
257 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
258 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
259 public static native Word readWord(Object object, int offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
260
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
261 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
262 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
263 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
264 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
265 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
266 * @param locationIdentity the identity of the read (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
267 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
268 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
269 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
270 public static native Object readObject(Object object, int offset, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
271
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
272 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
273 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
274 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
275 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
276 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
277 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
278 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
279 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
280 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
281 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
282 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
283 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
284 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
285 public static native void writeByte(Object object, WordBase offset, byte val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
286
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
287 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
288 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
289 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
290 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
291 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
292 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
293 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
294 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
295 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
296 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
297 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
298 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
299 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
300 public static native void writeChar(Object object, WordBase offset, char val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
301
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
302 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
303 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
304 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
305 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
306 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
307 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
308 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
309 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
310 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
311 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
312 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
313 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
314 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
315 public static native void writeShort(Object object, WordBase offset, short val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
316
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
317 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
318 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
319 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
320 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
321 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
322 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
323 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
324 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
325 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
326 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
327 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
328 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
329 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
330 public static native void writeInt(Object object, WordBase offset, int val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
331
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
332 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
333 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
334 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
335 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
336 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
337 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
338 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
339 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
340 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
341 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
342 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
343 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
344 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
345 public static native void writeLong(Object object, WordBase offset, long val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
346
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
347 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
348 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
349 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
350 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
351 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
352 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
353 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
354 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
355 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
356 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
357 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
358 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
359 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
360 public static native void writeFloat(Object object, WordBase offset, float val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
361
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
362 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
363 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
364 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
365 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
366 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
367 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
368 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
369 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
370 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
371 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
372 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
373 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
374 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
375 public static native void writeDouble(Object object, WordBase offset, double val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
376
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
377 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
378 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
379 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
380 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
381 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
382 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
383 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
384 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
385 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
386 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
387 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
388 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
389 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
390 public static native void writeWord(Object object, WordBase offset, WordBase val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
391
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
392 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
393 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
394 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
395 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
396 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
397 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
398 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
399 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
400 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
401 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
402 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
403 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
404 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
405 public static native void writeObject(Object object, WordBase offset, Object val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
406
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
407 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
408 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
409 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
410 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
411 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
412 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
413 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
414 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
415 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
416 public static native void writeByte(Object object, int offset, byte val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
417
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
418 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
419 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
420 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
421 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
422 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
423 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
424 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
425 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
426 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
427 public static native void writeChar(Object object, int offset, char val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
428
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
429 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
430 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
431 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
432 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
433 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
434 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
435 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
436 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
437 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
438 public static native void writeShort(Object object, int offset, short val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
439
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
440 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
441 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
442 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
443 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
444 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
445 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
446 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
447 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
448 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
449 public static native void writeInt(Object object, int offset, int val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
450
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
451 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
452 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
453 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
454 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
455 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
456 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
457 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
458 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
459 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
460 public static native void writeLong(Object object, int offset, long val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
461
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
462 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
463 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
464 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
465 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
466 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
467 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
468 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
469 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
470 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
471 public static native void writeFloat(Object object, int offset, float val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
472
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
473 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
474 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
475 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
476 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
477 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
478 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
479 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
480 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
481 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
482 public static native void writeDouble(Object object, int offset, double val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
483
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
484 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
485 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
486 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
487 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
488 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
489 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
490 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
491 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
492 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
493 public static native void writeWord(Object object, int offset, WordBase val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
494
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
495 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
496 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
497 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
498 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
499 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
500 * @param locationIdentity the identity of the write (see {@link LocationNode})
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
501 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
502 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
503 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
504 public static native void writeObject(Object object, int offset, Object val, LocationIdentity locationIdentity);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
505
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
506 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
507 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
508 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
509 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
510 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
511 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
512 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
513 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
514 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
515 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
516 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
517 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
518 public static native byte readByte(Object object, WordBase offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
519
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
520 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
521 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
522 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
523 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
524 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
525 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
526 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
527 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
528 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
529 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
530 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
531 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
532 public static native char readChar(Object object, WordBase offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
533
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
534 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
535 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
536 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
537 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
538 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
539 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
540 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
541 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
542 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
543 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
544 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
545 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
546 public static native short readShort(Object object, WordBase offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
547
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
548 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
549 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
550 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
551 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
552 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
553 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
554 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
555 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
556 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
557 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
558 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
559 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
560 public static native int readInt(Object object, WordBase offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
561
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
562 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
563 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
564 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
565 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
566 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
567 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
568 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
569 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
570 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
571 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
572 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
573 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
574 public static native long readLong(Object object, WordBase offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
575
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
576 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
577 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
578 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
579 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
580 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
581 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
582 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
583 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
584 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
585 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
586 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
587 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
588 public static native float readFloat(Object object, WordBase offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
589
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
590 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
591 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
592 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
593 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
594 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
595 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
596 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
597 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
598 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
599 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
600 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
601 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
602 public static native double readDouble(Object object, WordBase offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
603
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
604 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
605 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
606 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
607 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
608 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
609 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
610 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
611 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
612 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
613 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
614 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
615 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
616 public static native Word readWord(Object object, WordBase offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
617
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
618 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
619 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
620 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
621 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
622 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
623 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
624 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
625 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
626 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
627 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
628 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
629 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
630 public static native Object readObject(Object object, WordBase offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
631
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
632 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
633 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
634 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
635 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
636 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
637 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
638 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
639 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
640 public static native byte readByte(Object object, int offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
641
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
642 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
643 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
644 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
645 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
646 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
647 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
648 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
649 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
650 public static native char readChar(Object object, int offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
651
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
652 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
653 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
654 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
655 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
656 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
657 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
658 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
659 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
660 public static native short readShort(Object object, int offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
661
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
662 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
663 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
664 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
665 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
666 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
667 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
668 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
669 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
670 public static native int readInt(Object object, int offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
671
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
672 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
673 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
674 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
675 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
676 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
677 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
678 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
679 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
680 public static native long readLong(Object object, int offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
681
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
682 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
683 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
684 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
685 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
686 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
687 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
688 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
689 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
690 public static native float readFloat(Object object, int offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
691
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
692 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
693 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
694 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
695 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
696 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
697 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
698 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
699 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
700 public static native double readDouble(Object object, int offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
701
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
702 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
703 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
704 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
705 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
706 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
707 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
708 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
709 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
710 public static native Word readWord(Object object, int offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
711
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
712 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
713 * Reads the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
714 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
715 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
716 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
717 * @return the result of the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
718 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
719 @Operation(opcode = Opcode.READ_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
720 public static native Object readObject(Object object, int offset);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
721
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
722 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
723 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
724 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
725 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
726 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
727 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
728 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
729 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
730 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
731 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
732 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
733 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
734 public static native void writeByte(Object object, WordBase offset, byte val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
735
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
736 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
737 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
738 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
739 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
740 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
741 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
742 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
743 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
744 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
745 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
746 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
747 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
748 public static native void writeChar(Object object, WordBase offset, char val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
749
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
750 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
751 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
752 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
753 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
754 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
755 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
756 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
757 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
758 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
759 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
760 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
761 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
762 public static native void writeShort(Object object, WordBase offset, short val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
763
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
764 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
765 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
766 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
767 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
768 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
769 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
770 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
771 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
772 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
773 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
774 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
775 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
776 public static native void writeInt(Object object, WordBase offset, int val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
777
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
778 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
779 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
780 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
781 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
782 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
783 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
784 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
785 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
786 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
787 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
788 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
789 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
790 public static native void writeLong(Object object, WordBase offset, long val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
791
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
792 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
793 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
794 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
795 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
796 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
797 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
798 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
799 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
800 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
801 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
802 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
803 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
804 public static native void writeFloat(Object object, WordBase offset, float val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
805
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
806 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
807 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
808 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
809 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
810 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
811 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
812 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
813 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
814 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
815 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
816 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
817 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
818 public static native void writeDouble(Object object, WordBase offset, double val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
819
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
820 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
821 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
822 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
823 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
824 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
825 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
826 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
827 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
828 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
829 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
830 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
831 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
832 public static native void writeWord(Object object, WordBase offset, WordBase val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
833
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
834 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
835 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
836 * <p>
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
837 * The offset is always treated as a {@link Signed} value. However, the static type is
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
838 * {@link WordBase} to avoid the frequent casts of {@link Unsigned} values (where the caller
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
839 * knows that the highest-order bit of the unsigned value is never used).
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
840 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
841 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
842 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
843 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
844 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
845 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
846 public static native void writeObject(Object object, WordBase offset, Object val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
847
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
848 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
849 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
850 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
851 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
852 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
853 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
854 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
855 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
856 public static native void writeByte(Object object, int offset, byte val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
857
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
858 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
859 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
860 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
861 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
862 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
863 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
864 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
865 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
866 public static native void writeChar(Object object, int offset, char val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
867
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
868 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
869 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
870 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
871 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
872 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
873 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
874 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
875 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
876 public static native void writeShort(Object object, int offset, short val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
877
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
878 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
879 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
880 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
881 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
882 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
883 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
884 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
885 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
886 public static native void writeInt(Object object, int offset, int val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
887
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
888 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
889 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
890 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
891 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
892 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
893 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
894 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
895 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
896 public static native void writeLong(Object object, int offset, long val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
897
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
898 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
899 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
900 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
901 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
902 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
903 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
904 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
905 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
906 public static native void writeFloat(Object object, int offset, float val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
907
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
908 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
909 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
910 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
911 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
912 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
913 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
914 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
915 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
916 public static native void writeDouble(Object object, int offset, double val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
917
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
918 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
919 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
920 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
921 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
922 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
923 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
924 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
925 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
926 public static native void writeWord(Object object, int offset, WordBase val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
927
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
928 /**
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
929 * Writes the memory at address {@code (object + offset)}. The offset is in bytes.
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
930 *
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
931 * @param object the base object for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
932 * @param offset the signed offset for the memory access
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
933 * @param val the value to be written to memory
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
934 */
15836
faebb143dab2 Introduce class BarrieredAccess for low-level object access with read and write barriers
Christian Wimmer <christian.wimmer@oracle.com>
parents: 11816
diff changeset
935 @Operation(opcode = Opcode.WRITE_OBJECT)
11816
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
936 public static native void writeObject(Object object, int offset, Object val);
8db5e8c4f542 Provide object read/write methods similar to Pointer.readXxxx/writeXxx that do not require casts to Word first, and use them in relevant places
Christian Wimmer <christian.wimmer@oracle.com>
parents:
diff changeset
937 }