< prev index next >

src/hotspot/share/interpreter/abstractInterpreter.cpp

Print this page




 168   // Special intrinsic method?
 169   // Note: This test must come _after_ the test for native methods,
 170   //       otherwise we will run into problems with JDK 1.2, see also
 171   //       TemplateInterpreterGenerator::generate_method_entry() for
 172   //       for details.
 173   switch (m->intrinsic_id()) {
 174     case vmIntrinsics::_dsin  : return java_lang_math_sin  ;
 175     case vmIntrinsics::_dcos  : return java_lang_math_cos  ;
 176     case vmIntrinsics::_dtan  : return java_lang_math_tan  ;
 177     case vmIntrinsics::_dabs  : return java_lang_math_abs  ;
 178     case vmIntrinsics::_dsqrt : return java_lang_math_sqrt ;
 179     case vmIntrinsics::_dlog  : return java_lang_math_log  ;
 180     case vmIntrinsics::_dlog10: return java_lang_math_log10;
 181     case vmIntrinsics::_dpow  : return java_lang_math_pow  ;
 182     case vmIntrinsics::_dexp  : return java_lang_math_exp  ;
 183     case vmIntrinsics::_fmaD  : return java_lang_math_fmaD ;
 184     case vmIntrinsics::_fmaF  : return java_lang_math_fmaF ;
 185 
 186     case vmIntrinsics::_Reference_get
 187                               : return java_lang_ref_reference_get;


 188     default                   : break;
 189   }
 190 
 191   // Accessor method?
 192   if (m->is_getter()) {
 193     // TODO: We should have used ::is_accessor above, but fast accessors in Zero expect only getters.
 194     // See CppInterpreter::accessor_entry in cppInterpreter_zero.cpp. This should be fixed in Zero,
 195     // then the call above updated to ::is_accessor
 196     assert(m->size_of_parameters() == 1, "fast code for accessors assumes parameter size = 1");
 197     return accessor;
 198   }
 199 











 200   // Note: for now: zero locals for all non-empty methods
 201   return zerolocals;
 202 }
 203 
 204 #if INCLUDE_CDS
 205 
 206 address AbstractInterpreter::get_trampoline_code_buffer(AbstractInterpreter::MethodKind kind) {
 207   const size_t trampoline_size = SharedRuntime::trampoline_size();
 208   address addr = MetaspaceShared::cds_i2i_entry_code_buffers((size_t)(AbstractInterpreter::number_of_method_entries) * trampoline_size);
 209   addr += (size_t)(kind) * trampoline_size;
 210 
 211   return addr;
 212 }
 213 
 214 void AbstractInterpreter::update_cds_entry_table(AbstractInterpreter::MethodKind kind) {
 215   if (DumpSharedSpaces || UseSharedSpaces) {
 216     address trampoline = get_trampoline_code_buffer(kind);
 217     _cds_entry_table[kind] = trampoline;
 218 
 219     CodeBuffer buffer(trampoline, (int)(SharedRuntime::trampoline_size()));




 168   // Special intrinsic method?
 169   // Note: This test must come _after_ the test for native methods,
 170   //       otherwise we will run into problems with JDK 1.2, see also
 171   //       TemplateInterpreterGenerator::generate_method_entry() for
 172   //       for details.
 173   switch (m->intrinsic_id()) {
 174     case vmIntrinsics::_dsin  : return java_lang_math_sin  ;
 175     case vmIntrinsics::_dcos  : return java_lang_math_cos  ;
 176     case vmIntrinsics::_dtan  : return java_lang_math_tan  ;
 177     case vmIntrinsics::_dabs  : return java_lang_math_abs  ;
 178     case vmIntrinsics::_dsqrt : return java_lang_math_sqrt ;
 179     case vmIntrinsics::_dlog  : return java_lang_math_log  ;
 180     case vmIntrinsics::_dlog10: return java_lang_math_log10;
 181     case vmIntrinsics::_dpow  : return java_lang_math_pow  ;
 182     case vmIntrinsics::_dexp  : return java_lang_math_exp  ;
 183     case vmIntrinsics::_fmaD  : return java_lang_math_fmaD ;
 184     case vmIntrinsics::_fmaF  : return java_lang_math_fmaF ;
 185 
 186     case vmIntrinsics::_Reference_get
 187                               : return java_lang_ref_reference_get;
 188     case vmIntrinsics::_Continuation_run
 189                               : return java_lang_continuation_run;
 190     default                   : break;
 191   }
 192 
 193   // Accessor method?
 194   if (m->is_getter()) {
 195     // TODO: We should have used ::is_accessor above, but fast accessors in Zero expect only getters.
 196     // See CppInterpreter::accessor_entry in cppInterpreter_zero.cpp. This should be fixed in Zero,
 197     // then the call above updated to ::is_accessor
 198     assert(m->size_of_parameters() == 1, "fast code for accessors assumes parameter size = 1");
 199     return accessor;
 200   }
 201 
 202   Symbol* kname = m->klass_name();
 203   Symbol* name = m->name();
 204   if (kname == vmSymbols::java_lang_Continuation()) {
 205     if (name == vmSymbols::getStack_name()) {
 206       return java_lang_continuation_getStack;
 207     }
 208     if (name == vmSymbols::enter_name()) {
 209       return java_lang_continuation_enter;
 210     }
 211   }
 212 
 213   // Note: for now: zero locals for all non-empty methods
 214   return zerolocals;
 215 }
 216 
 217 #if INCLUDE_CDS
 218 
 219 address AbstractInterpreter::get_trampoline_code_buffer(AbstractInterpreter::MethodKind kind) {
 220   const size_t trampoline_size = SharedRuntime::trampoline_size();
 221   address addr = MetaspaceShared::cds_i2i_entry_code_buffers((size_t)(AbstractInterpreter::number_of_method_entries) * trampoline_size);
 222   addr += (size_t)(kind) * trampoline_size;
 223 
 224   return addr;
 225 }
 226 
 227 void AbstractInterpreter::update_cds_entry_table(AbstractInterpreter::MethodKind kind) {
 228   if (DumpSharedSpaces || UseSharedSpaces) {
 229     address trampoline = get_trampoline_code_buffer(kind);
 230     _cds_entry_table[kind] = trampoline;
 231 
 232     CodeBuffer buffer(trampoline, (int)(SharedRuntime::trampoline_size()));


< prev index next >