Allow to specify builtInsModule for DefaultBuiltIns

Similarly to JvmBuiltIns, this will be needed to load built-ins from
compilation dependencies rather than the compiler class loader
This commit is contained in:
Alexander Udalov
2019-01-03 17:38:37 +01:00
parent f2bf0dc236
commit 37a149b218
@@ -18,9 +18,11 @@ package org.jetbrains.kotlin.builtins
import org.jetbrains.kotlin.storage.LockBasedStorageManager
class DefaultBuiltIns private constructor() : KotlinBuiltIns(LockBasedStorageManager("DefaultBuiltIns")) {
class DefaultBuiltIns(loadBuiltInsFromCurrentClassLoader: Boolean = true) : KotlinBuiltIns(LockBasedStorageManager("DefaultBuiltIns")) {
init {
createBuiltInsModule()
if (loadBuiltInsFromCurrentClassLoader) {
createBuiltInsModule()
}
}
companion object {