Mercurial > hg > truffle
diff src/share/vm/oops/method.hpp @ 6934:4735d2c84362
7200776: Implement default methods in interfaces
Summary: Add generic type analysis and default method selection algorithms
Reviewed-by: coleenp, acorn
author | kamg |
---|---|
date | Thu, 11 Oct 2012 12:25:42 -0400 |
parents | 9191895df19d |
children | 18fb7da42534 |
line wrap: on
line diff
--- a/src/share/vm/oops/method.hpp Thu Nov 01 13:05:47 2012 +0100 +++ b/src/share/vm/oops/method.hpp Thu Oct 11 12:25:42 2012 -0400 @@ -30,7 +30,6 @@ #include "compiler/oopMap.hpp" #include "interpreter/invocationCounter.hpp" #include "oops/annotations.hpp" -#include "oops/constMethod.hpp" #include "oops/constantPool.hpp" #include "oops/instanceKlass.hpp" #include "oops/oop.hpp" @@ -104,6 +103,7 @@ class LocalVariableTableElement; class AdapterHandlerEntry; class MethodData; +class ConstMethod; class Method : public Metadata { friend class VMStructs; @@ -158,14 +158,16 @@ // Constructor Method(ConstMethod* xconst, AccessFlags access_flags, int size); public: + static Method* allocate(ClassLoaderData* loader_data, - int byte_code_size, - AccessFlags access_flags, - int compressed_line_number_size, - int localvariable_table_length, - int exception_table_length, - int checked_exceptions_length, - TRAPS); + int byte_code_size, + AccessFlags access_flags, + int compressed_line_number_size, + int localvariable_table_length, + int exception_table_length, + int checked_exceptions_length, + ConstMethod::MethodType method_type, + TRAPS); Method() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); } @@ -725,6 +727,10 @@ void set_dont_inline(bool x) { _dont_inline = x; } bool is_hidden() { return _hidden; } void set_hidden(bool x) { _hidden = x; } + ConstMethod::MethodType method_type() const { + return _constMethod->method_type(); + } + bool is_overpass() const { return method_type() == ConstMethod::OVERPASS; } // On-stack replacement support bool has_osr_nmethod(int level, bool match_level) {