Implement JS IC
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user