Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalRuntime.cpp @ 9338:0266549ff6e0
added support from compiled stubs to be installed as RuntimeStubs and to be able to directly call C/C++ runtime functions (GRAAL-81)
replaced NewArraySlowStubCall with NewArrayRuntimeCall using this support
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 26 Apr 2013 18:36:41 +0200 |
parents | bb2447c64055 |
children | 3e7d22d31f7e |
comparison
equal
deleted
inserted
replaced
9337:e1200d5141fa | 9338:0266549ff6e0 |
---|---|
258 } | 258 } |
259 thread->set_vm_result(obj); | 259 thread->set_vm_result(obj); |
260 // This is pretty rare but this runtime patch is stressful to deoptimization | 260 // This is pretty rare but this runtime patch is stressful to deoptimization |
261 // if we deoptimize here so force a deopt to stress the path. | 261 // if we deoptimize here so force a deopt to stress the path. |
262 if (DeoptimizeALot) { | 262 if (DeoptimizeALot) { |
263 deopt_caller(); | 263 static int deopts = 0; |
264 } | 264 // Alternate between deoptimizing and raising an error (which will also cause a deopt) |
265 JRT_END | 265 if (deopts++ % 2 == 0) { |
266 | 266 ResourceMark rm(THREAD); |
267 | 267 THROW(vmSymbols::java_lang_OutOfMemoryError()); |
268 } else { | |
269 deopt_caller(); | |
270 } | |
271 } | |
272 JRT_END | |
268 | 273 |
269 JRT_ENTRY(void, GraalRuntime::new_multi_array(JavaThread* thread, Klass* klass, int rank, jint* dims)) | 274 JRT_ENTRY(void, GraalRuntime::new_multi_array(JavaThread* thread, Klass* klass, int rank, jint* dims)) |
270 assert(klass->is_klass(), "not a class"); | 275 assert(klass->is_klass(), "not a class"); |
271 assert(rank >= 1, "rank must be nonzero"); | 276 assert(rank >= 1, "rank must be nonzero"); |
272 oop obj = ArrayKlass::cast(klass)->multi_allocate(rank, dims, CHECK); | 277 oop obj = ArrayKlass::cast(klass)->multi_allocate(rank, dims, CHECK); |