Skip to content

Commit 2f2fd63

Browse files
committed
8373374: [lworld] Remove Unsafe.get/putValue
Reviewed-by: thartmann, jbhateja
1 parent c670652 commit 2f2fd63

File tree

9 files changed

+26
-263
lines changed

9 files changed

+26
-263
lines changed

src/hotspot/share/classfile/vmIntrinsics.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ bool vmIntrinsics::disabled_by_jvm_flags(vmIntrinsics::ID id) {
353353
case vmIntrinsics::_getLong:
354354
case vmIntrinsics::_getFloat:
355355
case vmIntrinsics::_getDouble:
356-
case vmIntrinsics::_getValue:
357356
case vmIntrinsics::_getFlatValue:
358357
case vmIntrinsics::_putReference:
359358
case vmIntrinsics::_putBoolean:
@@ -364,7 +363,6 @@ bool vmIntrinsics::disabled_by_jvm_flags(vmIntrinsics::ID id) {
364363
case vmIntrinsics::_putLong:
365364
case vmIntrinsics::_putFloat:
366365
case vmIntrinsics::_putDouble:
367-
case vmIntrinsics::_putValue:
368366
case vmIntrinsics::_putFlatValue:
369367
case vmIntrinsics::_getReferenceVolatile:
370368
case vmIntrinsics::_getBooleanVolatile:

src/hotspot/share/classfile/vmIntrinsics.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,6 @@ class methodHandle;
749749
do_signature(putFloat_signature, "(Ljava/lang/Object;JF)V") \
750750
do_signature(getDouble_signature, "(Ljava/lang/Object;J)D") \
751751
do_signature(putDouble_signature, "(Ljava/lang/Object;JD)V") \
752-
do_signature(getValue_signature, "(Ljava/lang/Object;JLjava/lang/Class;)Ljava/lang/Object;") \
753-
do_signature(putValue_signature, "(Ljava/lang/Object;JLjava/lang/Class;Ljava/lang/Object;)V") \
754752
do_signature(getFlatValue_signature, "(Ljava/lang/Object;JILjava/lang/Class;)Ljava/lang/Object;") \
755753
do_signature(putFlatValue_signature, "(Ljava/lang/Object;JILjava/lang/Class;Ljava/lang/Object;)V") \
756754
\
@@ -777,7 +775,6 @@ class methodHandle;
777775
do_intrinsic(_getLong, jdk_internal_misc_Unsafe, getLong_name, getLong_signature, F_RN) \
778776
do_intrinsic(_getFloat, jdk_internal_misc_Unsafe, getFloat_name, getFloat_signature, F_RN) \
779777
do_intrinsic(_getDouble, jdk_internal_misc_Unsafe, getDouble_name, getDouble_signature, F_RN) \
780-
do_intrinsic(_getValue, jdk_internal_misc_Unsafe, getValue_name, getValue_signature, F_RN) \
781778
do_intrinsic(_getFlatValue, jdk_internal_misc_Unsafe, getFlatValue_name, getFlatValue_signature, F_RN) \
782779
do_intrinsic(_putReference, jdk_internal_misc_Unsafe, putReference_name, putReference_signature, F_RN) \
783780
do_intrinsic(_putBoolean, jdk_internal_misc_Unsafe, putBoolean_name, putBoolean_signature, F_RN) \
@@ -788,7 +785,6 @@ class methodHandle;
788785
do_intrinsic(_putLong, jdk_internal_misc_Unsafe, putLong_name, putLong_signature, F_RN) \
789786
do_intrinsic(_putFloat, jdk_internal_misc_Unsafe, putFloat_name, putFloat_signature, F_RN) \
790787
do_intrinsic(_putDouble, jdk_internal_misc_Unsafe, putDouble_name, putDouble_signature, F_RN) \
791-
do_intrinsic(_putValue, jdk_internal_misc_Unsafe, putValue_name, putValue_signature, F_RN) \
792788
do_intrinsic(_putFlatValue, jdk_internal_misc_Unsafe, putFlatValue_name, putFlatValue_signature, F_RN) \
793789
\
794790
do_intrinsic(_makePrivateBuffer, jdk_internal_misc_Unsafe, makePrivateBuffer_name, object_object_signature, F_RN) \

src/hotspot/share/opto/c2compiler.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,6 @@ bool C2Compiler::is_intrinsic_supported(vmIntrinsics::ID id) {
671671
case vmIntrinsics::_getLong:
672672
case vmIntrinsics::_getFloat:
673673
case vmIntrinsics::_getDouble:
674-
case vmIntrinsics::_getValue:
675674
case vmIntrinsics::_getFlatValue:
676675
case vmIntrinsics::_putReference:
677676
case vmIntrinsics::_putBoolean:
@@ -682,7 +681,6 @@ bool C2Compiler::is_intrinsic_supported(vmIntrinsics::ID id) {
682681
case vmIntrinsics::_putLong:
683682
case vmIntrinsics::_putFloat:
684683
case vmIntrinsics::_putDouble:
685-
case vmIntrinsics::_putValue:
686684
case vmIntrinsics::_putFlatValue:
687685
case vmIntrinsics::_getReferenceVolatile:
688686
case vmIntrinsics::_getBooleanVolatile:

src/hotspot/share/opto/doCall.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ static bool arg_can_be_larval(ciMethod* callee, int arg_idx) {
140140
case vmIntrinsicID::_putReferenceOpaque:
141141
case vmIntrinsicID::_putReferenceRelease:
142142
case vmIntrinsicID::_putReferenceVolatile:
143-
case vmIntrinsicID::_putValue:
144143
return true;
145144
default:
146145
return false;

src/hotspot/share/opto/library_call.cpp

Lines changed: 14 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@ bool LibraryCallKit::try_to_inline(int predicate) {
340340
case vmIntrinsics::_getLong: return inline_unsafe_access(!is_store, T_LONG, Relaxed, false);
341341
case vmIntrinsics::_getFloat: return inline_unsafe_access(!is_store, T_FLOAT, Relaxed, false);
342342
case vmIntrinsics::_getDouble: return inline_unsafe_access(!is_store, T_DOUBLE, Relaxed, false);
343-
case vmIntrinsics::_getValue: return inline_unsafe_access(!is_store, T_OBJECT, Relaxed, false, true);
344343

345344
case vmIntrinsics::_putReference: return inline_unsafe_access( is_store, T_OBJECT, Relaxed, false);
346345
case vmIntrinsics::_putBoolean: return inline_unsafe_access( is_store, T_BOOLEAN, Relaxed, false);
@@ -351,7 +350,6 @@ bool LibraryCallKit::try_to_inline(int predicate) {
351350
case vmIntrinsics::_putLong: return inline_unsafe_access( is_store, T_LONG, Relaxed, false);
352351
case vmIntrinsics::_putFloat: return inline_unsafe_access( is_store, T_FLOAT, Relaxed, false);
353352
case vmIntrinsics::_putDouble: return inline_unsafe_access( is_store, T_DOUBLE, Relaxed, false);
354-
case vmIntrinsics::_putValue: return inline_unsafe_access( is_store, T_OBJECT, Relaxed, false, true);
355353

356354
case vmIntrinsics::_getReferenceVolatile: return inline_unsafe_access(!is_store, T_OBJECT, Volatile, false);
357355
case vmIntrinsics::_getBooleanVolatile: return inline_unsafe_access(!is_store, T_BOOLEAN, Volatile, false);
@@ -2462,7 +2460,7 @@ void LibraryCallKit::SavedState::discard() {
24622460
_discarded = true;
24632461
}
24642462

2465-
bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, const AccessKind kind, const bool unaligned, const bool is_flat) {
2463+
bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, const AccessKind kind, const bool unaligned) {
24662464
if (callee()->is_static()) return false; // caller must have the capability!
24672465
DecoratorSet decorators = C2_UNSAFE_ACCESS;
24682466
guarantee(!is_store || kind != Acquire, "Acquire accesses can be produced only for loads");
@@ -2487,13 +2485,13 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c
24872485
// Object getReference(Object base, int/long offset), etc.
24882486
BasicType rtype = sig->return_type()->basic_type();
24892487
assert(rtype == type, "getter must return the expected value");
2490-
assert(sig->count() == 2 || (is_flat && sig->count() == 3), "oop getter has 2 or 3 arguments");
2488+
assert(sig->count() == 2, "oop getter has 2 arguments");
24912489
assert(sig->type_at(0)->basic_type() == T_OBJECT, "getter base is object");
24922490
assert(sig->type_at(1)->basic_type() == T_LONG, "getter offset is correct");
24932491
} else {
24942492
// void putReference(Object base, int/long offset, Object x), etc.
24952493
assert(sig->return_type()->basic_type() == T_VOID, "putter must not return a value");
2496-
assert(sig->count() == 3 || (is_flat && sig->count() == 4), "oop putter has 3 arguments");
2494+
assert(sig->count() == 3, "oop putter has 3 arguments");
24972495
assert(sig->type_at(0)->basic_type() == T_OBJECT, "putter base is object");
24982496
assert(sig->type_at(1)->basic_type() == T_LONG, "putter offset is correct");
24992497
BasicType vtype = sig->type_at(sig->count()-1)->basic_type();
@@ -2520,19 +2518,6 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c
25202518
assert(Unsafe_field_offset_to_byte_offset(11) == 11,
25212519
"fieldOffset must be byte-scaled");
25222520

2523-
ciInlineKlass* inline_klass = nullptr;
2524-
if (is_flat) {
2525-
const TypeInstPtr* cls = _gvn.type(argument(4))->isa_instptr();
2526-
if (cls == nullptr || cls->const_oop() == nullptr) {
2527-
return false;
2528-
}
2529-
ciType* mirror_type = cls->const_oop()->as_instance()->java_mirror_type();
2530-
if (!mirror_type->is_inlinetype()) {
2531-
return false;
2532-
}
2533-
inline_klass = mirror_type->as_inline_klass();
2534-
}
2535-
25362521
if (base->is_InlineType()) {
25372522
assert(!is_store, "InlineTypeNodes are non-larval value objects");
25382523
InlineTypeNode* vt = base->as_InlineType();
@@ -2549,7 +2534,7 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c
25492534
if (bt == T_ARRAY || bt == T_NARROWOOP) {
25502535
bt = T_OBJECT;
25512536
}
2552-
if (bt == type && (!field->is_flat() || field->type() == inline_klass)) {
2537+
if (bt == type && !field->is_flat()) {
25532538
Node* value = vt->field_value_by_offset(off, false);
25542539
if (value->is_InlineType()) {
25552540
value = value->as_InlineType()->adjust_scalarization_depth(this);
@@ -2578,7 +2563,7 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c
25782563
assert(!stopped(), "Inlining of unsafe access failed: address construction stopped unexpectedly");
25792564

25802565
if (_gvn.type(base->uncast())->isa_ptr() == TypePtr::NULL_PTR) {
2581-
if (type != T_OBJECT && (inline_klass == nullptr || !inline_klass->has_object_fields())) {
2566+
if (type != T_OBJECT) {
25822567
decorators |= IN_NATIVE; // off-heap primitive access
25832568
} else {
25842569
return false; // off-heap oop accesses are not supported
@@ -2594,7 +2579,7 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c
25942579
decorators |= IN_HEAP;
25952580
}
25962581

2597-
Node* val = is_store ? argument(4 + (is_flat ? 1 : 0)) : nullptr;
2582+
Node* val = is_store ? argument(4) : nullptr;
25982583

25992584
const TypePtr* adr_type = _gvn.type(adr)->isa_ptr();
26002585
if (adr_type == TypePtr::NULL_PTR) {
@@ -2635,7 +2620,7 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c
26352620
bt = type2field[field->type()->basic_type()];
26362621
}
26372622
}
2638-
assert(bt == alias_type->basic_type() || is_flat, "should match");
2623+
assert(bt == alias_type->basic_type(), "should match");
26392624
} else {
26402625
bt = alias_type->basic_type();
26412626
}
@@ -2660,27 +2645,6 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c
26602645
mismatched = true; // conservatively mark all "wide" on-heap accesses as mismatched
26612646
}
26622647

2663-
if (is_flat) {
2664-
if (adr_type->isa_instptr()) {
2665-
if (field == nullptr || field->type() != inline_klass) {
2666-
mismatched = true;
2667-
}
2668-
} else if (adr_type->isa_aryptr()) {
2669-
const Type* elem = adr_type->is_aryptr()->elem();
2670-
if (!adr_type->is_flat() || elem->inline_klass() != inline_klass) {
2671-
mismatched = true;
2672-
}
2673-
} else {
2674-
mismatched = true;
2675-
}
2676-
if (is_store) {
2677-
const Type* val_t = _gvn.type(val);
2678-
if (!val_t->is_inlinetypeptr() || val_t->inline_klass() != inline_klass) {
2679-
return false;
2680-
}
2681-
}
2682-
}
2683-
26842648
old_state.discard();
26852649
assert(!mismatched || alias_type->adr_type()->is_oopptr(), "off-heap access can't be mismatched");
26862650

@@ -2695,7 +2659,7 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c
26952659
decorators |= mo_decorator_for_access_kind(kind);
26962660

26972661
if (!is_store) {
2698-
if (type == T_OBJECT && !is_flat) {
2662+
if (type == T_OBJECT) {
26992663
const TypeOopPtr* tjp = sharpen_unsafe_type(alias_type, adr_type);
27002664
if (tjp != nullptr) {
27012665
value_type = tjp;
@@ -2722,15 +2686,11 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c
27222686
}
27232687

27242688
if (p == nullptr) { // Could not constant fold the load
2725-
if (is_flat) {
2726-
p = InlineTypeNode::make_from_flat(this, inline_klass, base, adr, adr_type, false, false, true);
2727-
} else {
2728-
p = access_load_at(heap_base_oop, adr, adr_type, value_type, type, decorators);
2729-
const TypeOopPtr* ptr = value_type->make_oopptr();
2730-
if (ptr != nullptr && ptr->is_inlinetypeptr()) {
2731-
// Load a non-flattened inline type from memory
2732-
p = InlineTypeNode::make_from_oop(this, p, ptr->inline_klass());
2733-
}
2689+
p = access_load_at(heap_base_oop, adr, adr_type, value_type, type, decorators);
2690+
const TypeOopPtr* ptr = value_type->make_oopptr();
2691+
if (ptr != nullptr && ptr->is_inlinetypeptr()) {
2692+
// Load a non-flattened inline type from memory
2693+
p = InlineTypeNode::make_from_oop(this, p, ptr->inline_klass());
27342694
}
27352695
// Normalize the value returned by getBoolean in the following cases
27362696
if (type == T_BOOLEAN &&
@@ -2769,11 +2729,7 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c
27692729
val = ConvL2X(val);
27702730
val = gvn().transform(new CastX2PNode(val));
27712731
}
2772-
if (is_flat) {
2773-
val->as_InlineType()->store_flat(this, base, adr, false, false, true, decorators);
2774-
} else {
2775-
access_store_at(heap_base_oop, adr, adr_type, val, value_type, type, decorators);
2776-
}
2732+
access_store_at(heap_base_oop, adr, adr_type, val, value_type, type, decorators);
27772733
}
27782734

27792735
return true;

src/hotspot/share/opto/library_call.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ class LibraryCallKit : public GraphKit {
278278

279279
typedef enum { Relaxed, Opaque, Volatile, Acquire, Release } AccessKind;
280280
DecoratorSet mo_decorator_for_access_kind(AccessKind kind);
281-
bool inline_unsafe_access(bool is_store, BasicType type, AccessKind kind, bool is_unaligned, bool is_flat = false);
281+
bool inline_unsafe_access(bool is_store, BasicType type, AccessKind kind, bool is_unaligned);
282282
bool inline_unsafe_flat_access(bool is_store, AccessKind kind);
283283
static bool klass_needs_init_guard(Node* kls);
284284
bool inline_unsafe_allocate();

src/hotspot/share/prims/unsafe.cpp

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -438,28 +438,6 @@ UNSAFE_ENTRY(jarray, Unsafe_NewSpecialArray(JNIEnv *env, jobject unsafe, jclass
438438
return (jarray) JNIHandles::make_local(THREAD, array);
439439
} UNSAFE_END
440440

441-
UNSAFE_ENTRY(jobject, Unsafe_GetValue(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jclass vc)) {
442-
oop base = JNIHandles::resolve(obj);
443-
if (base == nullptr) {
444-
THROW_NULL(vmSymbols::java_lang_NullPointerException());
445-
}
446-
Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(vc));
447-
InlineKlass* vk = InlineKlass::cast(k);
448-
assert_and_log_unsafe_value_access(base, offset, vk);
449-
LayoutKind lk = LayoutKind::UNKNOWN;
450-
if (base->is_array()) {
451-
FlatArrayKlass* fak = FlatArrayKlass::cast(base->klass());
452-
lk = fak->layout_kind();
453-
} else {
454-
fieldDescriptor fd;
455-
InstanceKlass::cast(base->klass())->find_field_from_offset(offset, false, &fd);
456-
lk = fd.field_holder()->inline_layout_info(fd.index()).kind();
457-
}
458-
Handle base_h(THREAD, base);
459-
oop v = vk->read_payload_from_addr(base_h(), offset, lk, CHECK_NULL);
460-
return JNIHandles::make_local(THREAD, v);
461-
} UNSAFE_END
462-
463441
UNSAFE_ENTRY(jobject, Unsafe_GetFlatValue(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jint layoutKind, jclass vc)) {
464442
assert(layoutKind != (int)LayoutKind::REFERENCE, "This method handles only flat layouts");
465443
oop base = JNIHandles::resolve(obj);
@@ -475,28 +453,6 @@ UNSAFE_ENTRY(jobject, Unsafe_GetFlatValue(JNIEnv *env, jobject unsafe, jobject o
475453
return JNIHandles::make_local(THREAD, v);
476454
} UNSAFE_END
477455

478-
UNSAFE_ENTRY(void, Unsafe_PutValue(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jclass vc, jobject value)) {
479-
oop base = JNIHandles::resolve(obj);
480-
if (base == nullptr) {
481-
THROW(vmSymbols::java_lang_NullPointerException());
482-
}
483-
Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(vc));
484-
InlineKlass* vk = InlineKlass::cast(k);
485-
assert(!base->is_inline_type() || base->mark().is_larval_state(), "must be an object instance or a larval inline type");
486-
assert_and_log_unsafe_value_access(base, offset, vk);
487-
LayoutKind lk = LayoutKind::UNKNOWN;
488-
if (base->is_array()) {
489-
FlatArrayKlass* fak = FlatArrayKlass::cast(base->klass());
490-
lk = fak->layout_kind();
491-
} else {
492-
fieldDescriptor fd;
493-
InstanceKlass::cast(base->klass())->find_field_from_offset(offset, false, &fd);
494-
lk = fd.field_holder()->inline_layout_info(fd.index()).kind();
495-
}
496-
oop v = JNIHandles::resolve(value);
497-
vk->write_value_to_addr(v, ((char*)(oopDesc*)base) + offset, lk, true, CHECK);
498-
} UNSAFE_END
499-
500456
UNSAFE_ENTRY(void, Unsafe_PutFlatValue(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jint layoutKind, jclass vc, jobject value)) {
501457
assert(layoutKind != (int)LayoutKind::REFERENCE, "This method handles only flat layouts");
502458
oop base = JNIHandles::resolve(obj);
@@ -1207,9 +1163,7 @@ static JNINativeMethod jdk_internal_misc_Unsafe_methods[] = {
12071163
{CC "arrayLayout0", CC "(" OBJ_ARR ")I", FN_PTR(Unsafe_ArrayLayout)},
12081164
{CC "fieldLayout0", CC "(" OBJ ")I", FN_PTR(Unsafe_FieldLayout)},
12091165
{CC "newSpecialArray", CC "(" CLS "II)[" OBJ, FN_PTR(Unsafe_NewSpecialArray)},
1210-
{CC "getValue", CC "(" OBJ "J" CLS ")" OBJ, FN_PTR(Unsafe_GetValue)},
12111166
{CC "getFlatValue", CC "(" OBJ "JI" CLS ")" OBJ, FN_PTR(Unsafe_GetFlatValue)},
1212-
{CC "putValue", CC "(" OBJ "J" CLS OBJ ")V", FN_PTR(Unsafe_PutValue)},
12131167
{CC "putFlatValue", CC "(" OBJ "JI" CLS OBJ ")V", FN_PTR(Unsafe_PutFlatValue)},
12141168
{CC "makePrivateBuffer", CC "(" OBJ ")" OBJ, FN_PTR(Unsafe_MakePrivateBuffer)},
12151169
{CC "finishPrivateBuffer", CC "(" OBJ ")" OBJ, FN_PTR(Unsafe_FinishPrivateBuffer)},

src/java.base/share/classes/jdk/internal/misc/Unsafe.java

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -299,25 +299,9 @@ public native Object[] newSpecialArray(Class<?> componentType,
299299
* {@code o} object at the given offset, or (if {@code o} is null)
300300
* from the memory address whose numerical value is the given offset.
301301
*
302-
* @param o Java heap object in which the variable resides, if any, else
303-
* null
304-
* @param offset indication of where the variable resides in a Java heap
305-
* object, if any, else a memory address locating the variable
306-
* statically
307-
* @param valueType value type
308-
* @param <V> the type of a value
309-
* @return the value fetched from the indicated Java variable
310-
* @throws RuntimeException No defined exceptions are thrown, not even
311-
* {@link NullPointerException}
312-
*/
313-
@IntrinsicCandidate
314-
public native <V> V getValue(Object o, long offset, Class<?> valueType);
315-
316-
/**
317-
* Fetches a value of type {@code <V>} from a given Java variable.
318-
* More specifically, fetches a field or array element within the given
319-
* {@code o} object at the given offset, or (if {@code o} is null)
320-
* from the memory address whose numerical value is the given offset.
302+
* @apiNote
303+
* The returned object is newly allocated into the heap, because flat
304+
* values lack object headers and thus can't be used as objects directly.
321305
*
322306
* @param o Java heap object in which the variable resides, if any, else
323307
* null
@@ -336,27 +320,6 @@ public native Object[] newSpecialArray(Class<?> componentType,
336320
@IntrinsicCandidate
337321
public native <V> V getFlatValue(Object o, long offset, int layoutKind, Class<?> valueType);
338322

339-
340-
/**
341-
* Stores the given value into a given Java variable.
342-
*
343-
* Unless the reference {@code o} being stored is either null
344-
* or matches the field type, the results are undefined.
345-
*
346-
* @param o Java heap object in which the variable resides, if any, else
347-
* null
348-
* @param offset indication of where the variable resides in a Java heap
349-
* object, if any, else a memory address locating the variable
350-
* statically
351-
* @param valueType value type
352-
* @param v the value to store into the indicated Java variable
353-
* @param <V> the type of a value
354-
* @throws RuntimeException No defined exceptions are thrown, not even
355-
* {@link NullPointerException}
356-
*/
357-
@IntrinsicCandidate
358-
public native <V> void putValue(Object o, long offset, Class<?> valueType, V v);
359-
360323
/**
361324
* Stores the given value into a given Java variable.
362325
*

0 commit comments

Comments
 (0)