Mercurial > hg > truffle
comparison src/share/vm/graal/graalCodeInstaller.cpp @ 13156:2e76d94f8383
propagate code-cache-full message up to Java to throw exception instead of crashing VM
author | twisti |
---|---|
date | Mon, 25 Nov 2013 15:10:04 -0800 |
parents | ff1d8605f354 |
children | 0ffe9e4bb364 |
comparison
equal
deleted
inserted
replaced
13155:1dd9aa5a9ee5 | 13156:2e76d94f8383 |
---|---|
359 return result; | 359 return result; |
360 } | 360 } |
361 | 361 |
362 // constructor used to create a method | 362 // constructor used to create a method |
363 CodeInstaller::CodeInstaller(Handle& compiled_code, GraalEnv::CodeInstallResult& result, CodeBlob*& cb, Handle installed_code, Handle triggered_deoptimizations) { | 363 CodeInstaller::CodeInstaller(Handle& compiled_code, GraalEnv::CodeInstallResult& result, CodeBlob*& cb, Handle installed_code, Handle triggered_deoptimizations) { |
364 GraalCompiler::initialize_buffer_blob(); | 364 BufferBlob* buffer_blob = GraalCompiler::initialize_buffer_blob(); |
365 CodeBuffer buffer(JavaThread::current()->get_buffer_blob()); | 365 if (buffer_blob == NULL) { |
366 result = GraalEnv::cache_full; | |
367 return; | |
368 } | |
369 | |
370 CodeBuffer buffer(buffer_blob); | |
366 jobject compiled_code_obj = JNIHandles::make_local(compiled_code()); | 371 jobject compiled_code_obj = JNIHandles::make_local(compiled_code()); |
367 initialize_assumptions(JNIHandles::resolve(compiled_code_obj)); | 372 initialize_assumptions(JNIHandles::resolve(compiled_code_obj)); |
368 | 373 |
369 // Get instructions and constants CodeSections early because we need it. | 374 // Get instructions and constants CodeSections early because we need it. |
370 _instructions = buffer.insts(); | 375 _instructions = buffer.insts(); |