Revert "JS: remove -XtypedArraysEnabled flag (always true now)"

This reverts commit 4a5e9bb
This commit is contained in:
Anton Bannykh
2018-04-09 17:18:12 +03:00
parent 56d1184515
commit 703611a15c
12 changed files with 1219 additions and 25 deletions
@@ -67,4 +67,10 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
* Default value: "v5"
*/
var target: kotlin.String
/**
* Translate primitive arrays to JS typed arrays
* Default value: true
*/
var typedArrays: kotlin.Boolean
}
@@ -79,6 +79,11 @@ internal abstract class KotlinJsOptionsBase : org.jetbrains.kotlin.gradle.dsl.Ko
get() = targetField ?: "v5"
set(value) { targetField = value }
private var typedArraysField: kotlin.Boolean? = null
override var typedArrays: kotlin.Boolean
get() = typedArraysField ?: true
set(value) { typedArraysField = value }
internal open fun updateArguments(args: org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments) {
allWarningsAsErrorsField?.let { args.allWarningsAsErrors = it }
suppressWarningsField?.let { args.suppressWarnings = it }
@@ -95,6 +100,7 @@ internal abstract class KotlinJsOptionsBase : org.jetbrains.kotlin.gradle.dsl.Ko
sourceMapEmbedSourcesField?.let { args.sourceMapEmbedSources = it }
sourceMapPrefixField?.let { args.sourceMapPrefix = it }
targetField?.let { args.target = it }
typedArraysField?.let { args.typedArrays = it }
}
}
@@ -114,4 +120,5 @@ internal fun org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments.fil
sourceMapEmbedSources = null
sourceMapPrefix = null
target = "v5"
typedArrays = true
}