Mercurial > hg > graal-jvmci-8
comparison src/share/vm/classfile/classFileParser.cpp @ 10128:41ed397cc0cd
8006267: InterfaceMethod_ref should allow invokestatic and invokespecial
Summary: Lambda changes; spec 0.6.2 - Allow static invokestatic and invokespecial calls to InterfaceMethod_ref
Reviewed-by: dholmes, acorn
author | bharadwaj |
---|---|
date | Thu, 18 Apr 2013 08:05:35 -0700 |
parents | 9befe2fce567 |
children | d1644a010f52 e76dd894b984 |
comparison
equal
deleted
inserted
replaced
10126:63e31ce40bdb | 10128:41ed397cc0cd |
---|---|
434 tag.is_field(), | 434 tag.is_field(), |
435 "Invalid constant pool index %u in class file %s (not a field)", | 435 "Invalid constant pool index %u in class file %s (not a field)", |
436 ref_index, CHECK_(nullHandle)); | 436 ref_index, CHECK_(nullHandle)); |
437 break; | 437 break; |
438 case JVM_REF_invokeVirtual: | 438 case JVM_REF_invokeVirtual: |
439 case JVM_REF_invokeStatic: | |
440 case JVM_REF_invokeSpecial: | |
441 case JVM_REF_newInvokeSpecial: | 439 case JVM_REF_newInvokeSpecial: |
442 check_property( | 440 check_property( |
443 tag.is_method(), | 441 tag.is_method(), |
444 "Invalid constant pool index %u in class file %s (not a method)", | 442 "Invalid constant pool index %u in class file %s (not a method)", |
445 ref_index, CHECK_(nullHandle)); | 443 ref_index, CHECK_(nullHandle)); |
446 break; | 444 break; |
445 case JVM_REF_invokeStatic: | |
446 case JVM_REF_invokeSpecial: | |
447 check_property( | |
448 tag.is_method() || tag.is_interface_method(), | |
449 "Invalid constant pool index %u in class file %s (not a method)", | |
450 ref_index, CHECK_(nullHandle)); | |
451 break; | |
447 case JVM_REF_invokeInterface: | 452 case JVM_REF_invokeInterface: |
448 check_property( | 453 check_property( |
449 tag.is_interface_method(), | 454 tag.is_interface_method(), |
450 "Invalid constant pool index %u in class file %s (not an interface method)", | 455 "Invalid constant pool index %u in class file %s (not an interface method)", |
451 ref_index, CHECK_(nullHandle)); | 456 ref_index, CHECK_(nullHandle)); |
3835 ); | 3840 ); |
3836 return nullHandle; | 3841 return nullHandle; |
3837 } | 3842 } |
3838 | 3843 |
3839 if (TraceClassLoadingPreorder) { | 3844 if (TraceClassLoadingPreorder) { |
3840 tty->print("[Loading %s", name->as_klass_external_name()); | 3845 tty->print("[Loading %s", (name != NULL) ? name->as_klass_external_name() : "NoName"); |
3841 if (cfs->source() != NULL) tty->print(" from %s", cfs->source()); | 3846 if (cfs->source() != NULL) tty->print(" from %s", cfs->source()); |
3842 tty->print_cr("]"); | 3847 tty->print_cr("]"); |
3843 } | 3848 } |
3844 | 3849 |
3845 u2 super_class_index = cfs->get_u2_fast(); | 3850 u2 super_class_index = cfs->get_u2_fast(); |