1.1 --- a/src/share/vm/ci/ciMethod.cpp Wed Apr 08 00:12:59 2009 -0700 1.2 +++ b/src/share/vm/ci/ciMethod.cpp Wed Apr 08 10:56:49 2009 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. 1.6 + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -675,6 +675,30 @@ 1.11 } 1.12 1.13 // ------------------------------------------------------------------ 1.14 +// invokedynamic support 1.15 +// 1.16 +bool ciMethod::is_method_handle_invoke() { 1.17 + check_is_loaded(); 1.18 + bool flag = ((flags().as_int() & JVM_MH_INVOKE_BITS) == JVM_MH_INVOKE_BITS); 1.19 +#ifdef ASSERT 1.20 + { 1.21 + VM_ENTRY_MARK; 1.22 + bool flag2 = get_methodOop()->is_method_handle_invoke(); 1.23 + assert(flag == flag2, "consistent"); 1.24 + } 1.25 +#endif //ASSERT 1.26 + return flag; 1.27 +} 1.28 + 1.29 +ciInstance* ciMethod::method_handle_type() { 1.30 + check_is_loaded(); 1.31 + VM_ENTRY_MARK; 1.32 + oop mtype = get_methodOop()->method_handle_type(); 1.33 + return CURRENT_THREAD_ENV->get_object(mtype)->as_instance(); 1.34 +} 1.35 + 1.36 + 1.37 +// ------------------------------------------------------------------ 1.38 // ciMethod::build_method_data 1.39 // 1.40 // Generate new methodDataOop objects at compile time.