Mercurial > hg > truffle
comparison src/share/vm/c1/c1_Runtime1.cpp @ 6521:2a0c9f20baa1
consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 05 Oct 2012 17:55:12 +0200 |
parents | e722fa145b37 |
children | fd71ca8c5f88 |
comparison
equal
deleted
inserted
replaced
6520:14d158886ce0 | 6521:2a0c9f20baa1 |
---|---|
659 | 659 |
660 JRT_ENTRY(void, Runtime1::graal_create_out_of_bounds_exception(JavaThread* thread, jint index)) | 660 JRT_ENTRY(void, Runtime1::graal_create_out_of_bounds_exception(JavaThread* thread, jint index)) |
661 char message[jintAsStringSize]; | 661 char message[jintAsStringSize]; |
662 sprintf(message, "%d", index); | 662 sprintf(message, "%d", index); |
663 thread->set_vm_result(Exceptions::new_exception(thread, vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), message)()); | 663 thread->set_vm_result(Exceptions::new_exception(thread, vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), message)()); |
664 JRT_END | |
665 | |
666 JRT_ENTRY(void, Runtime1::graal_generic_callback(JavaThread* thread, oop _callback, oop _argument)) | |
667 HandleMark hm; | |
668 Handle callback(_callback); | |
669 Handle argument(_argument); | |
670 | |
671 KlassHandle klass = SystemDictionary::resolve_or_null(vmSymbols::com_oracle_graal_api_code_GenericCallback(), SystemDictionary::java_system_loader(), NULL, thread); | |
672 if (klass.is_null()) { | |
673 tty->print_cr("couldn't resolve com_oracle_graal_api_code_GenericCallback"); | |
674 } | |
675 | |
676 JavaValue result(T_OBJECT); | |
677 JavaCallArguments args; | |
678 args.push_oop(Handle(callback)); | |
679 args.push_oop(Handle(argument)); | |
680 JavaCalls::call_virtual(&result, klass, vmSymbols::callbackInternal_name(), vmSymbols::callback_signature(), &args, thread); | |
681 | |
682 thread->set_vm_result((oop) result.get_jobject()); | |
683 JRT_END | 664 JRT_END |
684 | 665 |
685 JRT_ENTRY_NO_ASYNC(void, Runtime1::graal_monitorenter(JavaThread* thread, oopDesc* obj, BasicLock* lock)) | 666 JRT_ENTRY_NO_ASYNC(void, Runtime1::graal_monitorenter(JavaThread* thread, oopDesc* obj, BasicLock* lock)) |
686 NOT_PRODUCT(_monitorenter_slowcase_cnt++;) | 667 NOT_PRODUCT(_monitorenter_slowcase_cnt++;) |
687 #ifdef ASSERT | 668 #ifdef ASSERT |