translator with kotlin 1.0.5
This commit is contained in:
+3
-1
@@ -21,6 +21,8 @@ import org.kotlinnative.translator.TranslationState
|
|||||||
import org.kotlinnative.translator.VariableManager
|
import org.kotlinnative.translator.VariableManager
|
||||||
import org.kotlinnative.translator.llvm.*
|
import org.kotlinnative.translator.llvm.*
|
||||||
import org.kotlinnative.translator.llvm.types.*
|
import org.kotlinnative.translator.llvm.types.*
|
||||||
|
import java.lang.RuntimeException
|
||||||
|
import java.lang.UnsupportedOperationException
|
||||||
import java.rmi.UnexpectedException
|
import java.rmi.UnexpectedException
|
||||||
import kotlin.comparisons.compareBy
|
import kotlin.comparisons.compareBy
|
||||||
|
|
||||||
@@ -1095,7 +1097,7 @@ abstract class BlockCodegen(val state: TranslationState,
|
|||||||
is LLVMVariable -> LLVMVariable(retVar.label, LLVMNullType(returnType!!.type), retVar.kotlinName, retVar.scope, returnType!!.pointer - 1)
|
is LLVMVariable -> LLVMVariable(retVar.label, LLVMNullType(returnType!!.type), retVar.kotlinName, retVar.scope, returnType!!.pointer - 1)
|
||||||
else -> throw UnexpectedException("Unknown inheritor of LLVMSingleValue")
|
else -> throw UnexpectedException("Unknown inheritor of LLVMSingleValue")
|
||||||
}
|
}
|
||||||
generateReferenceReturn(retVar)
|
generateReferenceReturn(retVar!!)
|
||||||
}
|
}
|
||||||
is LLVMVoidType -> codeBuilder.addAnyReturn(LLVMVoidType())
|
is LLVMVoidType -> codeBuilder.addAnyReturn(LLVMVoidType())
|
||||||
else -> {
|
else -> {
|
||||||
|
|||||||
+2
@@ -1,3 +1,5 @@
|
|||||||
package org.kotlinnative.translator.exceptions
|
package org.kotlinnative.translator.exceptions
|
||||||
|
|
||||||
|
import java.lang.Exception
|
||||||
|
|
||||||
class TranslationException(message: String) : Exception(message)
|
class TranslationException(message: String) : Exception(message)
|
||||||
|
|||||||
+2
@@ -1,3 +1,5 @@
|
|||||||
package org.kotlinnative.translator.exceptions
|
package org.kotlinnative.translator.exceptions
|
||||||
|
|
||||||
|
import java.lang.Exception
|
||||||
|
|
||||||
class UnimplementedException() : Exception()
|
class UnimplementedException() : Exception()
|
||||||
|
|||||||
+1
@@ -2,6 +2,7 @@ package org.kotlinnative.translator.llvm.types
|
|||||||
|
|
||||||
import org.kotlinnative.translator.llvm.LLVMExpression
|
import org.kotlinnative.translator.llvm.LLVMExpression
|
||||||
import org.kotlinnative.translator.llvm.LLVMSingleValue
|
import org.kotlinnative.translator.llvm.LLVMSingleValue
|
||||||
|
import java.lang.IllegalArgumentException
|
||||||
|
|
||||||
|
|
||||||
class LLVMBooleanType() : LLVMType() {
|
class LLVMBooleanType() : LLVMType() {
|
||||||
|
|||||||
Reference in New Issue
Block a user