Merge pull request #499 from dicej/hostvm-message

print informative message if lambda encountered with no host VM
This commit is contained in:
Joel Dice 2016-09-16 14:14:35 -06:00 committed by GitHub
commit 2a82809a57

View File

@ -5140,6 +5140,14 @@ loop:
PROTECT(t, bootstrapArray);
if (isLambda(t, c->loader(), bootstrapArray, invocation)) {
if (bc->hostVM == 0) {
throwNew(t,
GcVirtualMachineError::Type,
"lambda expression encountered, but host VM is not "
"available; use -hostvm option to bootimage-generator to "
"fix this");
}
JNIEnv* e;
if (bc->hostVM->vtable->AttachCurrentThread(bc->hostVM, &e, 0) == 0) {
e->vtable->PushLocalFrame(e, 256);