Mercurial > hg > graal-jvmci-8
changeset 16989:19faa7ca37c1
Truffle/Source: use a synchronized hash table
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Wed, 27 Aug 2014 17:59:48 -0700 |
parents | 225ce2657c55 |
children | e98ccb0c3c05 |
files | graal/com.oracle.truffle.api/src/com/oracle/truffle/api/source/Source.java |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/source/Source.java Wed Aug 27 17:59:17 2014 -0700 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/source/Source.java Wed Aug 27 17:59:48 2014 -0700 @@ -73,7 +73,7 @@ // TOOD (mlvdv) connect SourceSections into a spatial tree for fast geometric lookup // Files and pseudo files are indexed. - private static final Map<String, WeakReference<Source>> filePathToSource = new HashMap<>(); + private static final Map<String, WeakReference<Source>> filePathToSource = new Hashtable<>(); private static boolean fileCacheEnabled = true; @@ -171,6 +171,7 @@ return source; } + // TODO (mlvdv) enable per-file choice whether to cache? /** * Enables/disables caching of file contents, <em>disabled</em> by default. Caching of sources * created from literal text or readers is always enabled.