Implement JS IC

This commit is contained in:
Alexey Tsvetkov
2017-08-29 00:07:44 +03:00
parent 4aea9b349c
commit bb1cba67b7
12 changed files with 417 additions and 11 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,13 +20,23 @@ import org.jetbrains.annotations.TestOnly;
public class IncrementalCompilation {
private static final String INCREMENTAL_COMPILATION_PROPERTY = "kotlin.incremental.compilation";
private static final String INCREMENTAL_COMPILATION_JS_PROPERTY = "kotlin.incremental.compilation.js";
public static boolean isEnabled() {
return "true".equals(System.getProperty(INCREMENTAL_COMPILATION_PROPERTY));
}
public static boolean isEnabledForJs() {
return "true".equals(System.getProperty(INCREMENTAL_COMPILATION_JS_PROPERTY));
}
@TestOnly
public static void setIsEnabled(boolean value) {
System.setProperty(INCREMENTAL_COMPILATION_PROPERTY, String.valueOf(value));
}
@TestOnly
public static void setIsEnabledForJs(boolean value) {
System.setProperty(INCREMENTAL_COMPILATION_JS_PROPERTY, String.valueOf(value));
}
}