Mercurial > hg > truffle
comparison src/share/vm/prims/jvm.cpp @ 726:be93aad57795
6655646: dynamic languages need dynamically linked call sites
Summary: invokedynamic instruction (JSR 292 RI)
Reviewed-by: twisti, never
author | jrose |
---|---|
date | Tue, 21 Apr 2009 23:21:04 -0700 |
parents | d3676b4cb78c |
children | 6a93908f268f |
comparison
equal
deleted
inserted
replaced
725:928912ce8438 | 726:be93aad57795 |
---|---|
2220 constantPoolOop cp = instanceKlass::cast(k)->constants(); | 2220 constantPoolOop cp = instanceKlass::cast(k)->constants(); |
2221 switch (cp->tag_at(cp_index).value()) { | 2221 switch (cp->tag_at(cp_index).value()) { |
2222 case JVM_CONSTANT_InterfaceMethodref: | 2222 case JVM_CONSTANT_InterfaceMethodref: |
2223 case JVM_CONSTANT_Methodref: | 2223 case JVM_CONSTANT_Methodref: |
2224 return cp->uncached_name_ref_at(cp_index)->as_utf8(); | 2224 return cp->uncached_name_ref_at(cp_index)->as_utf8(); |
2225 case JVM_CONSTANT_NameAndType: | |
2226 // for invokedynamic | |
2227 return cp->nt_name_ref_at(cp_index)->as_utf8(); | |
2225 default: | 2228 default: |
2226 fatal("JVM_GetCPMethodNameUTF: illegal constant"); | 2229 fatal("JVM_GetCPMethodNameUTF: illegal constant"); |
2227 } | 2230 } |
2228 ShouldNotReachHere(); | 2231 ShouldNotReachHere(); |
2229 return NULL; | 2232 return NULL; |
2237 constantPoolOop cp = instanceKlass::cast(k)->constants(); | 2240 constantPoolOop cp = instanceKlass::cast(k)->constants(); |
2238 switch (cp->tag_at(cp_index).value()) { | 2241 switch (cp->tag_at(cp_index).value()) { |
2239 case JVM_CONSTANT_InterfaceMethodref: | 2242 case JVM_CONSTANT_InterfaceMethodref: |
2240 case JVM_CONSTANT_Methodref: | 2243 case JVM_CONSTANT_Methodref: |
2241 return cp->uncached_signature_ref_at(cp_index)->as_utf8(); | 2244 return cp->uncached_signature_ref_at(cp_index)->as_utf8(); |
2245 case JVM_CONSTANT_NameAndType: | |
2246 // for invokedynamic | |
2247 return cp->nt_signature_ref_at(cp_index)->as_utf8(); | |
2242 default: | 2248 default: |
2243 fatal("JVM_GetCPMethodSignatureUTF: illegal constant"); | 2249 fatal("JVM_GetCPMethodSignatureUTF: illegal constant"); |
2244 } | 2250 } |
2245 ShouldNotReachHere(); | 2251 ShouldNotReachHere(); |
2246 return NULL; | 2252 return NULL; |