Mercurial > hg > truffle
comparison src/share/vm/prims/jni.cpp @ 113:ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv
Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author | coleenp |
---|---|
date | Sun, 13 Apr 2008 17:43:42 -0400 |
parents | a61af66fc99e |
children | d1605aabd0a1 8d852b81e775 |
comparison
equal
deleted
inserted
replaced
110:a49a647afe9a | 113:ba764ed4b6f2 |
---|---|
133 | 133 |
134 intptr_t jfieldIDWorkaround::encode_klass_hash(klassOop k, intptr_t offset) { | 134 intptr_t jfieldIDWorkaround::encode_klass_hash(klassOop k, intptr_t offset) { |
135 if (offset <= small_offset_mask) { | 135 if (offset <= small_offset_mask) { |
136 klassOop field_klass = k; | 136 klassOop field_klass = k; |
137 klassOop super_klass = Klass::cast(field_klass)->super(); | 137 klassOop super_klass = Klass::cast(field_klass)->super(); |
138 while (instanceKlass::cast(super_klass)->contains_field_offset(offset)) { | 138 // With compressed oops the most super class with nonstatic fields would |
139 // be the owner of fields embedded in the header. | |
140 while (instanceKlass::cast(super_klass)->has_nonstatic_fields() && | |
141 instanceKlass::cast(super_klass)->contains_field_offset(offset)) { | |
139 field_klass = super_klass; // super contains the field also | 142 field_klass = super_klass; // super contains the field also |
140 super_klass = Klass::cast(field_klass)->super(); | 143 super_klass = Klass::cast(field_klass)->super(); |
141 } | 144 } |
142 debug_only(No_Safepoint_Verifier nosafepoint;) | 145 debug_only(No_Safepoint_Verifier nosafepoint;) |
143 uintptr_t klass_hash = field_klass->identity_hash(); | 146 uintptr_t klass_hash = field_klass->identity_hash(); |