Mercurial > hg > truffle
comparison src/share/vm/prims/methodHandleWalk.cpp @ 1507:cd5dbf694d45
6939134: JSR 292 adjustments to method handle invocation
Summary: split MethodHandle.invoke into invokeExact and invokeGeneric; also clean up JVM-to-Java interfaces
Reviewed-by: twisti
author | jrose |
---|---|
date | Sat, 01 May 2010 02:42:18 -0700 |
parents | cd37471eaecc |
children | c18cbe5936b8 ab102d5d923e |
comparison
equal
deleted
inserted
replaced
1506:2338d41fbd81 | 1507: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 |