- changed status to resolved
PerformInvocations doesn't handle computational types properly
Issue #30
resolved
When having a type with a ComputationalType of Category 2, the initialization of the AI is wrong.
In PerformInvocations.invokestatic replace:
val parameters = operands.view.reverse.zipWithIndex.map { operand_index ⇒
val (operand, index) = operand_index
operand.adapt(executionHandler.domain, -(index + 1))
}.toArray(executionHandler.domain.DomainValueTag)
with
val parameters = executionHandler.domain.DomainValueTag.newArray(method.body.get.maxLocals)
var localVariableIndex = 0
for (operand_index <- operands.view.reverse.zipWithIndex) {
val (operand, index) = operand_index
val ct = operand.computationalType
val adaptedOperand = operand.adapt(executionHandler.domain, -(index + 1))
parameters.update(localVariableIndex, adaptedOperand)
localVariableIndex += ct.operandSize
}
(based on the implementation of AI.initialLocals)
Comments (2)
-
repo owner -
repo owner - Log in to comment
fixed issue
#30Signed-off-by: Michael Eichberg mail@michael-eichberg.de
→ <<cset d283464ae5b5>>