Skip to content

Commit 0db2509

Browse files
ddolovovSpace Team
authored andcommitted
[CLI] New config parameter to enable nested IR element offsets checks
^KT-81475
1 parent 2ebcdf4 commit 0db2509

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

compiler/config/configuration-keys-generator/src/org/jetbrains/kotlin/config/keys/generator/CommonConfigurationKeysContainer.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ object CommonConfigurationKeysContainer : KeysContainer("org.jetbrains.kotlin.co
5858
val VERIFY_IR by key<IrVerificationMode>("IR verification mode")
5959
val ENABLE_IR_VISIBILITY_CHECKS by key<Boolean>("Check pre-lowering IR for visibility violations")
6060
val ENABLE_IR_VARARG_TYPES_CHECKS by key<Boolean>("Check IR for vararg types mismatches")
61+
val ENABLE_IR_NESTED_OFFSETS_CHECKS by key<Boolean>("Check that offsets of nested IR elements conform to offsets of their containers")
62+
6163
val PHASE_CONFIG by key<PhaseConfig>("phase configuration")
6264

6365
val DONT_CREATE_SEPARATE_SESSION_FOR_SCRIPTS by key<Boolean>(

compiler/config/gen/org/jetbrains/kotlin/config/CommonConfigurationKeys.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ object CommonConfigurationKeys {
110110
@JvmField
111111
val ENABLE_IR_VARARG_TYPES_CHECKS = CompilerConfigurationKey.create<Boolean>("Check IR for vararg types mismatches")
112112

113+
@JvmField
114+
val ENABLE_IR_NESTED_OFFSETS_CHECKS = CompilerConfigurationKey.create<Boolean>("Check that offsets of nested IR elements conform to offsets of their containers")
115+
113116
@JvmField
114117
val PHASE_CONFIG = CompilerConfigurationKey.create<PhaseConfig>("phase configuration")
115118

@@ -249,6 +252,10 @@ var CompilerConfiguration.enableIrVarargTypesChecks: Boolean
249252
get() = getBoolean(CommonConfigurationKeys.ENABLE_IR_VARARG_TYPES_CHECKS)
250253
set(value) { put(CommonConfigurationKeys.ENABLE_IR_VARARG_TYPES_CHECKS, value) }
251254

255+
var CompilerConfiguration.enableIrNestedOffsetsChecks: Boolean
256+
get() = getBoolean(CommonConfigurationKeys.ENABLE_IR_NESTED_OFFSETS_CHECKS)
257+
set(value) { put(CommonConfigurationKeys.ENABLE_IR_NESTED_OFFSETS_CHECKS, value) }
258+
252259
var CompilerConfiguration.phaseConfig: PhaseConfig?
253260
get() = get(CommonConfigurationKeys.PHASE_CONFIG)
254261
set(value) { put(CommonConfigurationKeys.PHASE_CONFIG, requireNotNull(value) { "nullable values are not allowed" }) }

0 commit comments

Comments
 (0)