comparison src/share/vm/oops/method.cpp @ 7949:5daaddd917a1

8006040: NPG: on_stack processing wastes space in ConstantPool Summary: Added on_stack bit to flags. Also MetadataMarkOnStack is used for more than JVMTI so had to be moved. Reviewed-by: dholmes, stefank
author coleenp
date Wed, 23 Jan 2013 10:34:29 -0500
parents 18c3c3fa291b
children 16fb9f942703
comparison
equal deleted inserted replaced
7632:2ef7061f13b4 7949:5daaddd917a1
1 /* 1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
21 * questions. 21 * questions.
22 * 22 *
23 */ 23 */
24 24
25 #include "precompiled.hpp" 25 #include "precompiled.hpp"
26 #include "classfile/metadataOnStackMark.hpp"
26 #include "classfile/systemDictionary.hpp" 27 #include "classfile/systemDictionary.hpp"
27 #include "code/debugInfoRec.hpp" 28 #include "code/debugInfoRec.hpp"
28 #include "gc_interface/collectedHeap.inline.hpp" 29 #include "gc_interface/collectedHeap.inline.hpp"
29 #include "interpreter/bytecodeStream.hpp" 30 #include "interpreter/bytecodeStream.hpp"
30 #include "interpreter/bytecodeTracer.hpp" 31 #include "interpreter/bytecodeTracer.hpp"
39 #include "oops/methodData.hpp" 40 #include "oops/methodData.hpp"
40 #include "oops/method.hpp" 41 #include "oops/method.hpp"
41 #include "oops/oop.inline.hpp" 42 #include "oops/oop.inline.hpp"
42 #include "oops/symbol.hpp" 43 #include "oops/symbol.hpp"
43 #include "prims/jvmtiExport.hpp" 44 #include "prims/jvmtiExport.hpp"
44 #include "prims/jvmtiRedefineClasses.hpp"
45 #include "prims/methodHandles.hpp" 45 #include "prims/methodHandles.hpp"
46 #include "prims/nativeLookup.hpp" 46 #include "prims/nativeLookup.hpp"
47 #include "runtime/arguments.hpp" 47 #include "runtime/arguments.hpp"
48 #include "runtime/compilationPolicy.hpp" 48 #include "runtime/compilationPolicy.hpp"
49 #include "runtime/frame.inline.hpp" 49 #include "runtime/frame.inline.hpp"
1025 cp = constantPoolHandle(THREAD, cp_oop); 1025 cp = constantPoolHandle(THREAD, cp_oop);
1026 } 1026 }
1027 cp->set_pool_holder(InstanceKlass::cast(holder())); 1027 cp->set_pool_holder(InstanceKlass::cast(holder()));
1028 cp->symbol_at_put(_imcp_invoke_name, name); 1028 cp->symbol_at_put(_imcp_invoke_name, name);
1029 cp->symbol_at_put(_imcp_invoke_signature, signature); 1029 cp->symbol_at_put(_imcp_invoke_signature, signature);
1030 cp->set_preresolution(); 1030 cp->set_has_preresolution();
1031 1031
1032 // decide on access bits: public or not? 1032 // decide on access bits: public or not?
1033 int flags_bits = (JVM_ACC_NATIVE | JVM_ACC_SYNTHETIC | JVM_ACC_FINAL); 1033 int flags_bits = (JVM_ACC_NATIVE | JVM_ACC_SYNTHETIC | JVM_ACC_FINAL);
1034 bool must_be_static = MethodHandles::is_signature_polymorphic_static(iid); 1034 bool must_be_static = MethodHandles::is_signature_polymorphic_static(iid);
1035 if (must_be_static) flags_bits |= JVM_ACC_STATIC; 1035 if (must_be_static) flags_bits |= JVM_ACC_STATIC;