# HG changeset patch # User Christian Wirth # Date 1449150052 -3600 # Node ID 1c39c96a170361f9c9fdd6937774de74ebe2eddb # Parent 5692953272ebaa9c41dc27872117604dd118fa3f remove support for auto-reloading of files from disk diff -r 5692953272eb -r 1c39c96a1703 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleOptions.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleOptions.java Thu Dec 03 09:14:20 2015 +0100 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleOptions.java Thu Dec 03 14:40:52 2015 +0100 @@ -29,7 +29,6 @@ import com.oracle.truffle.api.nodes.NodeCost; import com.oracle.truffle.api.nodes.NodeInfo; -import com.oracle.truffle.api.source.Source; /** * Class containing general Truffle options. @@ -87,13 +86,6 @@ public static final boolean TraceASTJSON; /** - * Enables auto-reload of file-based {@link Source} when the file is changed on disk. - *

- * Can be set with {@code -Dtruffle.AutoReloadFileSource=true}. - */ - public static final boolean AutoReloadFileSource; - - /** * Forces ahead-of-time initialization. */ public static final boolean AOT; @@ -107,7 +99,7 @@ } static { - final boolean[] values = new boolean[5]; + final boolean[] values = new boolean[4]; AccessController.doPrivileged(new PrivilegedAction() { public Void run() { values[0] = Boolean.getBoolean("truffle.TraceRewrites"); @@ -117,7 +109,6 @@ values[1] = Boolean.getBoolean("truffle.DetailedRewriteReasons"); values[2] = Boolean.getBoolean("truffle.TraceASTJSON"); values[3] = Boolean.getBoolean("com.oracle.truffle.aot"); - values[4] = Boolean.getBoolean("truffle.AutoReloadFileSource"); return null; } }); @@ -125,6 +116,5 @@ DetailedRewriteReasons = values[1]; TraceASTJSON = values[2]; AOT = values[3]; - AutoReloadFileSource = values[4]; } } diff -r 5692953272eb -r 1c39c96a1703 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/Source.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/Source.java Thu Dec 03 09:14:20 2015 +0100 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/Source.java Thu Dec 03 14:40:52 2015 +0100 @@ -54,7 +54,6 @@ import com.oracle.truffle.api.CompilerAsserts; import com.oracle.truffle.api.TruffleLanguage.Registration; -import com.oracle.truffle.api.TruffleOptions; /** * Representation of a guest language source code unit and its contents. Sources originate in @@ -834,12 +833,6 @@ private String code = null; // A cache of the file's contents - /** - * Timestamp of the cache in the file system. Enabled by setting - * {@link TruffleOptions.AutoReloadFileSource} to true. - */ - private long timeStamp; - public FileSource(File file, String name, String path) { this.file = file.getAbsoluteFile(); this.name = name; @@ -864,12 +857,9 @@ @Override public String getCode() { if (fileCacheEnabled) { - if (code == null || (TruffleOptions.AutoReloadFileSource && timeStamp != file.lastModified())) { + if (code == null) { try { code = read(getReader()); - if (TruffleOptions.AutoReloadFileSource) { - timeStamp = file.lastModified(); - } } catch (IOException e) { } } @@ -894,7 +884,7 @@ @Override public Reader getReader() { - if (code != null && (TruffleOptions.AutoReloadFileSource && timeStamp == file.lastModified())) { + if (code != null) { return new StringReader(code); } try {