[Wasm] Disable range checks for arrays. Add cli argument to enable them back.

This commit is contained in:
Igor Laevsky
2022-04-04 16:55:36 +03:00
committed by teamcity
parent 2c9bfe901d
commit 81eae94821
8 changed files with 27 additions and 0 deletions
@@ -135,6 +135,8 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
configuration.put(JSConfigurationKeys.PARTIAL_LINKAGE, arguments.partialLinkage)
configuration.put(JSConfigurationKeys.WASM_ENABLE_ARRAY_RANGE_CHECKS, arguments.wasmEnableArrayRangeChecks)
val commonSourcesArray = arguments.commonSources
val commonSources = commonSourcesArray?.toSet() ?: emptySet()
for (arg in arguments.freeArgs) {