thrownewUvmRefImplException("Attempt to dump keepalive variables for a native frame for native funciton 0x%x".format(f.func))
}
case_=>{
thrownewUvmRuntimeException("The current instruction %s does not have keep-alive clause.".format(i.repr))
casef:MuFrame=>{
vali=f.curInst
imatch{
casehkac:HasKeepAliveClause=>{
valkas=hkac.keepAlives
for(ka<-kas)yield{
valbox=f.boxes(ka)
valty=TypeInferer.inferType(ka)
newHandle(ty,box)
}
}
case_=>{
thrownewUvmRuntimeException("The current instruction %s does not have keep-alive clause.".format(i.repr))
}
}
}
}
}
...
...
@@ -400,9 +413,12 @@ class ClientAgent(mutator: Mutator)(
defpopFrame(stack:Handle):Unit={
valst=getStackNotNull(stack)
valtop=st.top
top.prevmatch{
caseNone=>thrownewUvmRuntimeException("Attempting to pop the last frame of a stack.")
caseSome(prev)=>st.top=prev
topmatch{
casef:NativeFrame=>thrownewUvmRuntimeException("Attempting to pop a native frame. It has implementation-defined behaviour and this refimpl does not allow it.")
casef:MuFrame=>f.prevmatch{
caseNone=>thrownewUvmRuntimeException("Attempting to pop the last frame of a stack.")
caseSome(prev)=>st.popFrame()
}
}
}
...
...
@@ -421,7 +437,7 @@ class ClientAgent(mutator: Mutator)(