equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2012, 2017, 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. |
648 if (args == NULL) { |
648 if (args == NULL) { |
649 JavaCalls::call_static(&result, klass, runtime, sig, CHECK_(Handle())); |
649 JavaCalls::call_static(&result, klass, runtime, sig, CHECK_(Handle())); |
650 } else { |
650 } else { |
651 JavaCalls::call_static(&result, klass, runtime, sig, args, CHECK_(Handle())); |
651 JavaCalls::call_static(&result, klass, runtime, sig, args, CHECK_(Handle())); |
652 } |
652 } |
653 return Handle((oop)result.get_jobject()); |
653 return Handle(THREAD, (oop)result.get_jobject()); |
654 } |
654 } |
655 |
655 |
656 void JVMCIRuntime::initialize_HotSpotJVMCIRuntime(TRAPS) { |
656 void JVMCIRuntime::initialize_HotSpotJVMCIRuntime(TRAPS) { |
657 guarantee(!_HotSpotJVMCIRuntime_initialized, "cannot reinitialize HotSpotJVMCIRuntime"); |
657 guarantee(!_HotSpotJVMCIRuntime_initialized, "cannot reinitialize HotSpotJVMCIRuntime"); |
658 JVMCIRuntime::initialize_well_known_classes(CHECK); |
658 JVMCIRuntime::initialize_well_known_classes(CHECK); |
682 assert(adjustment >= JVMCIRuntime::none && |
682 assert(adjustment >= JVMCIRuntime::none && |
683 adjustment <= JVMCIRuntime::by_full_signature, |
683 adjustment <= JVMCIRuntime::by_full_signature, |
684 "compilation level adjustment out of bounds"); |
684 "compilation level adjustment out of bounds"); |
685 _comp_level_adjustment = (CompLevelAdjustment) adjustment; |
685 _comp_level_adjustment = (CompLevelAdjustment) adjustment; |
686 _HotSpotJVMCIRuntime_initialized = true; |
686 _HotSpotJVMCIRuntime_initialized = true; |
687 _HotSpotJVMCIRuntime_instance = JNIHandles::make_global(result()); |
687 _HotSpotJVMCIRuntime_instance = JNIHandles::make_global(result); |
688 } |
688 } |
689 |
689 |
690 void JVMCIRuntime::initialize_JVMCI(TRAPS) { |
690 void JVMCIRuntime::initialize_JVMCI(TRAPS) { |
691 if (JNIHandles::resolve(_HotSpotJVMCIRuntime_instance) == NULL) { |
691 if (JNIHandles::resolve(_HotSpotJVMCIRuntime_instance) == NULL) { |
692 callStatic("jdk/vm/ci/runtime/JVMCI", |
692 callStatic("jdk/vm/ci/runtime/JVMCI", |
861 } |
861 } |
862 |
862 |
863 JavaValue result(T_INT); |
863 JavaValue result(T_INT); |
864 JavaCallArguments args; |
864 JavaCallArguments args; |
865 args.push_oop(receiver); |
865 args.push_oop(receiver); |
866 args.push_oop(method->method_holder()->java_mirror()); |
866 args.push_oop(Handle(THREAD, method->method_holder()->java_mirror())); |
867 args.push_oop(name()); |
867 args.push_oop(name); |
868 args.push_oop(sig()); |
868 args.push_oop(sig); |
869 args.push_int(is_osr); |
869 args.push_int(is_osr); |
870 args.push_int(level); |
870 args.push_int(level); |
871 JavaCalls::call_special(&result, receiver->klass(), vmSymbols::adjustCompilationLevel_name(), |
871 JavaCalls::call_special(&result, receiver->klass(), vmSymbols::adjustCompilationLevel_name(), |
872 vmSymbols::adjustCompilationLevel_signature(), &args, CHECK_RETURN); |
872 vmSymbols::adjustCompilationLevel_signature(), &args, CHECK_RETURN); |
873 |
873 |