Mercurial > hg > truffle
comparison src/cpu/x86/vm/c1_Runtime1_x86.cpp @ 5573:f5cfb62f17b8
moved platform-independent Graal code from c1_Runtime1_x86.cpp to c1_Runtime1.[hpp,cpp]
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 12 Jun 2012 22:59:40 +0200 |
parents | 70f715dfbb41 |
children | b0d06c58200c |
comparison
equal
deleted
inserted
replaced
5572:8f9c9d372e31 | 5573:f5cfb62f17b8 |
---|---|
988 __ ret(0); | 988 __ ret(0); |
989 | 989 |
990 return oop_maps; | 990 return oop_maps; |
991 } | 991 } |
992 | 992 |
993 #ifdef GRAAL | |
994 JRT_ENTRY(void, graal_create_null_exception(JavaThread* thread)) | |
995 thread->set_vm_result(Exceptions::new_exception(thread, vmSymbols::java_lang_NullPointerException(), NULL)()); | |
996 JRT_END | |
997 | |
998 JRT_ENTRY(void, graal_create_out_of_bounds_exception(JavaThread* thread, jint index)) | |
999 char message[jintAsStringSize]; | |
1000 sprintf(message, "%d", index); | |
1001 thread->set_vm_result(Exceptions::new_exception(thread, vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), message)()); | |
1002 JRT_END | |
1003 | |
1004 JRT_ENTRY(void, graal_generic_callback(JavaThread* thread, oop _callback, oop _argument)) | |
1005 HandleMark hm; | |
1006 Handle callback(_callback); | |
1007 Handle argument(_argument); | |
1008 | |
1009 KlassHandle klass = SystemDictionary::resolve_or_null(vmSymbols::com_oracle_graal_api_code_GenericCallback(), SystemDictionary::java_system_loader(), NULL, thread); | |
1010 if (klass.is_null()) { | |
1011 tty->print_cr("couldn't resolve com_oracle_graal_api_code_GenericCallback"); | |
1012 } | |
1013 | |
1014 JavaValue result(T_OBJECT); | |
1015 JavaCallArguments args; | |
1016 args.push_oop(Handle(callback)); | |
1017 args.push_oop(Handle(argument)); | |
1018 JavaCalls::call_virtual(&result, klass, vmSymbols::callbackInternal_name(), vmSymbols::callback_signature(), &args, thread); | |
1019 | |
1020 thread->set_vm_result((oop) result.get_jobject()); | |
1021 JRT_END | |
1022 #endif | |
1023 | |
1024 OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) { | 993 OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) { |
1025 | 994 |
1026 // for better readability | 995 // for better readability |
1027 const bool must_gc_arguments = true; | 996 const bool must_gc_arguments = true; |
1028 const bool dont_gc_arguments = false; | 997 const bool dont_gc_arguments = false; |