< prev index next >

src/hotspot/share/interpreter/abstractInterpreter.cpp

Print this page




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














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








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




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


< prev index next >