757 static Klass* resolve_field_return_klass(methodHandle caller, int bci, TRAPS) { |
757 static Klass* resolve_field_return_klass(methodHandle caller, int bci, TRAPS) { |
758 Bytecode_field field_access(caller, bci); |
758 Bytecode_field field_access(caller, bci); |
759 // This can be static or non-static field access |
759 // This can be static or non-static field access |
760 Bytecodes::Code code = field_access.code(); |
760 Bytecodes::Code code = field_access.code(); |
761 |
761 |
762 // We must load class, initialize class and resolvethe field |
762 // We must load class, initialize class and resolve the field |
763 fieldDescriptor result; // initialize class if needed |
763 fieldDescriptor result; // initialize class if needed |
764 constantPoolHandle constants(THREAD, caller->constants()); |
764 constantPoolHandle constants(THREAD, caller->constants()); |
765 LinkResolver::resolve_field_access(result, constants, field_access.index(), Bytecodes::java_code(code), CHECK_NULL); |
765 LinkResolver::resolve_field_access(result, constants, field_access.index(), caller, Bytecodes::java_code(code), CHECK_NULL); |
766 return result.field_holder(); |
766 return result.field_holder(); |
767 } |
767 } |
768 |
768 |
769 |
769 |
770 // |
770 // |
877 |
877 |
878 Bytecode_field field_access(caller_method, bci); |
878 Bytecode_field field_access(caller_method, bci); |
879 fieldDescriptor result; // initialize class if needed |
879 fieldDescriptor result; // initialize class if needed |
880 Bytecodes::Code code = field_access.code(); |
880 Bytecodes::Code code = field_access.code(); |
881 constantPoolHandle constants(THREAD, caller_method->constants()); |
881 constantPoolHandle constants(THREAD, caller_method->constants()); |
882 LinkResolver::resolve_field_access(result, constants, field_access.index(), Bytecodes::java_code(code), CHECK); |
882 LinkResolver::resolve_field_access(result, constants, field_access.index(), caller_method, Bytecodes::java_code(code), CHECK); |
883 patch_field_offset = result.offset(); |
883 patch_field_offset = result.offset(); |
884 |
884 |
885 // If we're patching a field which is volatile then at compile it |
885 // If we're patching a field which is volatile then at compile it |
886 // must not have been know to be volatile, so the generated code |
886 // must not have been know to be volatile, so the generated code |
887 // isn't correct for a volatile reference. The nmethod has to be |
887 // isn't correct for a volatile reference. The nmethod has to be |