Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalRuntime.cpp @ 20898:23433619a7cd
Consistently use JNIHandles::make_local with THREAD parameter
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Sat, 11 Apr 2015 00:15:55 -0700 |
parents | b1700db197c7 |
children | e1c063565b3c |
comparison
equal
deleted
inserted
replaced
20897:231597f3bbbe | 20898:23433619a7cd |
---|---|
645 | 645 |
646 TempNewSymbol makeInstance = SymbolTable::new_symbol("makeInstance", CHECK_NULL); | 646 TempNewSymbol makeInstance = SymbolTable::new_symbol("makeInstance", CHECK_NULL); |
647 TempNewSymbol sig = SymbolTable::new_symbol("()Lcom/oracle/truffle/api/TruffleRuntime;", CHECK_NULL); | 647 TempNewSymbol sig = SymbolTable::new_symbol("()Lcom/oracle/truffle/api/TruffleRuntime;", CHECK_NULL); |
648 JavaValue result(T_OBJECT); | 648 JavaValue result(T_OBJECT); |
649 JavaCalls::call_static(&result, klass, makeInstance, sig, CHECK_NULL); | 649 JavaCalls::call_static(&result, klass, makeInstance, sig, CHECK_NULL); |
650 return JNIHandles::make_local((oop) result.get_jobject()); | 650 return JNIHandles::make_local(THREAD, (oop) result.get_jobject()); |
651 JVM_END | 651 JVM_END |
652 | 652 |
653 // private static NativeFunctionInterfaceRuntime.createInterface() | 653 // private static NativeFunctionInterfaceRuntime.createInterface() |
654 JVM_ENTRY(jobject, JVM_CreateNativeFunctionInterface(JNIEnv *env, jclass c)) | 654 JVM_ENTRY(jobject, JVM_CreateNativeFunctionInterface(JNIEnv *env, jclass c)) |
655 GraalRuntime::ensure_graal_class_loader_is_initialized(); | 655 GraalRuntime::ensure_graal_class_loader_is_initialized(); |
658 | 658 |
659 TempNewSymbol makeInstance = SymbolTable::new_symbol("createNativeFunctionInterface", CHECK_NULL); | 659 TempNewSymbol makeInstance = SymbolTable::new_symbol("createNativeFunctionInterface", CHECK_NULL); |
660 TempNewSymbol sig = SymbolTable::new_symbol("()Lcom/oracle/nfi/api/NativeFunctionInterface;", CHECK_NULL); | 660 TempNewSymbol sig = SymbolTable::new_symbol("()Lcom/oracle/nfi/api/NativeFunctionInterface;", CHECK_NULL); |
661 JavaValue result(T_OBJECT); | 661 JavaValue result(T_OBJECT); |
662 JavaCalls::call_static(&result, klass, makeInstance, sig, CHECK_NULL); | 662 JavaCalls::call_static(&result, klass, makeInstance, sig, CHECK_NULL); |
663 return JNIHandles::make_local((oop) result.get_jobject()); | 663 return JNIHandles::make_local(THREAD, (oop) result.get_jobject()); |
664 JVM_END | 664 JVM_END |
665 | 665 |
666 void GraalRuntime::check_generated_sources_sha1(TRAPS) { | 666 void GraalRuntime::check_generated_sources_sha1(TRAPS) { |
667 TempNewSymbol name = SymbolTable::new_symbol("com/oracle/graal/hotspot/sourcegen/GeneratedSourcesSha1", CHECK_ABORT); | 667 TempNewSymbol name = SymbolTable::new_symbol("com/oracle/graal/hotspot/sourcegen/GeneratedSourcesSha1", CHECK_ABORT); |
668 KlassHandle klass = load_required_class(name); | 668 KlassHandle klass = load_required_class(name); |