translator: fix proto runtime

This commit is contained in:
e5l
2016-08-10 12:43:38 +03:00
parent d54c4c2da1
commit 9d0d213a09
3 changed files with 8 additions and 25 deletions
@@ -517,14 +517,14 @@ abstract class BlockCodegen(val state: TranslationState, val variableManager: Va
left ?: throw UnsupportedOperationException("Wrong binary exception")
}
val right = evaluateExpression(expr.lastChild, scopeDepth) ?: throw UnsupportedOperationException("Wrong binary exception")
val right = evaluateExpression(expr.lastChild, scopeDepth) ?: throw UnsupportedOperationException("Wrong binary exception: ${expr.text}")
return executeBinaryExpression(operator, expr.operationReference, left, right)
}
private fun evaluatePostfixExpression(expr: KtPostfixExpression, scopeDepth: Int): LLVMSingleValue? {
val operator = expr.operationToken
val left = evaluateExpression(expr.baseExpression, scopeDepth) ?: throw UnsupportedOperationException("Wrong binary exception")
val left = evaluateExpression(expr.baseExpression, scopeDepth) ?: throw UnsupportedOperationException("Wrong binary exception: ${expr.text}")
return executePostfixExpression(operator, expr.operationReference, left as LLVMVariable)
}