You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In GenJVM, one of the differences between genMethod and addStaticInit is that the latter doesn't add local vars. This is no problem with the current compilation pipeline (because no such vars show up). I'm applying an AST lowering that stores intermediate results in temp vars (to accomodate an MSIL restriction, "Attempt to enter try-block with non-empty stack") and with that static class initializers do get local temp vars.
The following additions in addStaticInit seems to do the trick, not sure what to do about legacyEmitBootstrapMethodInstall.
mopt match {
case Some(m) =>
computeLocalVarsIndex(m) // <----- ADDED
if (clasz.bootstrapClass.isDefined) legacyEmitBootstrapMethodInstall(clinit)
assert(m.params.isEmpty)
for (local <- m.locals) { // <----- ADDED
if (settings.debug.value)
log("add local var: " + local)
clinitMethod.addNewLocalVariable(javaType(local.kind), javaName(local.sym))
}
The text was updated successfully, but these errors were encountered:
In
GenJVM
, one of the differences betweengenMethod
andaddStaticInit
is that the latter doesn't add local vars. This is no problem with the current compilation pipeline (because no such vars show up). I'm applying an AST lowering that stores intermediate results in temp vars (to accomodate an MSIL restriction, "Attempt to enter try-block with non-empty stack") and with that static class initializers do get local temp vars.The following additions in
addStaticInit
seems to do the trick, not sure what to do aboutlegacyEmitBootstrapMethodInstall
.The text was updated successfully, but these errors were encountered: