Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java @ 18870:c65f549c4015
DefaultTruffleRuntime fields can be final
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Thu, 15 Jan 2015 06:34:53 +0100 |
parents | e3c95cbbb50c |
children | afa70d3e8159 |
comparison
equal
deleted
inserted
replaced
18869:fe4f875e435f | 18870:c65f549c4015 |
---|---|
37 * This is an implementation-specific class. Do not use or instantiate it. Instead, use | 37 * This is an implementation-specific class. Do not use or instantiate it. Instead, use |
38 * {@link Truffle#getRuntime()} to retrieve the current {@link TruffleRuntime}. | 38 * {@link Truffle#getRuntime()} to retrieve the current {@link TruffleRuntime}. |
39 */ | 39 */ |
40 public final class DefaultTruffleRuntime implements TruffleRuntime { | 40 public final class DefaultTruffleRuntime implements TruffleRuntime { |
41 | 41 |
42 private ThreadLocal<LinkedList<FrameInstance>> stackTraces = new ThreadLocal<>(); | 42 private final ThreadLocal<LinkedList<FrameInstance>> stackTraces = new ThreadLocal<>(); |
43 private ThreadLocal<FrameInstance> currentFrames = new ThreadLocal<>(); | 43 private final ThreadLocal<FrameInstance> currentFrames = new ThreadLocal<>(); |
44 private final Map<RootCallTarget, Void> callTargets = Collections.synchronizedMap(new WeakHashMap<RootCallTarget, Void>()); | 44 private final Map<RootCallTarget, Void> callTargets = Collections.synchronizedMap(new WeakHashMap<RootCallTarget, Void>()); |
45 | 45 |
46 public DefaultTruffleRuntime() { | 46 public DefaultTruffleRuntime() { |
47 if (Truffle.getRuntime() != null) { | 47 if (Truffle.getRuntime() != null) { |
48 throw new IllegalArgumentException("Cannot instantiate DefaultTruffleRuntime. Use Truffle.getRuntime() instead."); | 48 throw new IllegalArgumentException("Cannot instantiate DefaultTruffleRuntime. Use Truffle.getRuntime() instead."); |