Mercurial > hg > truffle
comparison src/share/vm/classfile/systemDictionary.hpp @ 1930:2d26b0046e0d
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Tue, 30 Nov 2010 14:53:30 +0100 |
parents | 6b7001391c97 3b2dea75431e |
children | 06f017f7daa7 |
comparison
equal
deleted
inserted
replaced
1484:6b7001391c97 | 1930:2d26b0046e0d |
---|---|
1 /* | 1 /* |
2 * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright (c) 1997, 2010, 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. |
14 * | 14 * |
15 * You should have received a copy of the GNU General Public License version | 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, | 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. | 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
18 * | 18 * |
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 * CA 95054 USA or visit www.sun.com if you need additional information or | 20 * or visit www.oracle.com if you need additional information or have any |
21 * have any questions. | 21 * questions. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 // The system dictionary stores all loaded classes and maps: | 25 // The system dictionary stores all loaded classes and maps: |
26 // | 26 // |
134 \ | 134 \ |
135 /* support for dynamic typing; it's OK if these are NULL in earlier JDKs */ \ | 135 /* support for dynamic typing; it's OK if these are NULL in earlier JDKs */ \ |
136 template(MethodHandle_klass, java_dyn_MethodHandle, Opt) \ | 136 template(MethodHandle_klass, java_dyn_MethodHandle, Opt) \ |
137 template(MemberName_klass, sun_dyn_MemberName, Opt) \ | 137 template(MemberName_klass, sun_dyn_MemberName, Opt) \ |
138 template(MethodHandleImpl_klass, sun_dyn_MethodHandleImpl, Opt) \ | 138 template(MethodHandleImpl_klass, sun_dyn_MethodHandleImpl, Opt) \ |
139 template(MethodHandleNatives_klass, sun_dyn_MethodHandleNatives, Opt) \ | |
139 template(AdapterMethodHandle_klass, sun_dyn_AdapterMethodHandle, Opt) \ | 140 template(AdapterMethodHandle_klass, sun_dyn_AdapterMethodHandle, Opt) \ |
140 template(BoundMethodHandle_klass, sun_dyn_BoundMethodHandle, Opt) \ | 141 template(BoundMethodHandle_klass, sun_dyn_BoundMethodHandle, Opt) \ |
141 template(DirectMethodHandle_klass, sun_dyn_DirectMethodHandle, Opt) \ | 142 template(DirectMethodHandle_klass, sun_dyn_DirectMethodHandle, Opt) \ |
142 template(MethodType_klass, java_dyn_MethodType, Opt) \ | 143 template(MethodType_klass, java_dyn_MethodType, Opt) \ |
143 template(MethodTypeForm_klass, java_dyn_MethodTypeForm, Opt) \ | 144 template(MethodTypeForm_klass, java_dyn_MethodTypeForm, Opt) \ |
489 static char* check_signature_loaders(symbolHandle signature, Handle loader1, | 490 static char* check_signature_loaders(symbolHandle signature, Handle loader1, |
490 Handle loader2, bool is_method, TRAPS); | 491 Handle loader2, bool is_method, TRAPS); |
491 | 492 |
492 // JSR 292 | 493 // JSR 292 |
493 // find the java.dyn.MethodHandles::invoke method for a given signature | 494 // find the java.dyn.MethodHandles::invoke method for a given signature |
494 static methodOop find_method_handle_invoke(symbolHandle signature, | 495 static methodOop find_method_handle_invoke(symbolHandle name, |
495 Handle class_loader, | 496 symbolHandle signature, |
496 Handle protection_domain, | 497 KlassHandle accessing_klass, |
497 TRAPS); | 498 TRAPS); |
498 // ask Java to compute the java.dyn.MethodType object for a given signature | 499 // ask Java to compute a java.dyn.MethodType object for a given signature |
499 static Handle compute_method_handle_type(symbolHandle signature, | 500 static Handle find_method_handle_type(symbolHandle signature, |
500 Handle class_loader, | 501 KlassHandle accessing_klass, |
501 Handle protection_domain, | 502 bool for_invokeGeneric, |
502 TRAPS); | 503 bool& return_bcp_flag, |
504 TRAPS); | |
505 // ask Java to compute a java.dyn.MethodHandle object for a given CP entry | |
506 static Handle link_method_handle_constant(KlassHandle caller, | |
507 int ref_kind, //e.g., JVM_REF_invokeVirtual | |
508 KlassHandle callee, | |
509 symbolHandle name, | |
510 symbolHandle signature, | |
511 TRAPS); | |
503 // ask Java to create a dynamic call site, while linking an invokedynamic op | 512 // ask Java to create a dynamic call site, while linking an invokedynamic op |
504 static Handle make_dynamic_call_site(KlassHandle caller, | 513 static Handle make_dynamic_call_site(Handle bootstrap_method, |
505 int caller_method_idnum, | 514 // Callee information: |
515 symbolHandle name, | |
516 methodHandle signature_invoker, | |
517 Handle info, | |
518 // Caller information: | |
519 methodHandle caller_method, | |
506 int caller_bci, | 520 int caller_bci, |
507 symbolHandle name, | |
508 methodHandle mh_invoke, | |
509 TRAPS); | 521 TRAPS); |
510 | 522 |
511 // coordinate with Java about bootstrap methods | 523 // coordinate with Java about bootstrap methods |
512 static Handle find_bootstrap_method(KlassHandle caller, | 524 static Handle find_bootstrap_method(methodHandle caller_method, |
513 // This argument is non-null only when a | 525 int caller_bci, // N.B. must be an invokedynamic |
514 // classfile attribute has been found: | 526 int cache_index, // must be corresponding main_entry |
515 KlassHandle search_bootstrap_klass, | 527 Handle &argument_info_result, // static BSM arguments, if any |
516 TRAPS); | 528 TRAPS); |
517 | 529 |
518 // Utility for printing loader "name" as part of tracing constraints | 530 // Utility for printing loader "name" as part of tracing constraints |
519 static const char* loader_name(oop loader) { | 531 static const char* loader_name(oop loader) { |
520 return ((loader) == NULL ? "<bootloader>" : | 532 return ((loader) == NULL ? "<bootloader>" : |