< prev index next >

hotspot/src/share/vm/prims/methodHandles.hpp

Print this page


   1 /*
   2  * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 108         is_signature_polymorphic_name(name)) {
 109       vmIntrinsics::ID iid = signature_polymorphic_name_id(name);
 110       return has_member_arg(iid);
 111     }
 112     return false;
 113   }
 114 
 115   static Symbol* signature_polymorphic_intrinsic_name(vmIntrinsics::ID iid);
 116   static int signature_polymorphic_intrinsic_ref_kind(vmIntrinsics::ID iid);
 117 
 118   static vmIntrinsics::ID signature_polymorphic_name_id(Klass* klass, Symbol* name);
 119   static vmIntrinsics::ID signature_polymorphic_name_id(Symbol* name);
 120   static bool is_signature_polymorphic_name(Symbol* name) {
 121     return signature_polymorphic_name_id(name) != vmIntrinsics::_none;
 122   }
 123   static bool is_method_handle_invoke_name(Klass* klass, Symbol* name);
 124   static bool is_signature_polymorphic_name(Klass* klass, Symbol* name) {
 125     return signature_polymorphic_name_id(klass, name) != vmIntrinsics::_none;
 126   }
 127 
 128   enum {
 129     // format of query to getConstant:
 130     GC_COUNT_GWT = 4,
 131     GC_LAMBDA_SUPPORT = 5
 132   };
 133   static int get_named_constant(int which, Handle name_box, TRAPS);
 134 
 135 public:
 136   static Symbol* lookup_signature(oop type_str, bool polymorphic, TRAPS);  // use TempNewSymbol
 137   static Symbol* lookup_basic_type_signature(Symbol* sig, bool keep_last_arg, TRAPS);  // use TempNewSymbol
 138   static Symbol* lookup_basic_type_signature(Symbol* sig, TRAPS) {
 139     return lookup_basic_type_signature(sig, false, THREAD);
 140   }
 141   static bool is_basic_type_signature(Symbol* sig);
 142 
 143   static Symbol* lookup_method_type(Symbol* msig, Handle mtype, TRAPS);
 144 
 145   static void print_as_method_type_on(outputStream* st, Symbol* sig) {
 146     print_as_basic_type_signature_on(st, sig, true, true);
 147   }
 148   static void print_as_basic_type_signature_on(outputStream* st, Symbol* sig, bool keep_arrays = false, bool keep_basic_names = false);
 149 
 150   // decoding CONSTANT_MethodHandle constants
 151   enum { JVM_REF_MIN = JVM_REF_getField, JVM_REF_MAX = JVM_REF_invokeInterface };
 152   static bool ref_kind_is_valid(int ref_kind) {


   1 /*
   2  * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 108         is_signature_polymorphic_name(name)) {
 109       vmIntrinsics::ID iid = signature_polymorphic_name_id(name);
 110       return has_member_arg(iid);
 111     }
 112     return false;
 113   }
 114 
 115   static Symbol* signature_polymorphic_intrinsic_name(vmIntrinsics::ID iid);
 116   static int signature_polymorphic_intrinsic_ref_kind(vmIntrinsics::ID iid);
 117 
 118   static vmIntrinsics::ID signature_polymorphic_name_id(Klass* klass, Symbol* name);
 119   static vmIntrinsics::ID signature_polymorphic_name_id(Symbol* name);
 120   static bool is_signature_polymorphic_name(Symbol* name) {
 121     return signature_polymorphic_name_id(name) != vmIntrinsics::_none;
 122   }
 123   static bool is_method_handle_invoke_name(Klass* klass, Symbol* name);
 124   static bool is_signature_polymorphic_name(Klass* klass, Symbol* name) {
 125     return signature_polymorphic_name_id(klass, name) != vmIntrinsics::_none;
 126   }
 127 





 128   static int get_named_constant(int which, Handle name_box, TRAPS);
 129 
 130 public:
 131   static Symbol* lookup_signature(oop type_str, bool polymorphic, TRAPS);  // use TempNewSymbol
 132   static Symbol* lookup_basic_type_signature(Symbol* sig, bool keep_last_arg, TRAPS);  // use TempNewSymbol
 133   static Symbol* lookup_basic_type_signature(Symbol* sig, TRAPS) {
 134     return lookup_basic_type_signature(sig, false, THREAD);
 135   }
 136   static bool is_basic_type_signature(Symbol* sig);
 137 
 138   static Symbol* lookup_method_type(Symbol* msig, Handle mtype, TRAPS);
 139 
 140   static void print_as_method_type_on(outputStream* st, Symbol* sig) {
 141     print_as_basic_type_signature_on(st, sig, true, true);
 142   }
 143   static void print_as_basic_type_signature_on(outputStream* st, Symbol* sig, bool keep_arrays = false, bool keep_basic_names = false);
 144 
 145   // decoding CONSTANT_MethodHandle constants
 146   enum { JVM_REF_MIN = JVM_REF_getField, JVM_REF_MAX = JVM_REF_invokeInterface };
 147   static bool ref_kind_is_valid(int ref_kind) {


< prev index next >