hotspot/src/share/vm/oops/method.hpp
changeset 33230 23bb11a5cf4e
parent 33160 c59f1676d27e
parent 33209 43d7a2139756
child 34169 b0b7187852b7
child 33593 60764a78fa5c
--- a/hotspot/src/share/vm/oops/method.hpp	Mon Oct 19 12:30:17 2015 -0700
+++ b/hotspot/src/share/vm/oops/method.hpp	Tue Oct 20 11:17:19 2015 -0400
@@ -71,7 +71,6 @@
 #ifdef CC_INTERP
   int               _result_index;               // C++ interpreter needs for converting results to/from stack
 #endif
-  u2                _method_size;                // size of this object
   u2                _intrinsic_id;               // vmSymbols::intrinsic_id (0 == _none)
 
   // Flags
@@ -106,7 +105,7 @@
   volatile address           _from_interpreted_entry; // Cache of _code ? _adapter->i2c_entry() : _i2i_entry
 
   // Constructor
-  Method(ConstMethod* xconst, AccessFlags access_flags, int size);
+  Method(ConstMethod* xconst, AccessFlags access_flags);
  public:
 
   static Method* allocate(ClassLoaderData* loader_data,
@@ -241,12 +240,8 @@
   // code size
   int code_size() const                  { return constMethod()->code_size(); }
 
-  // method size
-  int method_size() const                        { return _method_size; }
-  void set_method_size(int size) {
-    assert(0 <= size && size < (1 << 16), "invalid method size");
-    _method_size = size;
-  }
+  // method size in words
+  int method_size() const                { return sizeof(Method)/wordSize + is_native() ? 2 : 0; }
 
   // constant pool for Klass* holding this method
   ConstantPool* constants() const              { return constMethod()->constants(); }