src/share/vm/prims/methodHandleWalk.cpp

changeset 1862
cd5dbf694d45
parent 1587
cd37471eaecc
child 1907
c18cbe5936b8
child 1920
ab102d5d923e
equal deleted inserted replaced
1861:2338d41fbd81 1862:cd5dbf694d45
1171 methodHandle nullHandle; 1171 methodHandle nullHandle;
1172 // Create a method that holds the generated bytecode. invokedynamic 1172 // Create a method that holds the generated bytecode. invokedynamic
1173 // has no receiver, normal MH calls do. 1173 // has no receiver, normal MH calls do.
1174 int flags_bits; 1174 int flags_bits;
1175 if (for_invokedynamic()) 1175 if (for_invokedynamic())
1176 flags_bits = (/*JVM_MH_INVOKE_BITS |*/ JVM_ACC_PUBLIC | JVM_ACC_FINAL | JVM_ACC_STATIC); 1176 flags_bits = (/*JVM_MH_INVOKE_BITS |*/ JVM_ACC_PUBLIC | JVM_ACC_FINAL | JVM_ACC_SYNTHETIC | JVM_ACC_STATIC);
1177 else 1177 else
1178 flags_bits = (/*JVM_MH_INVOKE_BITS |*/ JVM_ACC_PUBLIC | JVM_ACC_FINAL); 1178 flags_bits = (/*JVM_MH_INVOKE_BITS |*/ JVM_ACC_PUBLIC | JVM_ACC_FINAL | JVM_ACC_SYNTHETIC);
1179 1179
1180 bool is_conc_safe = true; 1180 bool is_conc_safe = true;
1181 methodOop m_oop = oopFactory::new_method(bytecode_length(), 1181 methodOop m_oop = oopFactory::new_method(bytecode_length(),
1182 accessFlags_from(flags_bits), 1182 accessFlags_from(flags_bits),
1183 0, 0, 0, is_conc_safe, CHECK_(nullHandle)); 1183 0, 0, 0, is_conc_safe, CHECK_(nullHandle));
1215 m->print(); 1215 m->print();
1216 m->print_codes(); 1216 m->print_codes();
1217 } 1217 }
1218 #endif //PRODUCT 1218 #endif //PRODUCT
1219 1219
1220 assert(m->is_method_handle_adapter(), "must be recognized as an adapter");
1220 return m; 1221 return m;
1221 } 1222 }
1222 1223
1223 1224
1224 #ifndef PRODUCT 1225 #ifndef PRODUCT

mercurial