Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java @ 18961:afa70d3e8159
Allow users to provide their own TruffleRuntime implementation
and add ForceInterpreter option to TruffleOptions.
author | Paul Woegerer <paul.woegerer@oracle.com> |
---|---|
date | Tue, 27 Jan 2015 14:11:52 +0100 |
parents | c65f549c4015 |
children | b54b548047ac |
comparison
equal
deleted
inserted
replaced
18960:858b1e3ab2ee | 18961:afa70d3e8159 |
---|---|
42 private final ThreadLocal<LinkedList<FrameInstance>> stackTraces = new ThreadLocal<>(); | 42 private final ThreadLocal<LinkedList<FrameInstance>> stackTraces = new ThreadLocal<>(); |
43 private final 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) { | |
48 throw new IllegalArgumentException("Cannot instantiate DefaultTruffleRuntime. Use Truffle.getRuntime() instead."); | |
49 } | |
50 } | 47 } |
51 | 48 |
52 @Override | 49 @Override |
53 public String getName() { | 50 public String getName() { |
54 return "Default Truffle Runtime"; | 51 return "Default Truffle Runtime"; |