< prev index next >

src/hotspot/share/interpreter/abstractInterpreter.cpp

Print this page
rev 50073 : [mq]: cont


 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_getSP
 189                               : return java_lang_continuation_getSP;
 190     case vmIntrinsics::_Continuation_getFP
 191                               : return java_lang_continuation_getFP;
 192     case vmIntrinsics::_Continuation_getPC
 193                               : return java_lang_continuation_getPC;
 194     case vmIntrinsics::_Continuation_doContinue
 195                               : return java_lang_continuation_doContinue;
 196     case vmIntrinsics::_Continuation_doYield
 197                               : return java_lang_continuation_doYield;
 198     default                   : break;
 199   }
 200 
 201   // Accessor method?
 202   if (m->is_getter()) {
 203     // TODO: We should have used ::is_accessor above, but fast accessors in Zero expect only getters.
 204     // See CppInterpreter::accessor_entry in cppInterpreter_zero.cpp. This should be fixed in Zero,
 205     // then the call above updated to ::is_accessor
 206     assert(m->size_of_parameters() == 1, "fast code for accessors assumes parameter size = 1");
 207     return accessor;
 208   }
 209 
 210   // Symbol* kname = m->klass_name();
 211   // Symbol* name = m->name();
 212   // if (kname == vmSymbols::java_lang_Continuation()) {
 213   //   if (name == vmSymbols::enter_name()) {
 214   //     return java_lang_continuation_enter;
 215   //   }
 216   // }
 217 
 218   // Note: for now: zero locals for all non-empty methods
 219   return zerolocals;
 220 }
 221 
 222 #if INCLUDE_CDS
 223 
 224 address AbstractInterpreter::get_trampoline_code_buffer(AbstractInterpreter::MethodKind kind) {
 225   const size_t trampoline_size = SharedRuntime::trampoline_size();
 226   address addr = MetaspaceShared::cds_i2i_entry_code_buffers((size_t)(AbstractInterpreter::number_of_method_entries) * trampoline_size);
 227   addr += (size_t)(kind) * trampoline_size;
 228 
 229   return addr;
 230 }
 231 
 232 void AbstractInterpreter::update_cds_entry_table(AbstractInterpreter::MethodKind kind) {
 233   if (DumpSharedSpaces || UseSharedSpaces) {
 234     address trampoline = get_trampoline_code_buffer(kind);
 235     _cds_entry_table[kind] = trampoline;
 236 
 237     CodeBuffer buffer(trampoline, (int)(SharedRuntime::trampoline_size()));


< prev index next >