JS: enable translation of primitive arrays to TypedArray's by default (KT-17137)

This commit is contained in:
Anton Bannykh
2017-08-23 16:22:45 +03:00
parent cc8fbf6078
commit 22dc36a596
11 changed files with 87 additions and 32 deletions
@@ -98,9 +98,9 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
// Advanced options
@GradleOption(DefaultValues.BooleanFalseDefault::class)
@GradleOption(DefaultValues.BooleanTrueDefault::class)
@Argument(value = "-Xtyped-arrays", description = "Translate primitive arrays to JS typed arrays")
var typedArrays: Boolean by FreezableVar(false)
var typedArrays: Boolean by FreezableVar(true)
@GradleOption(DefaultValues.BooleanFalseDefault::class)
@Argument(value = "-Xfriend-modules-disabled", description = "Disable internal declaration export")
@@ -376,9 +376,7 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
configuration.put(JSConfigurationKeys.META_INFO, true);
}
if (arguments.getTypedArrays()) {
configuration.put(JSConfigurationKeys.TYPED_ARRAYS_ENABLED, true);
}
configuration.put(JSConfigurationKeys.TYPED_ARRAYS_ENABLED, arguments.getTypedArrays());
configuration.put(JSConfigurationKeys.FRIEND_PATHS_DISABLED, arguments.getFriendModulesDisabled());